VoiceTemp.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Swinehart, June 25, 1986 10:03:13 am PDT
DIRECTORY
RefID USING [ ID, nullID ],
Thrush USING [ Credentials, NB, none, SHHH ]
;
VoiceTemp: CEDAR DEFINITIONS = {
VoiceTemp is a voice service interface. It is exported to $recording service parties to provide access to procedures for recording and playing tunes, and for simple VoiceRope types of activities. It will be replaced with some part of the eventual VoiceRope system.
TuneIDs: naming the units of allocation on the voice server
TuneID:
TYPE =
INT;
-- the index of a "tune" or similar utterance identification.
nullTuneID: TuneID = -1;
newTuneID: TuneID = -2;
VoiceTime: TYPE = INT; -- A sample number or sample count.
VoiceDirection: TYPE = { play, record };
Record/Playback Specifications
Unique ID's for intervals within a conversation
IntID: TYPE = LONG CARDINAL;
nullIntID: IntID = 0;
EnergyRange: TYPE = NAT;
IntervalSpec: TYPE = REF IntervalSpecBody;
IntervalSpecBody:
TYPE =
RECORD [
tuneID: TuneID←newTuneID,
start: VoiceTime𡤀, -- first sample within tune to play or record.
length: VoiceTime←-1, -- number of samples: -1 to play to the end.
keyIndex: [0..17B] ← 0,
intID: IntID ← nullIntID,
ambientLevel: EnergyRange ← 0
];
IntervalSpecs:
TYPE =
LIST
OF IntervalSpec;
Comments
Play an interval. If queueIt is FALSE, flush existing playback and recording requests, first.
Action reports (iff intID#nullIntID)
{ $recording/$playback, $started, intID } as the interval begins playing/recording.
{ $recording/$playback, $scheduled, intID } as the interval is accepted for recording/playback, if there is already a list of pieces in the queue ahead of this request.
{ $recording/$playback, $finished, intID } when the interval has finished.
{ $recording/$playback, $abandoned, intID } when all recording and playback actions ending with this interval has been flushed.
Play:
PROCEDURE [
shhh: Thrush.SHHH←Thrush.none,
credentials: Thrush.Credentials,
serviceID: RefID.ID,
intervalSpec: IntervalSpec,
queueIt: BOOL←TRUE
]
RETURNS [nb: Thrush.NB];
Record a new interval. The tune may be specified or defaulted (new tune created). The interval may be specified or left open-ended (requires explicit termination).
Action reports (iff intID#nullIntID was specified)
{ $recording, $started, intID } when recording begins.
{ $recording, $finished, intID } when the recording of this interval has finished.
{ $recording, $abandoned, intID } when all recording and playback actions ending with this interval has been flushed.
Record:
PROCEDURE [
shhh: Thrush.SHHH←Thrush.none,
credentials: Thrush.Credentials, -- requesting party's
serviceID: RefID.ID, -- in this case, the recording service's SmartsID
intervalSpec: IntervalSpec,
queueIt: BOOL←TRUE
]
RETURNS [nb: Thrush.NB, tuneID: TuneID];
Stop playing or recording some or all of the scheduled intervals.
Action reports (iff intID#nullIntID was specified in original request)
{ $recording, $abandoned, intID } as indicated above.
Stop:
PROCEDURE [
shhh: Thrush.SHHH←Thrush.none,
credentials: Thrush.Credentials,
serviceID: RefID.ID
]
RETURNS [nb: Thrush.NB];
Describe the loud and silence intervals within the specified interval.
nb is $success or $noSuchTune.
Also indicates the total length of the tune.
This function can be called without valid credentials or serviceID.
DescribeInterval:
PROC [
shhh: Thrush.SHHH←Thrush.none,
credentials: Thrush.Credentials,
serviceID: RefID.ID ← RefID.nullID, -- Not used
targetInterval: IntervalSpec,
minSilence: VoiceTime ← 1 -- Smallest silent interval that will be considered silence.
]
RETURNS [ nb: Thrush.NB, length: INT, intervals: IntervalSpecs ];
N.B. When the conversation is terminated before all recording/playback actions have occurred, reporting is problematical. Currently, the requesting party may well not receive any reports after idling the conversation (hanging up, for instance.) This interface, however, remains available, so that the DescribeInterval function is available for finding out how much was recorded, implementating VoiceRopes, and so on.
}.
Swinehart, May 30, 1986 6:04:07 pm PDT
Temporary recording service interface, will be supplanted by VoiceRopes.