Vobiz telephony integration for Pipecat
Project description
Pipecat Vobiz Integration
Community integration for using Vobiz telephony with Pipecat.
Installation
pip install pipecat-vobiz
Or install from source:
pip install git+https://github.com/Piyush-sahoo/Pipecat-Vobiz.git
Usage
from pipecat.serializers.vobiz import VobizFrameSerializer, parse_vobiz_start
from pipecat.transports.network.fastapi_websocket import (
FastAPIWebsocketTransport,
FastAPIWebsocketParams,
)
# Read Vobiz's `start` event off the WebSocket to learn the negotiated
# wire format (encoding + sample rate + stream/call IDs).
parsed = await parse_vobiz_start(websocket)
# Create the serializer using the wire format Vobiz actually negotiated.
serializer = VobizFrameSerializer(
stream_id=parsed["stream_id"],
call_id=parsed["call_id"],
auth_id="YOUR_VOBIZ_AUTH_ID",
auth_token="YOUR_VOBIZ_AUTH_TOKEN",
params=VobizFrameSerializer.InputParams(
encoding=parsed["encoding"] or "audio/x-mulaw",
vobiz_sample_rate=parsed["sample_rate"] or 8000,
# l16_byte_order="le", # if your account transports L16 LE
# hangup_method="both", # default; "ws_stop" or "rest" also valid
),
)
# Use it with the FastAPI WebSocket transport
transport = FastAPIWebsocketTransport(
websocket=websocket,
params=FastAPIWebsocketParams(
audio_in_enabled=True,
audio_out_enabled=True,
add_wav_header=False,
serializer=serializer,
),
)
Features
- Audio streaming in
audio/x-mulaworaudio/x-l16at 8000 / 16000 Hz (24000 Hz is in the protocol but not reliable on all regions — see CHANGELOG). - Self-negotiation from Vobiz's
startevent — adopts the encoding and sample rate Vobiz actually declares on the wire, with a warning if it disagrees with your config. - DTMF event handling.
- Barge-in via Pipecat's
InterruptionFrame→ VobizclearAudio. - Reliable call termination: sends Vobiz's documented
stopevent on the WebSocket and issues a RESTDELETEas a background safety net (configurable viahangup_method). - Compatible with Pipecat's pipeline architecture.
Example
See the examples/bot.py for a complete working example.
Pipecat Version Compatibility
Tested with Pipecat v0.0.86+
License
BSD 2-Clause License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pipecat_vobiz-0.0.3.tar.gz
(21.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipecat_vobiz-0.0.3.tar.gz.
File metadata
- Download URL: pipecat_vobiz-0.0.3.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
340d06f268a3ebad8f45f0a432ad2904017b45dab02cdeae2c7d0881e6365c74
|
|
| MD5 |
91ebdf0cc17de3b9c3de932e1c0830be
|
|
| BLAKE2b-256 |
6d7beeae4596af699d79acefdd3c64d54cc69ce13a5d89e2d3d17ccc31ee2812
|
File details
Details for the file pipecat_vobiz-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pipecat_vobiz-0.0.3-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b226289ae1f19fff8a22f3d7e4997c1b3f31724e6371212f0678bec0facbf54
|
|
| MD5 |
3de33450f2a52bc5a39fc632a90d55d6
|
|
| BLAKE2b-256 |
ce4858da3f1113ff48449b13a4d9f211c3b2a6e1f9f003c373e05f9d29650d91
|