Skip to main content

Pipecat video avatar service for Protoface.

Project description

Protoface Pipecat Plugin

PyPI - Version

Add Protoface video avatars to Pipecat pipelines.

Maintained by Protoface.

Installation

pip install pipecat-protoface

Or with uv:

uv add pipecat-protoface

Install the Pipecat extras required by your application separately, such as the transport, LLM, STT, or TTS services in your pipeline.

For this repo's WebRTC example:

uv sync --extra dev --extra example

If you prefer pip:

pip install -e ".[dev,example]"

Prerequisites

  • Protoface API key (PROTOFACE_API_KEY)
  • Protoface avatar ID (PROTOFACE_AVATAR_ID)
  • API keys for the Pipecat services used by your pipeline

Usage

ProtofaceVideoService starts a hosted Protoface avatar session. It consumes TTSAudioRawFrame audio from a Pipecat pipeline and emits synchronized SpeechOutputAudioRawFrame and OutputImageRawFrame frames downstream.

Your application still chooses the Pipecat transport for the end user.

import os

from pipecat_protoface import ProtofaceVideoService

protoface = ProtofaceVideoService(
    api_key=os.environ["PROTOFACE_API_KEY"],
    avatar_id=os.environ["PROTOFACE_AVATAR_ID"],
)

pipeline = Pipeline([
    transport.input(),
    stt,
    context_aggregator.user(),
    llm,
    tts,
    protoface,  # Video avatar (returns synchronized audio/video)
    transport.output(),
    context_aggregator.assistant(),
])

For realtime speech-to-speech services, place ProtofaceVideoService after your realtime LLM service and before the output transport:

pipeline = Pipeline([
    transport.input(),
    gemini_live,
    protoface,
    transport.output(),
])

See examples/video_service.py for a complete WebRTC example using Gemini Live.

Session Startup

ProtofaceVideoService starts a hosted Protoface avatar session when the pipeline starts. Audio produced before the avatar session is ready is buffered, then streamed once the connection is available.

Running the Example

  1. Install dependencies:
uv sync --extra dev --extra example
  1. Set up your environment:
cp env.example .env
# Edit .env with your keys:
# PROTOFACE_API_KEY
# PROTOFACE_AVATAR_ID
# GOOGLE_API_KEY or GEMINI_API_KEY
#
# GEMINI_LIVE_MODEL and GEMINI_VOICE are optional.
  1. Run the ProtofaceVideoService example with the built-in WebRTC transport:
uv run python examples/video_service.py -t webrtc

The example reads either GOOGLE_API_KEY or GEMINI_API_KEY. By default, the plugin connects to https://api.protoface.com; set PROTOFACE_API_URL only when testing against another Protoface environment. Set PROTOFACE_DEBUG_MEDIA=1 to log avatar audio/video frame counts during local testing.

Compatibility

  • Pipecat v1.4.0+
  • Python 3.11+
  • Built-in WebRTC transport for the included example

License

Apache-2.0 - see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipecat_protoface-0.1.0.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipecat_protoface-0.1.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file pipecat_protoface-0.1.0.tar.gz.

File metadata

  • Download URL: pipecat_protoface-0.1.0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pipecat_protoface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aefd015a3b3f0e7cbbd63e1cb98b39cf3888f47ea5f9e8884ebe0b28f0bc490a
MD5 90b73a1b4c12af5d0456fc35ad262823
BLAKE2b-256 a21fdb6a512a29c7453c5d55f23118a50d9efd53cbdc6a30afe782c553a91b3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipecat_protoface-0.1.0.tar.gz:

Publisher: release.yml on protoface-ai/protoface-plugin-pipecat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipecat_protoface-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pipecat_protoface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2cc5ea8a0f43f4fd0cd3eb37b8dc85aff5b4cf9c92c0364d783e9bd68c2acd2c
MD5 d93299674db7f9c83adb530618556401
BLAKE2b-256 efe6915501c37579bb340c009a4717cfe469fcec59e7fea745b5ba333622f962

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipecat_protoface-0.1.0-py3-none-any.whl:

Publisher: release.yml on protoface-ai/protoface-plugin-pipecat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page