ViewVoiceRope.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Swinehart, January 31, 1986 7:11:13 pm PST
Doug Terry, April 9, 1986 8:53:37 pm PST
Solely for use with ViewRec.
DIRECTORY Rope USING [ROPE], VoiceRope;
ViewVoiceRope: CEDAR DEFINITIONS = {
For now, procedures for managing recorded voice; later, intend to launder FinchSmarts routines for telephone management and include them here.
ID: TYPE = Rope.ROPE;
Open: PROC [
If voiceRopeDBName, voiceRopeDBInstance, or localName is omitted, a default based on the user profile choice of Thrush Server is invented. If Complain is omitted, Log.Problem[...$Finch] is used. See VoiceDB for meaning of the names.
voiceRopeDBName: Rope.ROPENIL,
voiceRopeDBInstance: Rope.ROPENIL,
localName: Rope.ROPENIL
]
RETURNS[--handle: Handle--];
In all the routines that follow, if handle is omitted, one will be invented using all the defaults.
Creating and playing voice ropes
Record: PROC[--handle: Handle←NIL--] RETURNS [voiceRope: ID];
Records a tune, registers it in the VoiceDB, returns its ID.
NIL return value indicates that something went wrong.
Play: PROC[
--handle: Handle←NIL,--
Play a specified utterance.
refID: Rope.ROPENIL, refIDType: Rope.ROPENIL, voiceRope: IDNIL,
Either refID or voiceFileID must be NIL; if refID#NIL, refIDType must be non-NIL
queueIt: BOOLTRUE, -- play after all other record/playback requests are satisfied.
failOK: BOOLFALSE, -- playing is optional; leave connection open if tune doesn't exist.
wait: BOOLFALSE -- wait until things appear to be started properly, or have failed
];
N.B.: System noises, like Beeps and intolerably cute rollback tunes are indexed in the refsToTunesDB database as refID's like "beep", "rollback", and so on, under the refIDType "SysNoises"
Stop: PROC[--handle: Handle--];
Stops any recording or playback in progress.
Interests in voice ropes
Retain: PROC [
Existence of refID retains interest in voiceFileID until corresponding Forget.
Creator is assumed to be logged-in user.
--handle: Handle,--
voiceRope: ID,
refID: Rope.ROPE,
refIDType: Rope.ROPE
];
Forget: PROC [
Remove refID from database, eliminating its interest in any voiceFileID's
Creator is assumed to be logged-in user.
--handle: Handle,--
refID: Rope.ROPE,
refIDType: Rope.ROPE
];
Editing voice ropes
Cat: PROC [--handle: Handle,-- vr1, vr2, vr3, vr4, vr5: ID ← NIL] RETURNS [new: ID];
Substr: PROC [--handle: Handle,-- vr: ID, start: INT ← 0, len: INTLAST[INT]] RETURNS [new: ID];
Replace: PROC [--handle: Handle,-- vr: ID, start: INT ← 0, len: INTLAST[INT], with: ID ← NIL] RETURNS [new: ID];
Length: PROC [--handle: Handle,-- vr: ID] RETURNS [len: INT];
Information about voice ropes
DescribeRope: PROC [--handle: Handle,-- vr: ID, minSilence: INT ← -1] RETURNS [noise: VoiceRope.IntervalSpecs];
Fetch: PROC [--handle: Handle,-- vr: ID, index: INT] RETURNS [VoiceSample];
}.
Swinehart, January 30, 1986 9:34:42 am PST
Created from WalnutVoiceImpl routines; voice message facilities, without Walnut specifics
Doug Terry, March 22, 1986 1:32:03 pm PST
Changed recording and playback routines to deal in voice ropes instead of tunes; upgraded interest management; added facilities for editing voice ropes.
Doug Terry, March 22, 1986 3:59:22 pm PST
changes to: VoiceRope, Record, Play, Retain, Forget, Cat, Substr, Replace, Length
Doug Terry, April 1, 1986 4:16:01 pm PST
changes to: ViewVoiceRope, Record, Play, Stop, Retain, Forget, Cat, Substr, Replace, Length
Doug Terry, April 9, 1986 8:53:37 pm PST
changes to: DescribeRope, DIRECTORY