Skip to main content

pipecat-thunderphone

Run a ThunderPhone voice agent inside a Pipecat pipeline.

ThunderPhone is a speech-to-speech service in Pipecat terms: audio in, audio out, with speech recognition, the language model, the voice, turn-taking, 47 languages and function calling handled on ThunderPhone's side. You bring the transport (Daily, LiveKit, Twilio, a WebRTC page, a phone line) and Pipecat does the plumbing. Billing is ThunderPhone's per-minute engine rate; there is no subscription.

pip install pipecat-thunderphone

Use a saved agent

The agent's prompt, voice, engine, languages, tools, greeting and silence handling all come from ThunderPhone. The pipeline only moves audio.

from pipecat_thunderphone import ThunderPhoneRealtimeLLMService

llm = ThunderPhoneRealtimeLLMService(agent_id=12)  # reads THUNDERPHONE_API_KEY

context = LLMContext()
aggregators = LLMContextAggregatorPair(context)
pipeline = Pipeline([
    transport.input(),
    aggregators.user(),
    llm,
    aggregators.assistant(),
    transport.output(),
])

The saved agent opens the call itself, so the service skips the first response.create Pipecat would normally send. Pass greet_on_connect=True to request an opening response anyway.

Inline configuration

Instructions and tools come from the Pipecat context, exactly as with the OpenAI Realtime service. product picks the engine and voice the voice.

llm = ThunderPhoneRealtimeLLMService(
    api_key="sk_live_...",
    product="bolt",          # spark | bolt | storm
    voice="olivia",
    language="es",
)

async def get_weather(params: FunctionCallParams):
    await params.result_callback({"conditions": "sunny"})

llm.register_function("get_weather", get_weather)

context = LLMContext(
    messages=[{"role": "system", "content": "You are Acme Dental's receptionist."}],
    tools=ToolsSchema(standard_tools=[weather_schema]),
)

Inline sessions are client-steered: the agent speaks first because Pipecat requests a response when the context arrives, and it stays quiet during silence unless you append a message or request another response.

What the service handles for you

  • The ThunderPhone URL and query (agent_id, product, language, from_number, to_number) and 24 kHz PCM in both directions.
  • Secret-key auth (sk_live_...); the constructor rejects anything else early.
  • Saved-agent sessions: pipeline instructions, tools and voice are dropped from session.update so they cannot collide with the agent's own configuration (the server would reject them).
  • ThunderPhone's call.* platform events, which Pipecat's parser does not know. call.ended pushes an EndWorkerFrame upstream so the pipeline finishes; set end_task_on_call_ended=False to handle it yourself. Every such event is also delivered to the on_call_event handler, and call.ended to on_call_ended.
  • Non-fatal error events for rejected session fields are logged as warnings rather than ending the session.
  • service.call_id holds the ThunderPhone call id once the session is live, for fetching the recording, transcript and grade afterwards via GET /v1/calls/{call_id}.

Limits

  • Turn detection is server-side and always on. turn_detection=False (Pipecat-driven turns) is not supported.
  • Tools registered on the service run only for inline sessions. A saved agent executes its own tools on ThunderPhone.
  • live_transcripts=True streams caller transcript fragments while the caller speaks; it is billed extra per ThunderPhone pricing.
  • Video frames are ignored.

Compatibility

Tested with Pipecat v1.8.1 (requires pipecat-ai>=1.8). Python 3.11+.

About

Built and maintained by ThunderPhone (Autophonix, Inc.), the company behind the service. Issues and pull requests are welcome in this repository; ThunderPhone platform questions go to support@thunderphone.com.

Source

https://github.com/autophonix/pipecat-thunderphone — issues and pull requests welcome.

Development

pip install -e ".[dev]"
pytest

The tests run against a scripted stand-in for the ThunderPhone realtime server; inside the ThunderPhone monorepo they also check that every event the real server emits parses in Pipecat.

Release files for pipecat-thunderphone 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipecat-thunderphone 0.1.0
File Size Uploaded
pipecat_thunderphone-0.1.0.tar.gz 16.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pipecat-thunderphone 0.1.0
File Interpreter ABI Platform
pipecat_thunderphone-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.1 kB

Release files / pipecat_thunderphone-0.1.0.tar.gz

Download URL pipecat_thunderphone-0.1.0.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e86a3f3373d8b776073bfdef66bffd735c868072ed9dccaf1c76e1de3b15ac3b
BLAKE2b-256 checksum
How to use checksums
52d891a8087f29887e1047b09cff2d88abf03710748b7bd6a64f4d285af8662e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release files / pipecat_thunderphone-0.1.0-py3-none-any.whl

Download URL pipecat_thunderphone-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1b3c208cd13a2de2fa6da4d802e822b107b080c9001de3e4bf7b3471fb9aa61
BLAKE2b-256 checksum
How to use checksums
96a5b3b8433f35952dc44b27e363137828811ef46c23381040bec9d2a211be34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page