Skip to main content

Overview

JambonzFrameSerializer connects a Pipecat pipeline to calls on jambonz through the listen verb’s WebSocket protocol. Audio is raw 16-bit signed little-endian mono PCM, and the call’s sample rate is read from the preamble jambonz sends when the socket opens, so it needs no configuration.

jambonz Serializer API Reference

Pipecat’s API methods for jambonz WebSocket integration

jambonz listen Verb

Official jambonz documentation for the listen verb

Installation

The JambonzFrameSerializer does not require any additional dependencies beyond the core Pipecat library:

Prerequisites

  1. A jambonz account or server with an application that runs the listen verb.
  2. A public WebSocket URL for your bot, which the verb’s url points to.

listen Verb

The verb needs three settings stated explicitly:
  • bidirectionalAudio.streaming defaults to false. While it is, audio sent back is ignored and the caller hears nothing.
  • sampleRate defaults to 8000. Other allowed values are 16000, 24000, 48000 and 64000.
  • bidirectionalAudio.sampleRate has no default. Set it to the same value as sampleRate, or set the serializer’s audio_out_sample_rate to it: the serializer sends audio at the sampleRate from the preamble unless audio_out_sample_rate is set, so a mismatch plays back too fast or too slow.
  • mixType must be mono. Audio is dropped with a warning for stereo or mixed.
  • Set passDtmf to receive keypad digits as InputDTMFFrame.

Configuration

JambonzFrameSerializer.InputParams | None
default:"None"
Configuration parameters. See InputParams below.

InputParams

Properties

Populated from the preamble once it arrives.

Usage

Basic Setup

Notes

  • Interruptions: An InterruptionFrame sends killAudio, which flushes audio jambonz is playing or has buffered.
  • DTMF support: With passDtmf set on the verb, digits are converted to InputDTMFFrame objects. mark and playDone events are ignored.
  • Preamble first: Audio that arrives before the preamble is dropped.