A web-based tool for decoding two-tone sequential paging signals used by fire and EMS services. Upload audio files containing Motorola Quick Call II and other dual-tone formats to identify the frequencies and determine which unit was paged.
- Audio Processing: Detects two-tone sequential signals in WAV audio files
- Frequency Detection: Uses Goertzel algorithm for accurate frequency identification (±2.0 Hz tolerance)
- Configurable Tone Tables: Manage custom tone-to-unit mappings via web interface
- Real-time Results: Displays detected frequencies, confidence levels, and matched units
- Local Processing: All processing happens on your server - no third-party dependencies
- Security Hardened: Rate limiting, input validation, path traversal protection
- Deployment Guide - Complete guide for deploying to Ubuntu server with NGINX
- Testing Guide - Testing procedures and sample audio generation
- Security Documentation - Security measures, limitations, and best practices
- Backend: Python 3.8+, FastAPI
- Frontend: Vanilla JavaScript, HTML5, CSS3
- Audio Processing: librosa, scipy, numpy
- Database: SQLite (via SQLAlchemy async)
- Security: SlowAPI rate limiting, input sanitization
- Python 3.8 or higher
- pip package manager
- Clone the repository:
cd Dual-Tone-Decoder- Create a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create environment configuration:
cp .env.example .env- (Optional) Edit
.envto customize settings:
DATABASE_URL=sqlite+aiosqlite:///./tone_decoder.db
UPLOAD_DIR=./uploads
MAX_FILE_SIZE_MB=50
ALLOWED_EXTENSIONS=.wav
FREQUENCY_TOLERANCE_HZ=2.0
# Use the included start script
./start.shOr manually:
source venv/bin/activate
uvicorn main:app --reload --host 127.0.0.1 --port 8000Then open your browser to: http://localhost:8000
For production deployment to Ubuntu server with NGINX, see DEPLOYMENT.md for complete instructions.
- Click "Upload Audio File" or drag and drop a WAV file
- Click "Decode Audio" to process
- View detected frequencies and matched unit (if in database)
- Scroll to "Tone Table Management" section
- Click "Add Entry" to create new tone mappings
- Fill in:
- Label: Unit identifier (e.g., "Station 1", "Engine 42")
- Tone 1 (Hz): First tone frequency
- Tone 2 (Hz): Second tone frequency
- Click "Save All Changes" to persist
Currently supports:
- WAV files (PCM, mono or stereo)
Planned support:
- MP3 (future enhancement)
- Other common audio formats
- Tone 1 Duration: ~1 second
- Tone 2 Duration: ~3 seconds
- Gap Between Tones: 0-500ms
- Frequency Range: 200-3000 Hz
- Tolerance: ±2.0 Hz
Primary support for:
- Motorola Quick Call II (One Plus One)
- Motorola Two-Tone Sequential
Reference document included: tone-signaling-charts.pdf
GET /api/tones/- List all tone entriesGET /api/tones/{id}- Get specific entryPOST /api/tones/- Create new entryPUT /api/tones/{id}- Update entryDELETE /api/tones/{id}- Delete entry
POST /api/decode/- Upload and decode audio file
GET /health- Health check endpoint
Edit .env file to customize:
DATABASE_URL: SQLite database locationUPLOAD_DIR: Temporary upload directoryMAX_FILE_SIZE_MB: Maximum file upload sizeALLOWED_EXTENSIONS: Comma-separated list of allowed file extensionsFREQUENCY_TOLERANCE_HZ: Matching tolerance for frequency detection
For troubleshooting deployment issues, see DEPLOYMENT.md.
Common issues:
- Audio file won't decode: Ensure file is WAV format, under 50MB, with clear tones
- No matches found: Add tone entries via web interface, verify frequencies are correct
- Rate limited: Wait 1 minute (10 uploads/minute limit per IP address)
This application includes:
- Rate limiting to prevent abuse
- Input validation and sanitization
- Path traversal protection
- Memory exhaustion prevention
Important: No authentication is implemented by default. For production deployment, add Basic Auth via NGINX or implement API keys. See SECURITY.md for details.
To customize for your region:
- Obtain official tone frequency documentation from your dispatch center
- Add entries via the web interface
- Adjust
FREQUENCY_TOLERANCE_HZin.envbased on your radio system characteristics
- Frequency reference data from Midian Electronics tone signaling charts
- Built for fire and EMS services to improve dispatch operations
MIT License - see LICENSE file for details.
This project is provided as-is for use by fire and EMS services for decoding paging tones.