The ultimate call-and-transcribe toolkit. It dials your list, plays your audio, records everything, and transcribes it all using OpenAI Whisper โ automatically.
โก Get Started โข โจ Key Features โข ๐ฎ Usage & Examples โข โ๏ธ Configuration โข ๐ Why This Slaps
telnyx-transcribe is the automated phone assistant your workflow has been missing. Stop manually calling people, recording conversations, and typing out transcripts. This tool does it all โ dials your list, plays your audio message, records the responses, and delivers beautiful transcriptions using OpenAI's Whisper, the most accurate speech-to-text model available.
|
Bulk Calling Dial hundreds in parallel |
Auto Playback Play your audio message |
Smart Recording Capture every response |
Whisper Transcription State-of-the-art accuracy |
How it slaps:
- You:
telnyx-transcribe call numbers.txt - Tool: Dials all numbers, plays audio, records, transcribes.
- You: Check
results.tsvfor all transcriptions. - Result: Hours of work done in minutes. Go grab a coffee. โ
Manually managing calls and transcriptions is a vibe-killer. telnyx-transcribe makes other methods look ancient.
| โ The Old Way (Pain) | โ The telnyx-transcribe Way (Glory) |
|
|
We're not just making calls. We're building a fully automated pipeline with concurrent call handling, automatic webhook processing, intelligent retry logic, and state-of-the-art transcription that handles accents, background noise, and multiple languages like a champ.
The telnyx-transcribe command (or just tt) will be available in your terminal after installation.
| Method | Command |
|---|---|
| pip | pip install telnyx-transcribe |
| pipx | pipx install telnyx-transcribe |
| From source | pip install -e . |
# Install the package
pip install telnyx-transcribe
# Verify installation
telnyx-transcribe --version# Install pipx if you don't have it
python3 -m pip install --user pipx
python3 -m pipx ensurepath
# Install telnyx-transcribe
pipx install telnyx-transcribe# Clone the repo
git clone https://github.com/yigitkonur/telnyx-transcribe.git
cd telnyx-transcribe
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"โจ Pro Tip: Use
ttas a shorthand fortelnyx-transcribeโ both commands work!
The workflow is dead simple.
1. Create your numbers file (one E.164 number per line):
+14155551234
+14155551235
+14155551236
2. Run the command:
telnyx-transcribe call numbers.txt3. Check your results:
cat results.tsvThat's it. All calls made, recorded, and transcribed.
Already have audio files? Transcribe them directly without making calls:
# Transcribe a single file
telnyx-transcribe transcribe recording.mp3
# Transcribe all files in a directory
telnyx-transcribe transcribe ./recordings/
# With language hint for better accuracy
telnyx-transcribe transcribe ./recordings/ --language enSupported formats: MP3, MP4, WAV, M4A, WEBM, OGG, FLAC, MPEG, MPGA
Need just the webhook server for incoming Telnyx events?
# Start server on default port (5000)
telnyx-transcribe server
# Custom port and host
telnyx-transcribe server --port 8080 --host 0.0.0.0Check if everything is set up correctly before running:
telnyx-transcribe validate| Feature | What It Does | Why You Care |
|---|---|---|
๐ Bulk CallingConcurrent dialing |
Dials multiple numbers in parallel using thread pool | Process hundreds of calls in the time of one |
๐ Auto PlaybackCustom audio |
Plays your audio file when call is answered | Deliver consistent messages every time |
๐๏ธ Smart RecordingAutomatic capture |
Starts recording immediately on answer | Never miss a response |
๐ง Whisper AIState-of-the-art STT |
Uses OpenAI's Whisper for transcription | Handles accents, noise, multiple languages |
๐ Auto RetryExponential backoff |
Automatically retries failed API calls | Resilient to network hiccups |
๐ TSV OutputReady for analysis |
Structured output with all call details | Import directly into Excel, Sheets, or scripts |
๐ Webhook ServerFlask-powered |
Handles Telnyx events in real-time | Seamless integration with Telnyx platform |
โ๏ธ ENV ConfigZero hardcoding |
All secrets via environment variables | Secure, 12-factor app compliant |
All configuration is done via environment variables. Create a .env file or export them directly.
# Telnyx API credentials
TELNYX_API_KEY=your_telnyx_api_key
TELNYX_CONNECTION_ID=your_connection_id
TELNYX_FROM_NUMBER=+1234567890
# OpenAI API key for Whisper
OPENAI_API_KEY=your_openai_api_key
# Audio file to play during calls
AUDIO_URL=https://example.com/your-message.mp3# Server settings
WEBHOOK_HOST=0.0.0.0 # Default: 0.0.0.0
WEBHOOK_PORT=5000 # Default: 5000
# Output settings
OUTPUT_FILE=results.tsv # Default: results.tsv
# Performance tuning
MAX_WORKERS=5 # Default: 5 concurrent calls
MAX_RETRIES=10 # Default: 10 retries
RETRY_DELAY=2.0 # Default: 2 seconds base delay
# Recording settings
RECORDING_FORMAT=mp3 # Default: mp3
RECORDING_CHANNELS=single # Default: single# Copy the example env file
cp .env.example .env
# Edit with your credentials
nano .env
# Validate configuration
telnyx-transcribe validate๐ Telnyx API โ Pay-as-you-go calling
- Programmable voice API for making/receiving calls
- Call control, recording, and webhook events
- Go to portal.telnyx.com
- Sign up and verify your account
- Create a Call Control Application:
- Navigate to "Call Control" โ "Applications"
- Create new application
- Set your webhook URL (e.g.,
https://your-server.com/webhook)
- Get a phone number:
- Navigate to "Numbers" โ "Buy Numbers"
- Purchase a number with voice capability
- Assign it to your Call Control application
- Get your credentials:
- API Key: "API Keys" section
- Connection ID: Your Call Control application's connection ID
- From Number: The number you purchased
TELNYX_API_KEY=KEY0123456789...
TELNYX_CONNECTION_ID=1234567890
TELNYX_FROM_NUMBER=+14155551234๐ง OpenAI API โ Whisper transcription
- Access to Whisper speech-to-text model
- State-of-the-art transcription accuracy
- Multi-language support
- Go to platform.openai.com
- Sign up or log in
- Navigate to API Keys
- Click "Create new secret key"
- Copy the key (starts with
sk-)
OPENAI_API_KEY=sk-...- Whisper API: $0.006 per minute of audio
- A 5-minute recording costs ~$0.03
telnyx-transcribe/
โโโ src/telnyx_transcribe/
โ โโโ cli.py # Typer CLI commands
โ โโโ app.py # Flask application factory
โ โโโ config.py # Settings management
โ โโโ models.py # Data models (Call, TranscriptionResult)
โ โโโ exceptions.py # Custom exceptions
โ โโโ services/
โ โ โโโ call_service.py # Telnyx call management
โ โ โโโ transcription_service.py # OpenAI Whisper integration
โ โ โโโ output_service.py # TSV/CSV output handling
โ โโโ webhooks/
โ โ โโโ handlers.py # Telnyx webhook processing
โ โโโ utils/
โ โโโ logging.py # Logging configuration
โ โโโ console.py # Rich console output
โโโ tests/ # Test suite
โโโ pyproject.toml # Project configuration
โโโ requirements.txt # Dependencies
โโโ .env.example # Example environment file
โโโ README.md # This file
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run with coverage
pytest --cov=telnyx_transcribe
# Type checking
mypy src/
# Linting
ruff check src/from telnyx_transcribe import Settings
from telnyx_transcribe.services import CallService, TranscriptionService
# Configure settings
settings = Settings(
telnyx_api_key="your_key",
openai_api_key="your_key",
# ... other settings
)
# Use services directly
call_service = CallService(settings)
call = call_service.initiate_call("+14155551234")
transcription_service = TranscriptionService(settings)
result = transcription_service.transcribe_file("recording.mp3")
print(result.text)Expand for troubleshooting tips
| Problem | Solution |
|---|---|
command not found: telnyx-transcribe |
Restart your terminal or run pip install --upgrade telnyx-transcribe |
TELNYX_API_KEY is required |
Create a .env file with your credentials. Run telnyx-transcribe validate to check. |
| Webhook events not received | Ensure your webhook URL is publicly accessible. Use ngrok for local testing: ngrok http 5000 |
| Transcription fails | Check your OPENAI_API_KEY is valid and has credits. Verify audio format is supported. |
| Calls not connecting | Verify TELNYX_FROM_NUMBER is assigned to your Call Control application. Check number format (E.164). |
| Recording URL not available | Telnyx needs time to process recordings. The webhook handles this automatically with retries. |
Debugging tips:
# Run with verbose logging
telnyx-transcribe --verbose call numbers.txt
# Check your configuration
telnyx-transcribe validate
# Test webhook server locally
telnyx-transcribe server --port 5000
# Then use ngrok: ngrok http 5000This project started from a simple need โ automate phone-based surveys and transcribe the responses. What began as a quick script evolved into a full-featured, production-ready tool.
MIT ยฉ Yiฤit Konur
Built with ๐ฅ because manually transcribing phone calls is a soul-crushing waste of time.
Report Bug โข Request Feature โข Contribute