_____ _ _ _
/ ____| | | | | |
| | __| |__ ___ ___| |_| |__ _____ __
| | |_ | '_ \ / _ \/ __| __| '_ \ / _ \ \/ /
| |__| | | | | (_) \__ \ |_| |_) | (_) > <
\_____|_| |_|\___/|___/\__|_.__/ \___/_/\_\
Scans through AM/FM radio stations using SDR and Python.
- RTL-SDR or equivalent
- GQRX
- Python 3.4+
STT / TTS
- torch
- torchaudio
- sounddevice
- numpy
- omegaconf
- sentencepiece
- soundfile
pip3 install -r requirements.txt
- Start GQRX and enable remote control
- Start UDP for speech to text if needed (reconfigure the UDP host to
127.0.0.1
in GQRX) - Run the script
python3 ghostbox.py --fm -i 0.15 --bounce
usage: ghostbox.py [-h] [-v] [--ip IP] [-p PORT] [--fm] [--am] [-i INTERVAL] [-s SQUELCH] [--random] [--forward]
[--backward] [--bounce] [--stt] [-w] [--tts] [-r] [-l] [-pb] [-ps PLAYBACK_SPEED]
Ghostbox
options:
-h, --help show this help message and exit
-v, --version display the program version
--ip IP gqrx IP
-p PORT, --port PORT gqrx port
--fm enable FM radio scanning
--am enable AM radio scanning
-i INTERVAL, --interval INTERVAL
scanning interval in seconds
-s SQUELCH, --squelch SQUELCH
squelch
--random random scanning
--forward forward scanning
--backward backward scanning
--bounce bounce scanning
--stt enable speech to text
-w, --wordlist use a wordlist after audio is processed
--tts enable text to speech
-r, --reverb apply reverb effect to TTS
-l, --long-words hide short words from the output
-pb, --playback playback transcript audio
-ps PLAYBACK_SPEED, --playback-speed PLAYBACK_SPEED
playback speed
The Ghostbox is capable of speech recognition by processing the UDP audio stream from GQRX. GQRX can be muted and audio will still be processed.
python3 ghostbox.py --fm -i 0.15 --bounce --stt -w --tts
- Install homebrew
- Install miniconda
brew install miniconda
conda init "$(basename "${SHELL}")"
- Restart your shell
- Install PyTorch
conda install pytorch torchvision torchaudio -c pytorch
- Install Python requirements
pip3 install -r requirements.txt
Build GQRX for M1
If you get an error about libxml2, just ignore it and copy the GQRX.app
file to your Applications folder.
- Disable Hardware AGC
- Gain 0.0 dB
Top 5000 common English words.
UDP Bind Error
It's possible a copy of the Python script is still running in the background.
kill -9 $(ps -A | grep python | awk '{print $1}')
MIT