Anva avatars for Pipecat
Give your Pipecat voice agent a face. The pipeline keeps its own STT, LLM and
TTS; AnvaVideoService sits after the TTS, sends its audio to Anva and pushes
back the avatar's video and voice, lips in time, as ordinary output frames for
whatever transport you use: Daily, LiveKit, WebRTC, anything with video out.
pip install pipecat-anva
from pipecat_anva import AnvaVideoService
anva = AnvaVideoService(api_key=os.environ["ANVA_API_KEY"], avatar_id="av_...")
pipeline = Pipeline([
transport.input(),
stt,
context_aggregator.user(),
llm,
tts,
anva, # after the TTS, before the transport
transport.output(),
context_aggregator.assistant(),
])
Give the transport video out at the avatar's size, for example with Daily:
DailyParams(video_out_enabled=True, video_out_width=480, video_out_height=480, ...)
Anva renders 480×480 at 25 fps by default. The service does not scale the
picture; set video_out_width/video_out_height to what the avatar sends
or let your transport scale it.
What happens
- On pipeline start the service creates an Anva
avatar_onlysession with your API key, opens its events socket and connects a WebRTC viewer to it, the way Anva's embed player does. Nothing is billed until the viewer is connected. TTSAudioRawFrames are converted to what Anva's lip-sync takes (24 kHz mono PCM) and sent as one utterance perTTSStartedFrame/TTSStoppedFrame. The pipeline's own copy of the audio stops at the service.- The avatar's video comes back as
OutputImageRawFrames (RGB) and its voice asTTSAudioRawFrames at the pipeline's TTS sample rate, in sync. - An
InterruptionFramestops the avatar mid-sentence and drops what was queued. EndFrame/CancelFrameend the Anva session, which is what stops the billing.
Sending is paced by Anva's playback reports: the service keeps at most four seconds of unplayed audio in flight, so a long answer is never front-loaded.
Options
| Argument | Meaning |
|---|---|
api_key |
Anva API key (anva.ai → API keys). The events socket needs the Developer plan or above. |
avatar_id / preset_id |
Exactly one. A preset's voice and prompt do not apply: the pipeline speaks. |
api_url |
Anva base URL (https://anva.ai). |
max_duration_seconds |
End the Anva session this long after it goes live. |
metadata |
Echoed on Anva's session and webhooks. |
A refused session (wrong avatar, plan limits, no capacity) is reported with
push_error; the pipeline keeps running without a face.
Tests
The tests run against a stand-in for Anva, no account needed:
pip install -e . pytest pytest-asyncio
python -m pytest tests
Metadata
Release files for pipecat-anva 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pipecat_anva-0.1.0.tar.gz | 12.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pipecat_anva-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.6 kB
Release files / pipecat_anva-0.1.0.tar.gz
| Download URL | pipecat_anva-0.1.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28a5a5470e7def26d9b49a50ab98c6d0516500ef1d6d2a9c4ef577489ebf799a
|
|
BLAKE2b-256 checksum How to use checksums |
a5b7c9fffa5f50154eeb62575ab6415c8195354f609e07d6765ad47252d6606d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / pipecat_anva-0.1.0-py3-none-any.whl
| Download URL | pipecat_anva-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e786b4f90e781f6e3debc5386e8fa9bbd613b9e492c6f4b7f9efeb8ab678216b
|
|
BLAKE2b-256 checksum How to use checksums |
95f60834d061c47f2031cd5f86771214aa5a7a0e5b65ddf9305e180a13449549
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for pipecat-anva 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.
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.