Expand description
pipecrab-tts: the text-to-speech interface.
Synthesizer is the swappable TTS capability the conversation loop drives:
text in, audio out incrementally — every stream item is a preemption point,
so a barge-in Interrupt can stop
playback within a single chunk. Concrete engines stay behind it, so the
pipeline never names one.
TtsStage adapts any Synthesizer into a pipeline
Stage: on a final agent
Transcript it synthesizes the text and streams
Audio chunks in its place; every other
frame passes through untouched.
SentenceChunker is the low-latency feeder that sits upstream of
TtsStage: it splits a streaming agent generation into one final agent
Transcript per sentence, so synthesis of the
first sentence can begin before the model has finished the last. This is why
a Final agent transcript is documented as
a generation unit that may in practice be a single sentence.
Platform-neutral and wasm32-checkable: the concrete engines live elsewhere
(a native engine, a browser engine in a Web Worker), each behind these
traits, so the interface itself carries no backend dependency and compiles for
both the host and wasm32-unknown-unknown.
Structs§
- Emit
Sentence - One completed sentence to forward as a final agent transcript:
SentenceChunker’sProcessor::Effect. Emitted bydecide_data, interpreted byperform. Its inner text is private — only the chunker constructs one. - Sentence
Chunker - Adapts a streaming agent generation into per-sentence final transcripts.
- Speak
- One piece of text to synthesize:
TtsStage’sProcessor::Effect. Emitted bydecide_data, interpreted byperform. Its inner text is private — only the stage constructs one. - TtsStage
- Adapts any
Synthesizerinto a pipelineStage: on a final agentTranscriptit synthesizes the text and streamsAudiochunks in its place; every other frame passes through untouched.
Enums§
- TtsError
- Why a
Synthesizer::synthesizecall failed.
Traits§
- Synthesizer
- The swappable text-to-speech capability: text in, audio out incrementally.
Type Aliases§
- TtsAudio
Stream - The audio a
Synthesizer::synthesizecall yields: a boxed stream ofAudioChunkresults, delivered incrementally.