Skip to main content

Overview

BotSpeechObserver reports each piece of text the bot will speak, as the TTS service produces it and ahead of playback, and the end of the bot’s speech with whether it was interrupted. A TTS service that reports word timestamps produces one word at a time, each with a presentation timestamp (pts) saying when its audio is due at the transport. A service that doesn’t produces text in the pieces it generates, often a sentence, with no pts. Expression sounds and pauses are left out, since the bot doesn’t say them as words. After an interruption, text of the cut-off reply is left out until the TTS service starts its next reply. Uninterruptible text plays on, so it is still reported.

Events

Both handlers run in order on the observer’s task, so they need to be fast.

Usage

Configuration

Constructor Parameters

Any
Additional arguments passed to the parent BaseObserver.