Skip to main content

Module service

Module service 

Source
Expand description

Service-processor trait signatures the cascaded path builds against (PROCESSOR-DESIGN §6.1) + no-op mock impls + the audio-intelligence traits.

These traits are frozen here so providers and the audio-intelligence layer build against a stable surface. The core ships only the trait + a mock impl of each, and the mock cascaded pipeline fixture test (mock-STT → mock-LLM → mock-TTS through a real Pipeline) that provider crates extend.

Modules§

adapters
Service-processor adapters — the public FrameProcessor wrappers that lift a frozen SttService/LlmService/TtsService (in crate::service) into a pipeline node.

Structs§

MockLlm
A mock LLM: echoes the last user transcription back as a single LLM text + response framing. Provider implementations replace this with real backends.
MockStt
A mock STT: turns any audio chunk into a fixed final transcription. Provider implementations replace this with real backends.
MockTts
A mock TTS: turns text into a TtsStarted + one TtsAudio chunk (silence sized to the text length) + TtsStopped. Provider implementations replace this with real backends.
TurnPrediction
An end-of-turn prediction. Mirrors pipecat’s turn-analyzer output.

Enums§

VadState
VAD classification of a frame of audio. Mirrors pipecat VADState.

Traits§

LlmService
Context-driven LLM. Consumes LlmContext/LlmRun, emits LlmResponseStart, LlmText*, optional FunctionCallsStarted, LlmResponseEnd.
RealtimeLlmService
The realtime S2S contract (today’s crate::realtime::RealtimeLlm — UNCHANGED shape, restated as the canonical service trait the processor wraps).
SttService
Streaming speech→text. Consumes InputAudio, emits InterimTranscription then final Transcription. Mirrors pipecat STTService.
TtsService
Streaming text→speech. Consumes TtsSpeak/Text, emits TtsStarted, TtsAudio*, TtsStopped. Mirrors pipecat TTSService.
TurnAnalyzer
End-of-turn / semantic-completion analyzer. Mirrors pipecat BaseTurnAnalyzer (Smart-Turn v2/v3 is the reference impl).
VadAnalyzer
Voice-activity detector. Mirrors pipecat VADAnalyzer. Silero (ONNX/ort) is the reference impl (behind the vad-ort feature — the trait is always here).

Type Aliases§

RealtimeServiceSetup
Connection-time setup for a RealtimeLlmService — the realtime S2S contract (today’s crate::realtime::RealtimeLlm, restated as the canonical service trait the processor wraps). Aliased to the existing RealtimeSetup.
Tool
A tool declaration for the cascaded LLM service (alias to the existing ToolDecl data shape so the realtime + cascaded paths agree).