A self-hosted automated outbound dialer phone bot
Project description
Autodial PhoneBot
A self-hosted automated outbound dialer phone bot capable of using speech recognition and LLM to navigate IVRs and DTMFs, understand calls intelligently, process multiple calls concurrently, and broadcast messages.
Features
- Concurrent Calls: Runs on FastAPI websockets handling multiple simultaneous Twilio Media Streams.
- Transcripts: Auto-generates local
call_logs/JSON transcripts, tracking the context between user and AI continuously. - Fast Speech Recognition: Utilizes
faster-whisperdynamically processing audio chunks in real-time. - Intelligent Response: Pipes transcribed data to an LLM via Ollama and outputs context-aware conversation responses natively handling IVR DTMF tone demands.
- Message Broadcasting: Enables dispatching multiple calls programmatically via the
/broadcastREST Endpoint. - Local TTS: Near-real-time vocal response generation via Piper TTS integration encoded gracefully to Twilio u-law compatibility standards over Websockets.
Installation
You can install the pacakge directly from the source code via pip in editable mode:
pip install -e .
Prerequisites Checklist:
- Have an active Ollama process serving the defined
LLM_MODEL. - Have Piper executable in
PATHnatively, downloading its required onnx models (PIPER_MODEL) to the execution directory.
Configuration
Make sure your target environment configures these necessary .env variables:
PORT=8000
OLLAMA_CHAT_URL=http://localhost:11434/api/chat
LLM_MODEL=llama3.2:3b
PIPER_MODEL=./en_US-lessac-medium.onnx
TWILIO_ACCOUNT_SID=...
TWILIO_AUTH_TOKEN=...
TWILIO_PHONE_NUMBER=...
Running the System
Start the server using its PyPI distributed script bin:
autodial
Or use:
python -m autodial.server
Endpoints
POST /dial: Trigger single call- Body:
{"to_number": "+1...", "context": "...", "goals": "...", "keywords": "..."}
- Body:
POST /broadcast: Broadcast to list of targets- Body:
{"numbers": ["..."], "message": "Direct message to play", "context": "...", "goals": "...", "keywords": "..."} - Note: If
messageis provided, the bot plays it exactly once and hangs up immediately.
- Body:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autodial-0.1.0.tar.gz.
File metadata
- Download URL: autodial-0.1.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6785d6fa65c7896ebd76da44ebe9d30c4946817d4cba06ba9191b7fc1e0d7a76
|
|
| MD5 |
9c2fc7d9b2693a408b69629c2d86d2bf
|
|
| BLAKE2b-256 |
5c9d1e894af0a424f758e493b84a29dc86721fe49f54b340fcb406dac5b0c264
|
File details
Details for the file autodial-0.1.0-py3-none-any.whl.
File metadata
- Download URL: autodial-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f5befa1a9a7c5cbe9efe34b76fb833c3eddce1cae813c009417cdf1d76c7f52
|
|
| MD5 |
977d5c8600b2e75185e91b9277d21c22
|
|
| BLAKE2b-256 |
bad038f537d1e0e7410d2217cab91f2236582212fbca5c6c3418d70f428c1499
|