This project is designed to monitor a directory for SDRTrunk P25 MP3 files, categorize them based on the talkgroup ID, and create transcription files. You have the option to utilize faster-whisper or OpenAI's API for audio transcription and we utilize SQLite3 for database management.
This is not at all tested on Windows. Feel free to file issues for problems with Windows usage if you're open to assisting me debug the problem.
- sdrtrunk-transcriber (Python version of this repo)
- sdrtrunk-transcribed-web (Node.JS website for displaying mp3/txt files processed by this project)
- Features
- Dependencies
- Installation
- Configuration
- Usage
- System Service
- faster-whisper Local Transcription
- SDRTrunk Transcribed Web
- Contributing
- License
- Monitors a directory for new MP3 files
- Transcribes audio using OpenAI's API or local transcription with faster-whisper
- Searches transcriptions for tencodes/signals/callsigns in provided JSON files and appends their translation to end of transcription
- Manages transcriptions and metadata in an SQLite3 database
- (in progress) Provides a systemd service for automated running
- CMake
- ffmpeg
- SQLite3
- CURL
- yaml-cpp
sudo dnf install ffmpeg ffmpeg-devel libcurl-devel sqlite-devel pkg-config yaml-cpp-devel
sudo apt-get install ffmpeg libavcodec-dev libcurl4-openssl-dev libsqlite3-dev pkg-config libyaml-cpp-dev
- Refer to the Windows CMake
(Please feel free to update this with better steps for Windows users. I do not use Windows so I'm not sure what's necessary.)
# Clone the repository
git clone https://github.com/swiftraccoon/cpp-sdrtrunk-transcriber.git
# Navigate to the project directory
cd cpp-sdrtrunk-transcriber
# `git clone` external repos that .gitsubmodules will not grab for you
git clone https://github.com/jbeder/yaml-cpp.git external/yaml-cpp
git clone https://github.com/CLIUtils/CLI11.git external/CLI11
# Generate the Makefile
cmake .
# Compile the project
make
A sample configuration file is provided (sample-config.yaml
). Edit this file to specify the directory to monitor, OpenAI API key, and other settings.
mv sample-config.yaml config.yaml
Run the compiled binary with the following options:
-c, --config <config_path>
: Path to the configuration file (Optional, default is./config.yaml
).-l, --local
: Set this to enable local transcription via faster-whisper-h, --help
: Display help message.
This is still a TODO. It should work in theory but I've not yet tested it.
A BASH script is provided to show an example template for setting up the binary as a Linux system service.
# Edit install-systemd-service.sh
sudo ./install-systemd-service.sh
Follow the faster-whisper installation and ensure it's working after.
Once you've confirmed faster-whisper
is ready to go, next simply ensure that fasterWhisper.py
from the scripts/
folder is in the same folder with the sdrTrunkTranscriber
binary.
Now when you launch sdrTrunkTranscriber --local
the transcriptions will instead be handled locally via fasterWhisper.py
.
Now that you have a folder of processed recordings you can set them up to be displayed within sdrtrunk-transcribed-web.
You just need to copy the:
.txt
files into thesdrtrunk-transcribed-web/public/transcriptions
folder.mp3
files intosdrtrunk-transcribed-web/public/audio
folder
An example script for Linux users to do that is in scripts/
of this repo:
(I'll soon enable you to utilize different folders)
Feel free to open issues or submit pull requests.
This project is licensed under the GPL-3.0 license. See the LICENSE file for details.