Listen to FM radio from raw I/Q signals from a Software Defined Radio.
This is intended as an example of how to handle and decode FM radio, there are many ways that this can be improved. Please have fun with trying out different arguments to see how it impacts the audio quality.
Installation & Execution
Python dependencies are in requirements.txt and can be installed with:
# for windows python -m pip install -r requirements.txt # linux pip install -r requirements.txt # use pip or pip3
The code can be run with:
The following arguments are available:
- -l: list devices available for audio playback
- -d: device selected
- -a: amplitude, to reduce or increase volume
- -b: bandwidth, bandwidth of signal capture in Hz
- -s: samplerate, samplerate of signal capture
- -buffer: buffersize, size of the buffer for storing processed signal
- -samples: samplesize, the number of samples obtained per run
Default arguments can be observed in the code or printed upon execution
Check out the following sources:
This audio stream is mono only, and depending on computation speed, it might not be able to keep up with the audio stream.
- Raspberry Pi Model 4B
- RTL2832U from https://www.rtl-sdr.com/
- Dipole Antenna Base with 60cm RG174