How Can I Capture and Record Larger Amounts of A2B Audio Channel Data?

Question from the Customer:

I am using the A2B Bus Monitor – Level 1 Application to record audio channel data. The Python script is installed and works properly, except that after capturing 40 MB the A2B Bus Monitor buffer is full. How can I capture and record more data?

Response from Technical Support:

Thanks for your question! The capture buffer in the A2B Bus Monitor is limited to about 15 seconds. If more audio data is needed, you can use the WebSocket interface of the A2B Bus Monitor to stream audio data directly to a disk.

Python Scripts for Streaming Audio Data to Disk

To help you get started, we provide a sample Python script that you can download, use, and modify as needed. This package includes the script and information about using this script. This script requires Python 3, which can be downloaded from the Python website.

How the Script Works

The script captures one or more audio streams to disk as 32-bit signed, mono, little-endian PCM files, one file per channel. When the script is invoked with no arguments, the following information is displayed:

usage: example URL SAMPLE_RATE CH1 CH2 CHn...
URL must start with ws:// or wss://
SAMPLE_RATE is the audio sample rate in Hz, e.g. 48000
CH1... is a list of channels to record as integers

Invoking the Script

Here is an example of invoking the script, and the expected output. Please note - [PROMIRA_IP] should be replaced with the actual IP address of your Promira Serial Platform.  The default address is If you need to modify the IP address of the Promira Serial Platform, please see

The downstream audio channels are numbered 0 through 13, and upstream audio channels are numbered 32 through 45.

In this example, the script is streaming the first upstream audio channel (32) to disk.

> python ws://[PROMIRA_IP]/api 44100 32
Starting capture...
Audio streaming...
ch: 32 ts: 13.385327140000001
audiofile setOffset: 2569982
ch: 32 ts: 13.48532714 stream: 19200 bytes
ch: 32 ts: 13.58532714 stream: 19200 bytes
ch: 32 ts: 30.985327140000205 stream: 19200 bytes
Stopping capture...
Stopping streaming...

Please note - the file raw-audio-ch32.pcm will be stored in the directory where the script is run.

We hope this answers your questions. Additional resources that you may find helpful include the following:

If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.

Request a Demo