VoiceResource Class |
Namespace: VoiceElements.Client
The VoiceResource type exposes the following members.
Name | Description | |
---|---|---|
BeepDetectionDebouncerOff |
This is the required number of samples (each 10ms) that are required for the tone to be considered "off". Default = 4 samples
| |
BeepDetectionDebouncerOn |
This is the required number of samples (each 10ms) that are required for the tone to be considered "on". Default = 4 samples
| |
BeepDetectionFrequencyRangeHighHz |
The highest frequency the Beep Detector will attempt to isolate. Default = 1800Hz.
| |
BeepDetectionFrequencyRangeLowHz |
The highest frequency the Beep Detector will attempt to isolate. Default = 600Hz.
| |
BeepDetectionMaximumTimeMs |
This is the maximum time the system will listen for a beep. Beep Detection will stop after this interval. Default = 60000ms
| |
BeepDetectionMetaData |
When the server is recording Beep Detection, this allows you to add additional information to the filename that is created. Be sure to only use characters that are permissable within filenames.
| |
BeepDetectionMinimumRequiredDb |
The minimum required energy in decibels for a packet to be examined. Default = -38.0f Raising this value will eliminate quieter tones.
| |
BeepDetectionPercentOfEnergy |
The percentage of energy that is contained within the frequency bin as compared to the overall energy. Default = 0.90f
| |
BeepDetectionShortToneMs |
The length of the shortest tone you wish to detect. For shorter tones, the tone must be immediately followed by silence. Default = 120ms.
| |
BeepDetectionShortToneSilenceTriggerMs |
The amount of required silence after a short tone goes to silence. Deafult = 40ms.
| |
BeepDetectionThrowsException |
Cause an exception to be thrown when the BeepDetector senses a beep in the audio stream.
| |
BeepDetectionTimeOnToTriggerMs |
This is the total time the frequency must be registered before the system qualifies it as a beep. Default = 200ms.
| |
BeepDetectionToneOnEnergyDeviationDb |
The allowable deviation of the tone's loudness in decibels. If the tone starts at -15db it must stay at this level +/- this value. Default = 2.0 db.
| |
BeepDetectionToneOnFrequencyDeviation |
The allowable deviation of the tone's frequency in hertz. If the tone starts at 600hz it must stay at this frequency +/- this value. Default = 25 Hz.
| |
BytesPlayed |
The number of bytes that were output on the last Play on this resource.
| |
BytesRecorded |
The number of bytes that were recorded on the last Record on this resource.
| |
ClearDigitBuffer | ||
Codec |
Gets or sets the audio codec for the Voice Resource.
| |
Conference |
Represents the Conference of which this resource is a member.
(Inherited from RoutableResource.) | |
ConferenceAttributes |
Represents the Conference Attributes of a Conference to which this resource is a member.
(Inherited from RoutableResource.) | |
DataFormat |
Gets or sets the audio Data Format The Default is Wave Format.
| |
DetectBargeIn |
When set to true, files played will return a Termination Code of "BargeIn" if voice activity is detected during the Timeout.
This only applies to CSP enabled voice resources.
| |
DetectBargeInTimeout |
The maximum amount of time you will allow a speech recognition barge-in to trigger the stopping of a Play function.
This only applies to CSP enabled voice resources.
| |
DeviceName |
The unique name of this resource / device on the server. This is useful for following, logging a call or thread.
(Inherited from RoutableResource.) | |
DigitBuffer |
Holds the string of digits from the last Get Response or Get Digits.
| |
EnableDigitEvents |
Enables or disables Digit Events on this resource.
| |
FaxToneThrowsException |
Cause an exception to be thrown when the voice resource senses a fax signal in the audio stream.
Note the Fax tone 'F' must be defined on the voice elements server (GlobalTones config setting)
When set to true, this turns on DigitEvents by default.
If you set this to false and donot want DigitEvents enabled, you must manually turn them off.
| |
FormatSpoken | ||
InterDigitTimeout | ||
InterDigitTimeoutStartsAfterFirstDigit |
Gets or sets a value to determine when the Inter Digit Timer starts; either immediately or after the first digit is pressed.
| |
Listeners |
A list of Routable Resources which are currently listening to this resource.
(Inherited from RoutableResource.) | |
ListentingTo |
A Routable Resources to which this resource is currently listening.
(Inherited from RoutableResource.) | |
MaximumDigits |
Gets or sets the maximum number of digits that will be accepted as input on the next voice function. Default = 20.
| |
MaximumSilence |
Gets or sets the maximum silence in seconds that will be allowed until termination of the next voice function. Default = 20.
| |
MaximumTime |
Gets or sets the maximum time in seconds that will be allowed until termination of the next voice function. Default = 20.
| |
PlayGain | ||
RecordWithBeep |
Sets the voice resource to play a short beep before it begins any subsequent Record.
| |
SpeechRecognitionComfortFile |
Specifies the comfort file to use with the next speech recognition operation.
| |
SpeechRecognitionComfortStart |
Specifies, in milliseconds, how soon to start the Comfort File after a barge in. A setting of 0 means to wait until the end of speech is detected.
| |
SpeechRecognitionEnabled | ||
SpeechRecognitionEndOfSpeechDelay |
Sets the amount of time in seconds necessary to trigger end of speech detection.
| |
SpeechRecognitionGrammarFile |
Specifies the grammar file to use with the next speech recognition operation.
| |
SpeechRecognitionMode |
Specifies if speech recognition spans a single play or multiple plays.
| |
SpeechRecognitionPermitBargeIn |
Tells the speech engine whether or not to terminate any Plays or Play TTS's when speech is detected.
| |
SpeechRecognitionReturnedWord |
The word returned by the last speech operation. Essentially, what the engine thinks the caller said.
| |
SpeechRecognitionScore |
The score returned from the speech engine signifying how "confident" it is about the accuracy of the last speech operation. Ranges from 1-1000, 1000 being the most confident.
| |
StartingOffset |
The starting byte position in the file from which the next Play will begin. This property is reset after each invocation.
| |
TalkTime |
The number of seconds of time in the last Record on this resource.
| |
TerminationCode |
A Termination Code indicating how the last voice function (i.e. Play) ended. Typically, you will use this to determine what to do next.
| |
TerminationDigits |
Gets or Sets the termination digits to use for the next voice function such as a Play. "ANY" or "@" specifies to terminate on all digits.
| |
VapCodec |
Gets or sets the audio codec for the current VAP File.
| |
VapFile |
Specifies the current VAP File.
| |
VapMapFile |
Specifies the file which maps the segments of your VAP File.
| |
VoiceRecognitionEnabled | Obsolete.
When set to true, this causes all subsequent Play() and PlayTTS() methods to perform voice recognition.
| |
VoiceRecognitionEndOfSpeechDelay | Obsolete.
Sets the amount of time necessary to trigger end of speech detection.
| |
VoiceRecognitionGrammarFile | Obsolete.
Specifies the grammar file to use with the voice recognition operation.
| |
VoiceRecognitionPermitBargeIn | Obsolete.
Allows BargeIn when using voice recognition.
| |
VoiceRecognitionReturnedWord | Obsolete.
The returned word from the last voice recognition operation.
UML Diagram: | |
VoiceRecognitionScore | Obsolete.
The score returned from the engine that specifies how the last voice recognition operation was scored.
|
Name | Description | |
---|---|---|
BeepDetectionRestart |
Restarts the Beep Detector. This feature greatly improve call progress accuracy.
| |
BeepDetectionStart |
Starts the Beep Detector. This feature greatly improves call progress accuracy.
| |
BeepDetectionStop |
Stops the Beep Detector. This feature greatly improves call progress accuracy.
| |
Dispose |
This method forces a dispose of the Voice Resource object.
(Overrides ClientObject.Dispose(Boolean).) | |
GetDigits |
Waits for a user input as Digit(s) using all current settings for the Voice Resource, and therefore has no parameters.
| |
GetDigits(Int32, Int32, String) |
Waits for a user input as Digit(s) specifying three current settings for the Voice Resource: Maximum Digits, Maximum Time and Termination Digit.
| |
GetDigits(Int32, Int32, String, Int32) |
Waits for a user input as Digit(s) specifying four settings for the Voice Resource: Maximum Digits, Maximum Time, Termination Digit and Inter Digit Timeout.
| |
GetDigits(Int32, Int32, String, Int32, Boolean) |
Waits for a user input as Digit(s) specifying all settings for the Voice Resource: Maximum Digits, Maximum Time, Termination Digit, Inter Digit Timeout and Clear Digit Buffer Flag.
| |
GetResponse |
Waits for a user response as Digit(s) or Speech using all current settings for the Voice Resource, and therefore has no parameters.
| |
GetResponse(Int32, Int32, String) |
Waits for a user response as Digit(s) or Speech specifying three current settings for the Voice Resource: Maximum Digits, Maximum Time and Termination Digit.
| |
GetResponse(Int32, Int32, String, Int32) |
Waits for a user response as Digit(s) or Speech specifying four settings for the Voice Resource: Maximum Digits, Maximum Time, Termination Digit and Inter Digit Timeout.
| |
GetResponse(Int32, Int32, String, Int32, Boolean) |
Waits for a user response as Digit(s) or Speech specifying all settings for the Voice Resource: Maximum Digits, Maximum Time, Termination Digit, Inter Digit Timeout and Clear Digit Buffer Flag.
| |
GetSilence |
Waits for a specified period of silence before returning to your code. This is useful when waiting for an answering machine to finish playing it's greeting.
| |
GetToneDigit |
Gets the first occurance of any registered tone that has been triggered and is in the digit buffer. If no tones have been triggered, this function returns -1.
| |
IcecastStream | ||
IsToneComplete |
Returns 1 if the specified Tone is Off. Otherwise a 0. This function also returns -1 if the tone is not found.
| |
Play(Byte) |
Plays the specified byte array of audio using the current Audio Codec of the Voice Resource.
| |
Play(String) |
Plays the specified file path and name.
| |
Play(String) |
Plays a sequence of files, provided each file plays to completion.
| |
PlayDate | ||
PlayNumber |
Plays the specified string as a number using the specified Format Spoken and the voice resource's VAP file.
| |
PlayTone(Int32, Int32, Int32) |
Plays a single tone at the desired frequency and amplitude for the requested duration.
| |
PlayTone(Int32, Int32, Int32, Int32, Int32) |
Plays two mixed tones at the two specified frequencies and amplitudes for the requested duration.
| |
PlayTouchTones |
Plays DTMF or touch tones corresponding to the string specified.
| |
PlayTTS(String) |
Plays the text specified using the Text-To-Speech engine using the default voice.
| |
PlayTTS(String, String) |
Plays the text specified using the Text-To-Speech engine and using the voice selected.
| |
PlayVap(Int32) |
Plays a single segment of the current VAP File.
| |
PlayVap(Int32) |
Plays an array of segments of the current VAP File.
| |
PlayVap(String) |
Plays a single segment of the current VAP File using the Vap Map entry specified.
| |
PlayVap(String) |
Plays multiple segments of the current VAP File using the VapMap entries specified.
| |
Record(String) |
Records audio on the Voice Resource to the given file name and path.
| |
Record(Int32, Byte) |
Records to a memory buffer.
| |
RecordAndFollowConversation(String, RoutableResource) |
Follows a resource's route and records both the resource and what it is routed to.
| |
RecordAndFollowConversation(Int32, Byte, RoutableResource) |
Follows a resource's route and records both the resource and what it is routed to.
| |
RecordConversation(String, RoutableResource, RoutableResource) |
Records two routable resources, summing them together into the same file. You can specify channels and/or a voice resources.
| |
RecordConversation(Int32, Byte, RoutableResource, RoutableResource) |
Records two routable resources, summing them together into a buffer. You can specify channels and/or a voice resources.
| |
RecordConverstation(String, RoutableResource, RoutableResource) | Obsolete.
Records two Routable Resources, summing their audio together into the designated file. You can specify Channels and/or Voice Resources.
| |
RecordConverstation(Int32, Byte, RoutableResource, RoutableResource) | Obsolete.
Records two Routable Resources, summing their audio together into a buffer. You can specify Channels and/or Voice Resources.
| |
RouteFull(TelephonyLinkInfo) |
This overload is for Voice Elements Internal Use Only! To correctly route, use the
Full Route Method.
(Inherited from RoutableResource.) | |
RouteFull(RoutableResource) |
Completes a full route between two Routable Resources. Both channels then listen to each other.
(Inherited from RoutableResource.) | |
RouteHalf(TelephonyLinkInfo) | This overload is for Voice Elements Internal Use Only! To correctly route, use the
Half Route Method. (Inherited from RoutableResource.) | |
RouteHalf(RoutableResource) |
Completes a half route between two Routable Resources. The channel calling this method listens to the one in the parameter, the second cannot hear.
(Inherited from RoutableResource.) | |
SetConferenceAGCLevels |
Sets the levels for the AGC in conferencing. If all values are set to negatives, then the system wide AGC applies.
(Inherited from RoutableResource.) | |
SetConferenceECTailDelay |
Sets the Echo Tail Delay in conferencing.
(Inherited from RoutableResource.) | |
SetConferenceFEGLevel |
Sets the front end gain in conferencing. If set to 0, front end gain is turned off.
(Inherited from RoutableResource.) | |
SetMonitorStream | ||
Stop | ||
StopAllListeners |
Forces all Routable Resources currently listening to this resource to stop.
(Inherited from RoutableResource.) | |
StopListener |
Forces a apecific Routable Resource currently listening to this resource to stop.
(Inherited from RoutableResource.) | |
StopListening |
Forces this resource to stop listening to all Routable Resources.
(Inherited from RoutableResource.) | |
TddDetectionStart |
Starts the detection of a TDD device for the hearing impaired.
| |
TddDetectionStop |
Starts the detection of a TDD device for the hearing impaired.
| |
TerminationCodeFlag |
A Termination Code flag indicating how the last voice function (i.e. Play) ended. Typically, you will use this to determine what to do next.
| |
WipeDigitBuffer |
Forcibly clears all digits in the buffer from previous inputs. This is useful to ensure the buffer is clean before doing a Get Response
or Get Digits.
|
Name | Description | |
---|---|---|
Digit |
This event fires when a digit is detected on the voice resource if the Enable Digit Events Property is set to true.
|
public void ExecuteChannelMethods() { // To get a channel, you must first get a link to a Telephony Server. You may need to pass a username password here. TelephonyServer m_TelephonyServer = new TelephonyServer(); // Get your channel resource from the server ChannelResource m_ChannelResource = m_TelephonyServer.GetChannel(); // Example 1: Dial an oubound call string phoneNumber = "2135551212"; m_ChannelResource.Dial(phoneNumber); // Next, use the voice resource of the channel to do some more things // First, play an audio file m_ChannelResource.VoiceResource.Play(@"C:\Audio\Sample.wav"); // Get digits from the caller TerminationCode terminationCode = m_ChannelResource.VoiceResource.GetDigits(); string m_Digits = m_ChannelResource.VoiceResource.DigitBuffer; // Play text to speech to the caller m_ChannelResource.VoiceResource.PlayTTS("Hello, this is your application speaking. Please say whatever you like."); // Record the callers response to the file specified m_ChannelResource.VoiceResource.Record(@"C:\Audio\RecordedCall.wav"); }