Skip to main content

pipecat-deapi

deAPI services for Pipecat:

  • DeAPILLMService: chat models served through deAPI's OpenAI-compatible API, with streaming and tool calling.
  • DeAPISTTService: speech-to-text on deAPI's synchronous transcription endpoint. The transcript comes back in the same response, with automatic language detection.
  • DeAPITTSService: text-to-speech with deAPI's voices (Kokoro and others).

Demo

The clip above is a real-time recording of the pipeline in demo/: a scripted user asks a question, the agent calls a function and answers, then gets interrupted mid-story. The full video with sound is demo/demo.mp4.

This integration is maintained by deAPI Inc., the company that runs the deAPI service.

Installation

pip install pipecat-deapi

or uv add pipecat-deapi.

You also need a deAPI API key. Create one in the deAPI panel and set it as DEAPI_API_KEY.

Usage

All three services take the same key and drop into a Pipecat pipeline like any other service:

import os

from pipecat.pipeline.pipeline import Pipeline
from pipecat_deapi import DeAPILLMService, DeAPISTTService, DeAPITTSService

stt = DeAPISTTService(api_key=os.environ["DEAPI_API_KEY"])

llm = DeAPILLMService(
    api_key=os.environ["DEAPI_API_KEY"],
    settings=DeAPILLMService.Settings(
        model="qwen3.8-flash",
        system_instruction="You are a helpful assistant in a voice conversation.",
    ),
)

tts = DeAPITTSService(
    api_key=os.environ["DEAPI_API_KEY"],
    settings=DeAPITTSService.Settings(voice="af_nova"),
)

pipeline = Pipeline(
    [
        transport.input(),
        stt,
        user_aggregator,
        llm,
        tts,
        transport.output(),
        assistant_aggregator,
    ]
)

LLM

Setting Default Notes
model qwen3.8-flash Any chat model from GET https://oai.deapi.ai/v1/models
reasoning_effort "none" none, minimal, low, medium, high, xhigh, max, or None for the model's own default

deAPI's chat models reason before they answer, and that pass runs before the first spoken token. The service therefore turns reasoning off by default. Raise reasoning_effort when the task needs working out:

llm = DeAPILLMService(
    api_key=os.environ["DEAPI_API_KEY"],
    settings=DeAPILLMService.Settings(model="qwen3.8-max", reasoning_effort="low"),
)

Not every model accepts every value. glm-5.3 takes only low, high and max, so set one of those when you use it; gpt-6-luna does not take minimal. The API rejects an unsupported value with the list of values the model supports. All other OpenAILLMService settings (temperature, max_tokens, tools, and so on) work unchanged.

Speech-to-text

DeAPISTTService is a segmented service: the pipeline's VAD marks where the user stops speaking, the segment is uploaded, and one TranscriptionFrame is pushed with the transcript. It needs a VAD analyzer in the pipeline, as in the example.

  • Model: FluidSpeechPro (the default and, today, the only synchronous model).
  • The clip length limit is the API's: a longer segment is refused with the API's message, which states the current limit, and comes back as an ErrorFrame.
  • The language is detected automatically and reported on the frame.
  • One final transcript is pushed per segment.
  • Billing is per second of audio; a segment with no speech returns nothing.

Text-to-speech

Setting Default Notes
model Kokoro Also Chatterbox, Qwen3_TTS_12Hz_1_7B_CustomVoice, Qwen3_TTS_12Hz_1_7B_VoiceDesign
voice af_nova Voices belong to the model. On Kokoro the prefix picks the language (af_/am_ US English, bf_/bm_ British English, ef_/em_ Spanish, and more); the OpenAI voice names work too
speed model default Speed multiplier; the accepted range depends on the model, and the API rejects a value outside it
instructions not set A description of the voice, for the voice-design model only
language from the voice Set it to override the language chosen from the voice

Each sentence is synthesized as one complete audio file and played as soon as it arrives.

Running the example

examples/voice_agent.py is a complete voice agent on deAPI alone: speech-to-text, an LLM with a function call, and the voice.

pip install pipecat-deapi "pipecat-ai[silero,webrtc,runner]" python-dotenv
export DEAPI_API_KEY=sk-dp-...
python examples/voice_agent.py

Then open http://localhost:7860 and talk to the agent.

Compatibility

Tested with Pipecat v1.17.0 on Python 3.12. Requires pipecat-ai 1.x.

Development

pip install -e ".[dev]"
pytest
ruff check . && ruff format --check .

DEAPI_API_KEY in the environment also runs the live tests; without it they are skipped.

To record the demo again: python demo/record_demo.py, then python demo/render_video.py (needs ffmpeg). It runs the real pipeline with a scripted user and costs a few cents.

License

BSD 2-Clause. See LICENSE.

Metadata

Release files for pipecat-deapi 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-deapi 0.1.0
File Size Uploaded Provenance Actions
pipecat_deapi-0.1.0.tar.gz 125.7 kB With provenance Details for pipecat_deapi-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 137.6 kB

Release files / pipecat_deapi-0.1.0.tar.gz

Download URL pipecat_deapi-0.1.0.tar.gz
Size 125.7 kB
Tags Source
SHA-256 checksum
How to use checksums
669b680e020e6cf87fc29cfd05d2538f5430f8fcf0bb04a0d98a779438244d5d
BLAKE2b-256 checksum
How to use checksums
2115253ec91ba8a7ce1b5ed39b0982cbf658dfef7599c1e25ada810473fa20fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

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

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

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 Dec 1, 2026.

Transparency log

Security for pipecat-deapi 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pipecat_deapi-0.1.0.tar.gz

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 Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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