DMR data and audio offline integration update
As mentioned before we have been working to fully integrate DMR position, messaging and audio into a single logging solution for Derby Raynet Control to use during events without needing any complex infrastructure or being dependent on the Internet.
Since the last update we have overcome most of our issues and are now working on reliability and scaling improvements.
Previously we could “listen” to the repeater over RF at control and decode the data side of DMR (messages, position reports and on air caller information), we have recently made progress in a number of areas in order to add audio recording and searching capability.
MMDVM firmware updates
We have a working version of the MMDVM HS firmware that allows the board to receive transmissions from DMR repeater and extract the audio frames in addition to the previous data frames.
We still need to replicate these changes in the MMDVM firmware, the code is different, but moving the latest changes over should be OK.
DMR Homebrew connector
For easier dev & testing we can also feed DMR data in directly from Brandmeister.
AMBE processor
We have created an application to consume AMBE frames from a queue, and convert them into PCM audio frames using an AMBE-3000 USB stick.
This performs almost the same job that the well known AMBEServer does, but we are using queues instead of the UDP protocol since we don’t need a live audio stream, and instead want to prioritise reliability and allow for the service to be restart when problems occur or scale out and provide multiple services decoding the AMBE data if we have multiple time slots or receivers.
The AMBE data is converted in realtime with the results sent to the management service that combines the frames when the transmission is over.
API and management services
This service currently has three jobs:
- Collect all of the received AMBE frames, and store them incase storage is important and we don’t want the PCM not MP3 files, or an error occurs in a later step and we want to convert the audio later.
- Collect all of the PCM audio frames, merge them into files. The MP3 and transcript creation is then triggered.
- Provide a REST API to allow merged audio to be downloaded by clients instead of being limited on filesize when using queues.
- Notify clients of all activity over MQTT. This includes looking up DMR IDs to registered callsign’s.
Audio processor
The final service is triggered via a message and performs the following:
- Downloads the complete PCM audio recording from the API.
- Converts the PCM file to an MP3 file and upload it to the API for sharing.
- Pass the PCM audio through an OpenAI model to create a transcript of the over and again upload this to the API.
This service may be split into two later since the tasks can be done in parallel, and the transcription creation takes a lot more resources.
System

The current result
The updates above mean the end result is just a small change to the MQTT message that adds the transcript and download link to the existing on air user message. This message can then be used in the Event Comms app as below:

Outstanding tasks
- MMDVM and MMDVM HS firmware completion.
- Moving some of the internal queues from MQTT to (possible) PGMQ.
- Probably introduce Redis to store the audio slices before merging, and maybe allow the audio to be streamed?
- The AI transaction model usually makes mistakes on very short < 2 second audio clips (e.g. “Thank you” in the screen show), these should be skipped.
- Update the installation scripts to work with the additional services.
- Try running the transcription model on a Raspberry PI 5? It may be too slow :-(.
- Filter received audio by channel (time slot / talk group / receiver). We may not want non-event traffic in the log.
- Delete the PCM file if we have an MP3 in order to save space.
- Additional audio playback controls in Event Comms.
- Start moving some of the Event Comms features into the above API and provide synchronisation features.
Find out more
This has been an interesting task, still with lots to do. If you have any comments or would like to get involved let us know on the contacts page!