How Do I Acquire and View Audio Details with the Data Captured by the A2B Bus Monitor Using Python Scripts?

Question from the Customer:

I am using the Promira Serial Platform with the A2B Bus Monitor – Level 1 Application. I have questions about using the A2B API software.

  1. Does it contain information about Level (dBFS) and Frequency (Hz) in the uncompressed PCM file from,
  2. ​Where can I find information for the commands a2b_capture_stop() and a2b_capture_strat()?
  3. ​If the PCM file does not contain Level or Frequency, how can I get that data? The level information and the frequency are the Spectrum graph are in the web GUI – how does the A2B Bus Monitor web GUI acquire the information of the Spectrum graph like the example below?

Spectrum Graph

Response from Technical Support:

 Thanks for your questions! When using the web GUI application, much of the data that you are looking for is determined in the configuration. When using Python, audio analysis software can used to provide the visual details you desire. Following are details for each question.

1 - What Information Does the PCM File Contain?

The PCM file captured using the python script is RAW audio data - it does not contain the information mentioned. However, the frequency should be known, as the A2B supports two frequencies for audio capture, 48 KHz (default) or 44.1 KHz, which are selected in the GUI application.

2 – Where are API Software Command Details and Program Samples Provided?

The API documentation is available on the Promira platform:


3 - If the PCM file does not contain Level or Frequency, how do I acquire that data?

When using the python script, the PCM files contain raw audio data, a digital representation of the analog audio wave. The level (amplitude) is embedded in the data itself.

Details that the GUI setup provides:

If and when you are using the GUI setup, you can set the sample bit resolution and the audio rate.

  • The audio sample bit resolution is not available in the captured A2B data. However, the resolution is part of how the A2B system is being monitored – sample bit resolution is configured on the web GUI.
  • The frequency (audio rate) is either 48 KHz or 44.1 KHz. These are the two rates that are available for configuration for the A2B monitor. This configuration is also done on the web GUI as shown below.
  • Note - as previously stated, when using the python script, only raw PCM audio data is available.

Viewing graph on A2B GUI

4 – How Do I Generate the Data seen on the Web GUI when Using Python Scripts?

In the web GUI, the software that drives the GUI performs a Fast Fourier Transform (FFT) to show the frequencies. This is a standard audio analysis technique and is available in most audio analysis software.

Details can be provided with additional software:

The PCM file is the raw audio that was captured on the bus. While this file does not contain the level (amplitude) or frequency (audio rate) directly, this information can be generated with audio analysis software. For example, Audacity (free audio software) displays the audio as shown below.

Raw Audio DataSource: Audacity Team

You can also view a Spectrogram as shown below.

Sepctrogram view on AudacitySource: Audacity Team

 Additional resources that you may find helpful include the following:

We hope this answers your questions. If you have other questions about our A2B Bus Monitor or other Total Phase products, feel free to email us at You can also request a demo specific for your application.

Request a Demo