This repository contains the DeepCW model and a minimal example.
model_narrow.onnx is a faster, narrow-band model for multi-channel decoding. Use it with
--model ../../model_narrow.onnx --metadata ../../model_narrow.onnx.json.
The examples can read and resample ordinary PCM WAV files, but preparing the audio with
ffmpeg makes the input explicit and repeatable:
ffmpeg -i input.wav -ac 1 -ar 3200 -sample_fmt s16 target.wav
The sample rate shown above matches the current model.onnx.json. If the metadata changes,
use the sample_rate value from that file.
Directory: examples/python
Install dependencies:
cd examples/python python3 -m venv .venv source .venv/bin/activate python -m pip install -r requirements.txt
Run the decoder:
python decode_morse.py \ --model ../../model.onnx \ --metadata ../../model.onnx.json \ --wav test.wav
Directory: examples/nodejs
Install dependencies:
cd examples/nodejs
npm installRun the decoder:
npm run decode -- \ --model ../../model.onnx \ --metadata ../../model.onnx.json \ --wav test.wav
MIT. See LICENSE.