WASA (Whisper AudioSocket Asterisk) bridges your Asterisk PBX phone system directly to cutting-edge AI models. Transcribe, translate, and perform single-pass speaker diarization on live phone streams over AudioSocket TCP.
This codebase was designed, engineered, and optimized through the collaborative capabilities of Artificial Intelligence (AI) models. It is released under the open-source MIT License.
NO WARRANTY & ZERO LIABILITY: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS, OR AI DEVELOPERS BE LIABLE FOR ANY CLAIM, DAMAGES, SYSTEM FAILURES, DATA LOSS, OR OTHER LIABILITY ARISING FROM THE USE OR INSTALLATION OF THIS SOFTWARE. USE ENTIRELY AT YOUR OWN RISK.
Experience how WASA receives raw linear PCM frames over Asterisk AudioSocket, flushes audio to disk instantly on hangup, and queues AI transcription jobs without lagging.
Designed from the ground up for high concurrency, isolated AI inference, and immediate recording preservation.
Offloads heavy PyTorch / CTranslate2 model loading into a dedicated OS process. The FastAPI dashboard and AudioSocket TCP server remain 100% responsive under call surges.
Single-pass speaker diarization and timestamping powered by microsoft/VibeVoice-ASR-HF. Tracks distinct callers automatically without requiring external diarization pipelines.
Flushes incoming linear PCM memory buffers directly to .wav files upon call hangup. Guarantees zero data loss even if the AI model worker is busy processing prior queued calls.
Switch seamlessly between Faster-Whisper (CTranslate2, optimal speed) and OpenAI Whisper (Standard PyTorch) across all model sizes: tiny, base, small, medium, large-v3, and turbo.
Automatically post complete session packages (WAV audio + SRT subtitles + JSON metadata) to any remote API endpoint upon transcription completion.
Update VAD silence thresholds, AI parameters, or model engines through the dashboard without shutting down or restarting the running Asterisk AudioSocket server.
How WASA safely handles concurrency, memory buffering, disk persistence, and AI inference.
Streams call audio using AudioSocket() or ChanSpy() over TCP port 9092.
Handles UUID (0x01), Audio (0x10), and Hangup (0x00) frames with zero audio mixing.
Flushes PCM buffer to disk immediately upon hangup, guaranteeing file safety.
Isolated process executes Faster-Whisper or VibeVoice on GPU/CPU.
Outputs SRT, JSON metadata, ZIP downloads, and pushes REST Webhook payloads.
Customize your Asterisk server IP and AudioSocket port to automatically generate copy-pasteable configuration for /etc/asterisk/extensions.conf.
Select the ideal STT engine based on your accuracy, speed, speaker tracking, and hardware requirements.
| Engine / Model | Backend | Diarization | Speed Rank | Min VRAM / RAM | Recommended Use Case |
|---|---|---|---|---|---|
| Microsoft VibeVoice ASR | HuggingFace Transformers | Native Single-Pass | โกโกโก High | ~4 GB VRAM | Multi-speaker phone calls, call center agent analytics |
| Faster-Whisper (Turbo) | CTranslate2 C++ Engine | External SRT | โกโกโกโกโก Ultra Fast | ~2 GB VRAM | Near real-time high volume transcription |
| Faster-Whisper (Base / Medium) | CTranslate2 C++ Engine | External SRT | โกโกโกโก Fast | 1 - 3 GB VRAM | General telephony voicemail & commands |
| Faster-Whisper (Large-v3) | CTranslate2 C++ Engine | External SRT | โกโก Moderate | ~6 GB VRAM | Maximum multi-lingual accuracy & translation |
| OpenAI Whisper (PyTorch) | Standard PyTorch | External SRT | โก Moderate | 2 - 10 GB VRAM | Standard compliance & benchmark parity |
Get WASA running on Windows or Linux in minutes using the provided automated scripts.
1. Clone repository and run automated environment setup script:
git clone https://github.com/mahirgul/whisper-audiosocket-stt-asterisk.git
cd whisper-audiosocket-stt-asterisk
install.bat
2. Launch Web Dashboard & AudioSocket TCP Server:
run.bat
1. Clone repository and grant execution permissions:
git clone https://github.com/mahirgul/whisper-audiosocket-stt-asterisk.git
cd whisper-audiosocket-stt-asterisk
chmod +x *.sh
./install.sh
2. Start server daemon:
./run.sh
WASA was designed, refactored, and optimized through the combined capabilities of leading artificial intelligence models.
Refactored process exit lifecycles (clean SIGINT without worker restarts), fixed multi-threading scope bugs, and designed statistical byte-swapping auto-detection.
Assisted in code quality auditing, architectural refactoring, and logical separation of worker processes and API endpoints.
Developed initial Microsoft VibeVoice integration, VAD silence timeout controls, SSE streaming status, and UI localization.