Real-Time Asterisk Telephony AI
๐Ÿค– AI Developed MIT License Multi-Process Architecture

High-Performance Asterisk STT
Powered by Whisper & VibeVoice

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.

0ms
UI Blocking (Decoupled Worker)
5-10x
CUDA GPU Speedup
100%
Zero-Data-Loss Disk Flushing
9092
Default AudioSocket TCP Port
๐Ÿค–

AI-Developed Project & MIT License

Engineered collaboratively by AI models (Antigravity, DeepSeek, Gemini)

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.

โš ๏ธ Legal Disclaimer & Limitation of Liability

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.

Live AudioSocket Pipeline Simulator

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.

SYSTEM STATUS: IDLE
Incoming Asterisk AudioSocket Stream Port 9092 TCP
Live Console Log & Output Real-Time
[System] Ready for incoming AudioSocket TCP call connection...
[System] Click "Run Telephony Test Call" above to simulate Asterisk stream.

Engineered for Telephony Performance

Designed from the ground up for high concurrency, isolated AI inference, and immediate recording preservation.

Multi-Process AI Worker

Offloads heavy PyTorch / CTranslate2 model loading into a dedicated OS process. The FastAPI dashboard and AudioSocket TCP server remain 100% responsive under call surges.

Microsoft VibeVoice ASR

Single-pass speaker diarization and timestamping powered by microsoft/VibeVoice-ASR-HF. Tracks distinct callers automatically without requiring external diarization pipelines.

Immediate WAV Export

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.

Dual Whisper Engine Support

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.

REST Webhook Delivery

Automatically post complete session packages (WAV audio + SRT subtitles + JSON metadata) to any remote API endpoint upon transcription completion.

Live Dynamic Hot-Reload

Update VAD silence thresholds, AI parameters, or model engines through the dashboard without shutting down or restarting the running Asterisk AudioSocket server.

Decoupled AudioSocket Data Flow

How WASA safely handles concurrency, memory buffering, disk persistence, and AI inference.

1

Asterisk PBX

Streams call audio using AudioSocket() or ChanSpy() over TCP port 9092.

2

Async TCP Listener

Handles UUID (0x01), Audio (0x10), and Hangup (0x00) frames with zero audio mixing.

3

Immediate WAV Export

Flushes PCM buffer to disk immediately upon hangup, guaranteeing file safety.

4

AI Model Worker

Isolated process executes Faster-Whisper or VibeVoice on GPU/CPU.

5

Web UI & Webhook

Outputs SRT, JSON metadata, ZIP downloads, and pushes REST Webhook payloads.

Asterisk Dialplan Generator

Customize your Asterisk server IP and AudioSocket port to automatically generate copy-pasteable configuration for /etc/asterisk/extensions.conf.

extensions.conf (Direct Interactive Call / Voicebot)
extensions.conf (Silent Live Call Monitoring)

Model Capabilities & Comparison

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

Quick Installation

Get WASA running on Windows or Linux in minutes using the provided automated scripts.

1. Clone repository and run automated environment setup script:

PowerShell / CMD
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:

Launch Command
run.bat

1. Clone repository and grant execution permissions:

Bash Shell
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:

Launch Command
./run.sh

Built Collaboratively by AI

WASA was designed, refactored, and optimized through the combined capabilities of leading artificial intelligence models.

AG

Antigravity

Refactored process exit lifecycles (clean SIGINT without worker restarts), fixed multi-threading scope bugs, and designed statistical byte-swapping auto-detection.

DS

DeepSeek

Assisted in code quality auditing, architectural refactoring, and logical separation of worker processes and API endpoints.

GM

Gemini

Developed initial Microsoft VibeVoice integration, VAD silence timeout controls, SSE streaming status, and UI localization.