VoiceDSPEvents
Add the following line to your scenario code to use the events:
require(Modules.Agentic);
Constants
Contains information about connector.
Parameters
data:
Object
OptionalThe event's data.
voiceDSP:
The Agentic.VoiceDSP instance.
The error response event.
Parameters
reason:
string
The error reason.
voiceDSP:
The Agentic.VoiceDSP instance.
Triggered when the user has been idle for Agentic.VoiceDSPParameters.userTurnIdleTimeout after Agentic.VoiceDSP.signalAssistantTurnEnded (mirrors Pipecat on_user_turn_idle). Can fire multiple times if the scenario calls Agentic.VoiceDSP.signalAssistantTurnEnded again after handling each idle event.
Parameters
voiceDSP:
The Agentic.VoiceDSP instance.
Triggered when a stop strategy has enough signal to start LLM inference for the current turn (mirrors Pipecat on_user_turn_inference_triggered). Fires before Agentic.VoiceDSPEvents.TurnStopped when Agentic.VoiceDSPParameters.asr is configured and the turn analyzer completes before the final transcript arrives. Agentic.VoiceDSPParameters.asrGraceTimeout starts from this event.
Parameters
strategy:
string
The type of the Agentic.VoiceDSPStrategies.Stop strategy that triggered inference (for example Agentic.VoiceDSPStrategies.TurnDetectorStop.type). Always a configured Agentic.VoiceDSPParameters.stopStrategies entry; 'turn_detector' is used only when Agentic.VoiceDSPStrategies.TurnDetectorStop is configured. When the user-turn-stop watchdog force-stops, this is the pending or configured fallback strategy and Agentic.VoiceDSPEvents.TurnStopTimeout is emitted with reason controller_timeout.
voiceDSP:
The Agentic.VoiceDSP instance.
Triggered when the user's turn starts (mirrors Pipecat on_user_turn_started). Only fires when Agentic.VoiceDSPParameters.startStrategies are configured via Agentic.createVoiceDSP.
Parameters
interrupted:
boolean
Indicates whether the user interrupted the bot (i.e., the bot was speaking when the turn started). Requires the scenario to call Agentic.VoiceDSP.signalAssistantTurnStarted / Agentic.VoiceDSP.signalAssistantTurnEnded around assistant playback. Independent of enableInterruptions on Agentic.VoiceDSPStrategies.Start (for example Agentic.VoiceDSPStrategies.VADStart.enableInterruptions).
strategy:
string
The type of the Agentic.VoiceDSPStrategies.Start strategy that triggered the turn start (for example Agentic.VoiceDSPStrategies.VADStart.type).
voiceDSP:
The Agentic.VoiceDSP instance.
Triggered before Agentic.VoiceDSPEvents.TurnStopped when a turn stop timeout fires. reason is stop_secs when the turn analyzer classified the turn as incomplete and silence exceeded Agentic.TurnDetectorParameters.stopSecs, or controller_timeout when no stop strategy finalized the turn within Agentic.VoiceDSPParameters.userTurnStopTimeout.
Parameters
reason:
stop_secs
stop_secs when silence exceeded Agentic.TurnDetectorParameters.stopSecs; controller_timeout when no stop strategy finalized the turn within Agentic.VoiceDSPParameters.userTurnStopTimeout.
voiceDSP:
The Agentic.VoiceDSP instance.
Triggered when the user's turn ends with the accumulated transcript (mirrors Pipecat on_user_turn_stopped).
Parameters
content:
string
The complete transcribed text from the user's turn. May be empty when transcription is not configured.
probability:
number
The turn-detector probability in the range [0.0, 1.0]. 0 when the turn was ended by the Agentic.TurnDetectorParameters.stopSecs fallback or a Agentic.VoiceDSPStrategies.SpeechTimeoutStop strategy.
strategy:
string
The type of the Agentic.VoiceDSPStrategies.Stop strategy that triggered the turn stop (for example Agentic.VoiceDSPStrategies.TurnDetectorStop.type). Always a configured Agentic.VoiceDSPParameters.stopStrategies entry; 'turn_detector' is used only when Agentic.VoiceDSPStrategies.TurnDetectorStop is configured. When the user-turn-stop watchdog force-stops, this is the pending or configured fallback strategy.
timestamp:
string
ISO 8601 timestamp indicating when the user turn started.
transcriptState:
final
OptionalOptional. Whether content is a final or interim transcript snapshot. Present when Agentic.VoiceDSPParameters.asr is passed for turn-strategy wiring. Use ASREvents on your scenario ASR instance for live transcription updates.
voiceDSP:
The Agentic.VoiceDSP instance.