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
Metadata
Release files for pipecat-vobiz 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pipecat_vobiz-0.0.3.tar.gz | 21.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pipecat_vobiz-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.1 kB
Release files / pipecat_vobiz-0.0.3.tar.gz
| Download URL | pipecat_vobiz-0.0.3.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
340d06f268a3ebad8f45f0a432ad2904017b45dab02cdeae2c7d0881e6365c74
|
|
BLAKE2b-256 checksum How to use checksums |
6d7beeae4596af699d79acefdd3c64d54cc69ce13a5d89e2d3d17ccc31ee2812
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / pipecat_vobiz-0.0.3-py3-none-any.whl
| Download URL | pipecat_vobiz-0.0.3-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b226289ae1f19fff8a22f3d7e4997c1b3f31724e6371212f0678bec0facbf54
|
|
BLAKE2b-256 checksum How to use checksums |
ce4858da3f1113ff48449b13a4d9f211c3b2a6e1f9f003c373e05f9d29650d91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|