Method: VoicePromptTrain


Function:

 

Train a voice prompt like "The subscriber yo dialed is busy now..." so that voiceangel can recognize it later.

Form:
  VoicePromptTrain(telNum as string, WaveFileToRecordRingbacktone as string)

Parameters:

 

TelNum as String
    The number to dial. This number is expected to give a voice prompt like "The subscriber yo dialed is busy now..."after dialed.
VoicePromptID
    The identifier of the voice prompt. It should be a number bigger than 0.

VoicePromptDescription
    The description of the voice prompt. It may be like "CDMA busy prompt" or "GSM Power off prompt"
WaveFileToRecordRingBackTone as String
   If WaveFileToRecordRingBackTone is not an empty string, a wave file will be created to record ring back tone in the call progress. The record process will continue until Drop method called. If WaveFileToRecordRingBackTone is an empty string, no file will be recorded . The recorded wave file can be used to analyze the feature of the ring back tone. You can play the wave file by StartPlaying(3,false) to simulate the call progress. The same call status event will occur as the actual call.

     

Description:

 

A CALLSTATUS_VOICE_PROMPT_TRAINED will occurs in CallStatus event when a voiceprompt has been recognized. VoicePromptID, VoicePromptDescription and the feature of the voice prompt will be write into knowledge.inf. Later when dial method called, it will recognize the same voice prompt.

     

Dependencies:

 

None

     

Events Raised:

 

CALLSTATUS_VOICE_PROMPT_TRAINED message in CallStatus event

     
     

Sample Code In Visual Basic

The following code makes a call to telephone number : 0518 6211691

Sub cmdVoicePromptTrain_Click()

   VoiceAngel1.CurrentLineIndex = 0

   VoiceAngel1.voicePromptTrain "05186211691", 1,"CDMA Busy Prompt", "d:\cdmabusy.wav"

End sub