Skip to main content

pipecat-akapulu

Pipecat processor for an Akapulu Labs talking avatar. Maintained by Akapulu Labs.

The AkapuluAvatar Pipecat plugin sits after your speech model. It sends assistant audio to the Akapulu Labs worker. The worker joins the Daily room for that call and publishes the avatar video and audio. Your voice bot itself does not publish camera or microphone.

Tested with Pipecat 1.14.0, 1.15.0, and 1.16.0. Requires Pipecat 1.12.0 or newer.

Install

uv add pipecat-akapulu

Use

create_akapulu_call runs on your server before the bot starts. It reads DAILY_API_KEY and AKAPULU_API_KEY. A missing or blank value raises. It creates a private Daily room for three participants, mints the browser, voice-bot, and worker tokens, and POST /api/live-sessions/. It returns the room URL, the bot token, the browser token, and session_id. The worker token is sent to Akapulu Labs and is not returned. The browser joins as You. The worker joins as Avatar. Daily shows the end user and the avatar. The voice bot is in the room and does not get its own tile. create_akapulu_call spawns an avatar worker. That worker can take 5 to 10 seconds to start up. The Daily room lasts two hours unless you pass room_exp_secs. Daily removes everyone when it expires.

from pipecat_akapulu import AkapuluAvatar, akapulu_daily_params, create_akapulu_call

room_url, bot_token, browser_token, session_id = await create_akapulu_call(
    avatar_id=avatar_id,
    show_ai_label=True,
    session=session,
)
avatar = AkapuluAvatar(session_id=session_id)

The bot joins Daily with bot_token. The browser joins with browser_token. Pass session_id to AkapuluAvatar.

A bot that already has a Daily room skips create_akapulu_call. Mint the avatar worker token and POST /api/live-sessions/ to Akapulu Labs with avatar_id, show_ai_label, room_url, and avatar_token. The response is session_id. The avatar worker joins the room as Avatar and publishes audio and video. Its token needs permission to send audio and video.

Use akapulu_daily_params() for the Daily transport so the voice bot does not publish audio or video. Call avatar.attach(transport) so the package unsubscribes this bot from the Avatar microphone and captures Avatar video for call_is_ready. Await wait_until_call_ready before greeting. Add AkapuluAvatar after your TTS processor so it forwards assistant audio to the avatar worker.

The avatar worker needs about 800 ms of assistant audio before it starts rendering the video. The render itself, given the audio, only takes around 150ms. You might see added latency in your bot's response even if your TTS provider's TTFA is low, due to this buffer accumulation. A TTS that trickles audio in slowly fills that buffer late, so the response is slower and the avatar gestures less. We recommend a TTS that sends audio in waves. Cartesia has been the best in our testing.

The AkapuluAvatar Pipecat plugin connects to the Akapulu Labs worker in the background. When the pipeline starts, it forwards StartFrame right away so your voice bot keeps moving. It does not wait for the first video frame.

While the Akapulu Labs worker boots, the plugin pushes RTVI server messages into your voice-bot pipeline. Each message body has type status and these fields:

  • call_is_ready: whether this tap has decoded enough Avatar video frames on the voice bot
  • completion_percent: how far startup has gotten (0 to 100)
  • latest_update_text: the latest human-readable startup line

Those are not Daily audio or video tracks. With RTVI on the call (for example @pipecat-ai/client-js in the browser), they arrive on the client as RTVI ServerMessage events over that same Daily connection. Use them for a loading spinner, percent, and copy. Keep the loading UI up until call_is_ready is true.

Example

examples/foundational.py calls create_akapulu_call, then runs the voice bot. Deepgram Flux (flux-general-multi) hears the caller. OpenAI gpt-5.4-mini speaks, with reasoning off. Cartesia Sonic 3.6 speaks each finished sentence, using the Carson male voice. AkapuluAvatar sits after that audio. It prints a join URL. Open that URL. Daily Prebuilt shows you and the avatar. The bot calls avatar.attach(transport) and greets after wait_until_call_ready. The browser stays subscribed to the Avatar microphone. The call starts in English. A later committed turn in another language switches Flux and Sonic.

The example uses Hollis, leaves This is AI off, and calls the Akapulu Labs production API.

The same voice stack, a local server, and a browser page are in akapulu-examples.

uv add "pipecat-ai[daily,deepgram,openai,cartesia]>=1.14.0" pipecat-akapulu

Set DAILY_API_KEY and AKAPULU_API_KEY. Also set DEEPGRAM_API_KEY, OPENAI_API_KEY, and CARTESIA_API_KEY. Then:

python examples/foundational.py

Metadata

Release files for pipecat-akapulu 0.1.21

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-akapulu 0.1.21
File Size Uploaded Provenance Actions
pipecat_akapulu-0.1.21.tar.gz 32.5 kB Without provenance Details for pipecat_akapulu-0.1.21.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pipecat-akapulu 0.1.21
File Interpreter ABI Platform Actions
pipecat_akapulu-0.1.21-py3-none-any.whl Python 3 none any Details for pipecat_akapulu-0.1.21-py3-none-any.whl

Total release size: 49.7 kB

Release files / pipecat_akapulu-0.1.21.tar.gz

Download URL pipecat_akapulu-0.1.21.tar.gz
Size 32.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e9aef573eed3f7ec678edf44f532600d838e55e7e07e5e9a88b1229219701374
BLAKE2b-256 checksum
How to use checksums
1d6d61bb059c0dadd3f8ac385235a3a21735dc29754c0f61ce09366abb5ca662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / pipecat_akapulu-0.1.21-py3-none-any.whl

Download URL pipecat_akapulu-0.1.21-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
243cf51fe625515958246dd78d7cb08fdf1a817667b64c7b3f689d9eec5cfc69
BLAKE2b-256 checksum
How to use checksums
1cf620feac0fccf95c32fbb5a9ed4fa502efe27d823ca6e8dadd8fcd1b0b6e91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for pipecat-akapulu 0.1.21

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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