Before the days of FreeDV RADE (which uses multiple machine learning models to turn speech to features, transmit data over HF, and turn the demodulated features back in to speech audio; it was possible to run FreeDV with Codec2 on embedded hardware.
There was the SM1000 and the EzDV boxes.
I wondered if it might be possible to divide up the tasks and perhaps use several microcontrollers working together. I would not have attempted this before the days of AI tools like Claude Code but last night decided to give it a whirl.
This project captures audio from a MEMS PDM microphone. PDM is pulse density modulation and these little microphones have excellent sound.
LPCNet is the input side of the FARGAN vocoder. It turns speech audio into "features" which are a stream of 32bit floating point numbers. In FreeDV RADE, these features are transmitted over the air with an ML modem (but that's another story). The recovered features are turned back into speech audio with the Vocoder.
This project live encodes the audio to a stream of features which it sends over a USB serial cable to a computer which has a python program which syncs up and captures the features to a file which can be decoded using one of the test tools with FreeDV.
Here's me talking in to it followed by a decode of the features captured.
I tried to get this going on a PICO but it could not keep up. Partly because it doesn't have floating point and must emulate it. The PICO2 keeps up and even has some head room. There is some work down sampling the audio from the microphone that could be dropped if I used an A/D input instead.
Now here is a features to speech decode side. Features are streamed over USB. Audio is PWM into a simple low pass filter. (My tests indicate that this can sound very good). So far the audio is understandable but quite poor.
I'm not sure that the Radio Autoencoder can fit on one of these but you never know... Any recommendations of easy to use embedded ARM boards?
I'll share the code when it's a bit more polished. Not sure that this will be of interest to anyone but you never know.

No comments:
Post a Comment