pipecat-floe
Floe services for Pipecat. One Floe key for the LLM, STT, and TTS legs of a voice agent — metered per call with pre-call spend caps.
Three drop-in Pipecat services:
FloeLLMService— OpenAI-compatible LLM routed through Floe.FloeTTSService— OpenAI-compatible text-to-speech routed through Floe.FloeSTTService— streaming speech-to-text over Floe's WebSocket.
Install
pip install pipecat-floe
This pulls in pipecat-ai, websockets, httpx, and loguru. For the
example bot you also want a transport + VAD:
pip install "pipecat-ai[silero,websocket]"
Pipecat version compatibility
Built and verified against pipecat-ai 1.7.0 (Python 3.11+). The services
subclass Pipecat's own OpenAILLMService, OpenAITTSService, and
WebsocketSTTService. Those base classes are stable, but Pipecat's import paths
and constructor kwargs do shift between releases — pin pipecat-ai and
re-verify when you upgrade.
Quickstart
One key powers all three legs. Set FLOE_API_KEY in your environment (get a key
at dev-dashboard.floelabs.xyz) and:
from pipecat_floe import FloeSTTService, FloeLLMService, FloeTTSService
stt = FloeSTTService() # streaming STT (WebSocket)
llm = FloeLLMService(model="openai/gpt-4o-mini") # OpenAI-compatible
tts = FloeTTSService(model="openai/tts-1", voice="alloy")
# ...then drop stt / llm / tts into a Pipecat Pipeline as usual.
Three legs, one Floe key, one budget. Each service reads FLOE_API_KEY from the
environment (or pass api_key=...). A single spend cap on the agent bounds the
whole run — STT, LLM, and TTS together.
See examples/bot.py for a runnable pipeline wiring a
WebSocket transport → STT → LLM → TTS.
Run the example
cd examples
pip install -r requirements.txt
cp .env.example .env # fill in FLOE_API_KEY
python bot.py # WebSocket server on ws://localhost:8765
Connect an audio WebSocket client to ws://localhost:8765 and talk. Full
instructions in examples/README.md.
Public API
FloeLLMService(
*, model="openai/gpt-4o-mini", api_key=None,
base_url="https://credit-api.floelabs.xyz/v1", task_id=None, **kwargs
)
FloeTTSService(
*, model="openai/tts-1", voice="alloy", api_key=None,
base_url="https://credit-api.floelabs.xyz/v1", task_id=None, **kwargs
)
FloeSTTService(
*, model="deepgram/nova-3", encoding="linear16", sample_rate=16000,
language="en", api_key=None,
base_url="wss://credit-api.floelabs.xyz/v1/audio/transcriptions/stream",
**kwargs
)
api_keydefaults to theFLOE_API_KEYenvironment variable; aValueErroris raised if neither is set.task_id(LLM/TTS) tags calls with anX-Floe-Task-Idheader so a per-task budget can bound one conversation.**kwargspass through to the underlying Pipecat base class (temperature, custom settings, keepalive, reconnect options, ...).
Limits / footguns
| Limit | Detail |
|---|---|
| STT is a dedicated plugin, not a base-URL swap | The LLM and TTS legs are OpenAI-compatible base-URL swaps. Streaming STT is not — FloeSTTService speaks Floe's own WebSocket protocol (raw PCM up, JSON transcripts down). You cannot point Pipecat's OpenAISTTService at Floe for streaming. |
| Model IDs must be fully qualified | Use provider/model, e.g. openai/gpt-4o-mini, anthropic/claude-sonnet-4-6, deepgram/nova-3, openai/tts-1. A bare gpt-4o-mini will be rejected by Floe. |
| STT audio format | PCM only, in the declared encoding (linear16 / mulaw / alaw) at sample_rate 8000–48000. Pipecat delivers linear16 PCM by default, which matches. |
| TTS sample rate | The underlying OpenAI TTS service emits 24 kHz PCM; passing a different sample_rate logs a warning. |
task_id on TTS |
Attached via a custom httpx client's default headers. If you pass your own http_client, task_id is ignored for TTS (add the header to your client yourself). |
| Welcome credit | A new Floe agent key comes with welcome credit that covers the first calls. After that, keep the agent funded or capped — an empty balance surfaces as a {"type":"error","code":"insufficient_balance"} on STT and an error frame on LLM/TTS. |
| Pipecat version | Pinned to pipecat-ai 1.7.0 (see above). Re-verify on upgrade. |
How it works
- LLM / TTS — thin subclasses of Pipecat's
OpenAILLMService/OpenAITTSServicepointed athttps://credit-api.floelabs.xyz/v1with your Floe key. Streaming, metrics (usage + TTFB), and OpenTelemetry tracing are inherited unchanged. - STT — a subclass of Pipecat's
WebsocketSTTService(the same base used by Deepgram and Gladia). It openswss://credit-api.floelabs.xyz/v1/audio/transcriptions/streamwith anAuthorization: Bearer <FLOE_API_KEY>header, streamsframe.audioPCM up, and mapsis_final:false→InterimTranscriptionFrame,is_final:true→TranscriptionFrame. A server{"type":"error"}is pushed to the pipeline as anErrorFrameand the stream is torn down cleanly. Reconnect-with-backoff and audio buffering come from the base class.
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipecat_floe-0.1.0.tar.gz.
File metadata
- Download URL: pipecat_floe-0.1.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5160f4eeec4ac15a67a6fb8861125d7ec699a75a3119300f362d9b4f09aa051e
|
|
| MD5 |
6125864a9addccdb03f4c01782b77c17
|
|
| BLAKE2b-256 |
88653dd601abff722a0d4e3d2ab4d3750a3f24a36dc81280db43f26c3b2e6ab6
|
File details
Details for the file pipecat_floe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pipecat_floe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1a09c25ad00eb2c09de93654435bdc2cda31aeb8760a7fde7f3ab1f0c9a834c
|
|
| MD5 |
beac1407fe4626946b0e0476e86a4f7f
|
|
| BLAKE2b-256 |
503200e32d0f9d493f09376c3d36b6ac3cb65d9fe9ade2666cac87ee8015b026
|