saiNotifyBargeInToSynthesizer

Notifies the synthesizer that a barge-in occurred.

Prototype

DWORD saiNotifyBargeInToSynthesizer ( SAI_SYNTHESIZER_HANDLE synthHd, SAI_PROXY_SYNC_ID proxySyncId, SAI_REQUEST_ID *requestId )

Argument

Description

synthHd

Handle associated with a synthesizer resource.

proxySyncId

When a recognizer is used to detect a barge-in, a proxySyncId value is received from the recognizer engine through SAIEVN_START_OF_SPEECH. Use saiNotifyBargeInToSynthesizer to return the proxySyncId to the synthesizer.

requestId

Pointer to a unique identifier associated with the request.


Return values

Return value

Description

SUCCESS

 

SAIERR_ENGINE_NOT_READY

Specified synthesizer engine is not ready to handle the request.

SAIERR_INVALID_PARAMETER

One of the specified arguments is invalid.


Events

Event

Description

SAIEVN_TTS_NOTIFY_BARGE_IN_DONE

Request was processed. The result of the request is returned in the statusCode field of the SAIEVN_TTS_NOTIFY_BARGE_IN_DONE event buffer.


Details

saiNotifyBargeInToSynthesizer enables the application to inform a synthesizer when a barge-in occurrence is detected, such as detected DTMF or speech input.

Before using saiNotifyBargeInToSynthesizer, the application must enable the kill-on-barge-in flag with saiTtsSetKillOnBargeIn (set value = TRUE) prior to calling saiSpeakSynthesizer. Otherwise, the synthesizer rejects the call by returning a failure indication in the SAIEVN_TTS_NOTIFY_BARGE_IN_DONE event buffer.

The application must call saiNotifyBargeInToSynthesizer even if it receives the BARGE-IN signal from the recognizer. The application cannot assume that the signal detector and the synthesizer engine are connected. When invoking saiNotifyBargeInToSynthesizer, the application must specify the proxySyncId returned within SAIEVN_START_OF_SPEECH.

For more information, refer to Implementing a barge-in enabled prompt.

See also

saiGetResultRecognizer, saiStartRecognizer