The tflush instruction outputs the speech buffer unconditionally.
Synopsis
tflush([ must_hear_flag ][, wait_indicator ][, remember_flag ])
Description
Phrases specified by a script to be spoken with the talk, ftalk, tchars, or tnum instruction are queued (that is, not spoken) pending the encounter of a tflush instruction or a data gathering instruction.
The accepted values for the arguments are:
must_hear_flag
|
0 |
Touch tones entered during play or voice coding cause play or voice coding to stop (default). |
1 |
Touch tones entered during play or voice coding do not cause play or voice coding to stop. |
|
wait_indicator
|
0 |
Wait for the play to complete before continuing script execution (default). |
1 |
Do not wait for the play to complete. Continue script execution. |
|
remember_flag
|
1 |
Remember phrases played by this instruction so they may be played again with the talkresume instruction. |
0 |
Do not remember the speech. |
The must_hear_flag option, when set to a non-zero value, disables talkoff so that any speech activity (voice play or voice coding) on the current channel is not stopped by touch tones. When using this option with speech play-related instructions (talk, ftalk, tnum, or tchars), tflush(1) should follow those instructions. When using this option with voice coding (vc), tflush(1) should precede the vc instruction. The talkoff is enabled automatically by the next wait-causing instruction in the script.
The tflush instruction returns a value in register 0. If that value is negative, an error occurred. If that value is +1, play complete occurred because of talkoff. If the value is 0, play has completed successfully.
Examples
In the following example, the script wants the caller to hear music while it processes the transaction with the host computer. After this processing completes, the music is stopped, and the caller is informed of the results and asked to continue entering commands. The tflush instruction does not remember the phrases played by the instruction.
...................................................
talk(int.MUSIC) /* Play music to the caller */
tflush(1,1,0) /* Do not let touch tones turn off music and don't wait*/
dbase(0,FUDB,ch.ACCOUNT_ID,8,int.SELL_PRICE, 4) /* Get info from host */
tstop(1)
talk("Your account has now been credited with Avaya stock for the price of")
tnum(int.SELL_PRICE)
talk("Enter your next instruction")
getinput(ch.DIG,2)
............. ...........................
In the following example, any touch tones entered are encoded along with the speech.
.......... ......................................
tflush(1) /*do not end coding if user enters touch tones*/
vc('b',10,ADPCM32)
See also