pipecat-boson package exposes Higgs Realtime as a Pipecat speech-to-speech LLMService. It receives live audio or text, manages the conversation, calls tools, and streams audio or text responses. A voice pipeline does not need separate STT, LLM, and TTS services.
Model
WebSocket endpoint
Before you begin
You need:- Python 3.11 or newer
- A Boson API key stored in
BOSON_API_KEY - Access to the Higgs Realtime API
- An existing Pipecat application with an audio transport
Install the package
During the preview, install the package from GitHub. The repository might still be private, in which case you need a GitHub account with access:git+https://github.com/boson-ai/pipecat-boson.git.
To develop the package or run its included example:
uv project:
pipecat-ai>=1.4.0,<2.
Configure the connection
Set the API key, WebSocket endpoint, and model ID in your server environment:Add the service to a pipeline
The following example assumes thattransport is an existing Pipecat audio transport:
realtime_service_mode=True lets the context aggregators follow the server-driven turn lifecycle. Do not add separate STT or TTS services around BosonRealtimeLLMService.
Call run_bot(transport, llm) from your application’s async entry point.
Run the browser example
From the repository checkout created above, copy the example environment file:BOSON_API_KEY, BOSON_REALTIME_URL, and BOSON_REALTIME_MODEL in .env, then start the example:
http://localhost:7860 and connect your microphone. Use the WebSocket transport if WebRTC ICE cannot reach the server, and select WebSocket in the page before connecting. Both commands use the webrtc extra because it also installs the Pipecat runner used by the browser example.
Receive user transcripts
Set an input transcription model to receive finalized user transcripts as PipecatTranscriptionFrame objects. See Model selection for what transcription adds to a session:
input_audio_transcription, passing None, or passing a dictionary without a non-empty model suppresses client-facing user transcript events. Higgs Realtime still understands the audio and can respond.
Call Python functions
Declare an async Python function with typed arguments and return its result throughresult_callback:
LLMContext keeps the tool definitions with the conversation state. After the function completes, Higgs Realtime continues the response with its result.
For the underlying event flow, see Tool use.
Configure turn detection
Server VAD is enabled by default. It detects the end of the user’s turn, creates a response, and interrupts an active response when the user starts speaking. For most voice agents, keep the default settings — see Turn detection and interruptions for what each parameter does.- Server VAD
- Semantic VAD
Override the thresholds only when the default behavior does not fit the application:
Use text-only output
Passoutput_modalities=["text"] when constructing the service. Text-only sessions emit streamed LLMTextFrame objects and no audio frames.
The service supports exactly one session output modality: ["audio"] or ["text"]. Mixed output modalities and per-response modality overrides are not supported.
Handle session events
Use Pipecat service event handlers to observe the Higgs Realtime session lifecycle:register_session_handlers(llm) before starting WorkerRunner. The integration reports terminal session events but does not close the Pipecat transport automatically.
Keep
on_session_created handlers fast. Session setup waits for this handler to return.on_session_terminated receives session.idle_timeout or session.max_duration_reached.
Supported options
Connection options:
Optional session settings supported by Higgs Realtime:
This Pipecat integration sends and receives 24 kHz PCM audio.
Next steps
Connections and sessions
Understand the session settings these options map to.
Realtime API reference
Look up the underlying protocol, event catalog, and payload schemas.
Pipecat documentation
Transports, processors, and the rest of the Pipecat framework.