Copyright (c) 1998-2001 SpeechWorks International, Inc. All Rights Reserved.
Audio Source Interface
Macros to determine the availability of new methods
Result codes for interface methods
Result codes for event listener callbacks
Events returned from the Audio Source as detailed in the Audio Source interface description
Event structure for returning audio and/or detailed status information
Signature for the event handler called to report Audio Source events, as registered via RegisterEventListener( ).
Audio Source interface for audio input
Abstract interface for obtaining audio (speech) from the caller via a telephony interface, where the audio is provided as in-memory streaming audio delivered via events.
The Audio Source interface must be implemented for each new underlying telephony interface, where this is frequently done by a third party integrator.
There is one Audio Source interface per telephony channel.
The following table summarizes the events delivered by Audio Source implementations.
AS_EVENT_ERROR Reports the Audio Source encountered an error in delivering audio during a record operation, typically due to an underlying telephony or I/O error. The error must have occurred after a call to VXIasTriggerRecord( ) returned with a VXIas_RESULT_SUCCESS result code, never during that call or after that call returned with an error. The Audio Source must be returned to an IDLE state (the record operation halted) prior to delivering this event.
The event includes a result code that indicates the cause of the error.
AS_EVENT_RECEIVED Reports audio (possibly caller speech) that has been received from the telephony interface. This audio should be echo cancelled audio (done by the telephony interface or an external device). It can optionally be from a first-pass speech detector, which uses the telephony interface or an external device to supporess audio delivery until potential speech is identified within the audio stream (either a noise detector or more intelligent speech detector).
However, if a first-pass speech detector is used (most commonly to reduce CPU consuption by avoiding streaming silence that occurs prior to speech), after it detects potential speech it must deliver audio starting at 250 msec BEFORE the speech detector fired. This allows a higher-level, more sophisticated endpointer integrated above this interface to properly scan for low-energy speech that is important for recognition that first-pass speech detectors commonly chop off.
AS_EVENT_STOPPED Reports that a record operation has terminated normally, either due to the input operation successfully completing or the record operation being stopped via TriggerStop( ). Audio Source implementations may also choose to automatically stop the record operation and return this event on hang-up, although this should only be done when this is automatic functionality within the underlying telephony library (the client is responsible for rapdily calling TriggerStop( ) when hang-up occurs, which in most cases simplifies the Audio Source implementation by avoiding session control interactions).
The Audio Source must move from the RECORDING state to an IDLE state prior to delivering this event.
AS_EVENT_OVERFLOW Reports the Audio Source has overflowed its internal buffers while in a PAUSED state and is throwing out audio (the implementation decides whether to discard audio first-in-first-out or last-in-first-out). This will not be reported again until the record operation is resumed and then paused again. The record operation will otherwise proceed normally once resumed. The PAUSE state was entered due to the event listener returning VXIasCb_RESULT_PAUSE_AUDIO for an AS_EVENT_RECEIVED event. AS_EVENT_LOST Reports the Audio Source has detected some audio data was lost, such as dropped packets on a Voice over IP (VoIP) network. The event reports the number of bytes lost and the sequence number of the packet that was lost.
Alphabetic index Hierarchy of classes
This page was generated with the help of DOC++.