Skip to main content

Open voice infrastructure for AI agents โ€” bridging telephony and AI

Project description

Voxtra

Open voice infrastructure for AI agents.

Built by Rexplore Research Labs


Voxtra is a Python framework that bridges telephony infrastructure (Asterisk, FreeSWITCH, LiveKit) with AI voice agents (STT, LLM, TTS). It lets developers build AI-powered call centers without needing to understand telecom internals.

Architecture

graph TD
    A["๐Ÿ“ก Cellular Provider (Airtel / TNM / etc.)"] -->|SIP Trunk| B["๐Ÿ“ž Asterisk (PBX / Call Routing)"]
    B -->|ARI + Media Stream| C["๐Ÿ”— Voxtra (Voice AI Bridge)"]
    C --> D["๐ŸŽ™๏ธ STT โ€” Deepgram"]
    C --> E["๐Ÿง  LLM โ€” OpenAI / Claude"]
    C --> F["๐Ÿ”Š TTS โ€” ElevenLabs"]

    D -->|User transcript| E
    E -->|Agent response| F
    F -->|Audio| C

    style A fill:#4a90d9,stroke:#333,color:#fff
    style B fill:#e67e22,stroke:#333,color:#fff
    style C fill:#2ecc71,stroke:#333,color:#fff
    style D fill:#9b59b6,stroke:#333,color:#fff
    style E fill:#e74c3c,stroke:#333,color:#fff
    style F fill:#1abc9c,stroke:#333,color:#fff

Layer Design

Layer Package Responsibility
Core voxtra.app, voxtra.router, voxtra.session App lifecycle, routing, call sessions
Telephony voxtra.telephony Asterisk ARI, LiveKit, FreeSWITCH adapters
Media voxtra.media Audio frames, WebSocket/RTP transport, codecs
AI voxtra.ai STT, TTS, LLM, VAD provider abstractions
Pipeline voxtra.core.pipeline Real-time STT โ†’ LLM โ†’ TTS orchestration

Quick Start

Installation

From GitHub (recommended โ€” package not yet published to PyPI):

pip install git+https://github.com/rexplore-ai/voxtra.git

With provider extras:

pip install "voxtra[asterisk,deepgram,openai,elevenlabs] @ git+https://github.com/rexplore-ai/voxtra.git"

From source (for development):

git clone https://github.com/rexplore-ai/voxtra.git
cd voxtra
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

From PyPI (coming soon):

pip install voxtra

Code-First Usage

from voxtra import VoxtraApp

app = VoxtraApp.from_yaml("voxtra.yaml")

@app.route(extension="1000")
async def support_call(session):
    await session.answer()
    await session.say("Hello, welcome to support. How can I help you?")
    text = await session.listen()
    reply = await session.agent.respond(text)
    await session.say(reply.text)
    await session.hangup()

app.run()

Config-First Usage

Create voxtra.yaml:

app_name: my-call-center

telephony:
  provider: asterisk
  asterisk:
    base_url: http://localhost:8088
    username: asterisk
    password: secret
    app_name: voxtra

media:
  transport: websocket
  codec: ulaw
  sample_rate: 8000

ai:
  stt:
    provider: deepgram
    api_key: ${DEEPGRAM_API_KEY}
    model: nova-2
  llm:
    provider: openai
    api_key: ${OPENAI_API_KEY}
    model: gpt-4o
    system_prompt: "You are a helpful voice assistant for a call center."
  tts:
    provider: elevenlabs
    api_key: ${ELEVENLABS_API_KEY}
    voice_id: your-voice-id

routes:
  - extension: "1000"
    agent: support_agent

Then run:

voxtra start

Asterisk Integration

Voxtra connects to Asterisk via ARI (Asterisk REST Interface). Add this to your Asterisk dialplan:

[voxtra-inbound]
exten => _X.,1,Stasis(voxtra)
 same => n,Hangup()

Supported Providers

Telephony

  • Asterisk (ARI) โ€” Production ready
  • LiveKit (SIP) โ€” Planned
  • FreeSWITCH โ€” Planned

Speech-to-Text

  • Deepgram (streaming)
  • More coming soon

LLM / Agents

  • OpenAI (GPT-4o, streaming)
  • LangGraph integration planned

Text-to-Speech

  • ElevenLabs (streaming)
  • More coming soon

Project Structure

src/voxtra/
โ”œโ”€โ”€ app.py                  # VoxtraApp โ€” main entry point
โ”œโ”€โ”€ session.py              # CallSession โ€” per-call handle
โ”œโ”€โ”€ router.py               # Decorator-based call routing
โ”œโ”€โ”€ events.py               # Event system
โ”œโ”€โ”€ config.py               # Pydantic config models
โ”œโ”€โ”€ middleware.py            # Event middleware
โ”œโ”€โ”€ exceptions.py           # Custom exceptions
โ”œโ”€โ”€ types.py                # Shared types
โ”œโ”€โ”€ core/
โ”‚   โ””โ”€โ”€ pipeline.py         # STT โ†’ LLM โ†’ TTS pipeline
โ”œโ”€โ”€ telephony/
โ”‚   โ”œโ”€โ”€ base.py             # TelephonyAdapter ABC
โ”‚   โ”œโ”€โ”€ asterisk/           # Asterisk ARI adapter
โ”‚   โ””โ”€โ”€ livekit/            # LiveKit adapter (stub)
โ”œโ”€โ”€ media/
โ”‚   โ”œโ”€โ”€ audio.py            # AudioFrame, codec conversion
โ”‚   โ”œโ”€โ”€ base.py             # MediaTransport ABC
โ”‚   โ”œโ”€โ”€ websocket.py        # WebSocket transport
โ”‚   โ””โ”€โ”€ buffer.py           # Audio buffering
โ””โ”€โ”€ ai/
    โ”œโ”€โ”€ stt/                # Speech-to-Text providers
    โ”œโ”€โ”€ tts/                # Text-to-Speech providers
    โ”œโ”€โ”€ llm/                # LLM / Agent providers
    โ””โ”€โ”€ vad/                # Voice Activity Detection

Documentation

  • Architecture โ€” Deep-dive into every layer, component, data flow, and design decision
  • Contributing โ€” How to set up dev environment, add providers, submit PRs, and code standards

Development

git clone git@github.com:rexplore-ai/voxtra.git
cd voxtra
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest

Roadmap

  • Core abstractions (VoxtraApp, Router, CallSession, Events)
  • Asterisk ARI adapter
  • AI provider interfaces (STT, TTS, LLM, VAD)
  • WebSocket media transport
  • Voice pipeline (STT โ†’ LLM โ†’ TTS)
  • End-to-end Asterisk + AI demo
  • LiveKit adapter
  • FreeSWITCH adapter
  • LangGraph agent integration
  • Multi-agent handoff
  • Dashboard / Admin API
  • Conversation analytics

Contributors

Thanks to everyone who has contributed to Voxtra!

Patrick Byamasu

Patrick Byamasu โ€” Creator & Lead Maintainer

Want to contribute? Check out our Contributing Guide.

License

Apache 2.0 โ€” See LICENSE


Voxtra โ€” The LangGraph of AI Telephony Built by Rexplore Research Labs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voxtra-0.1.0a1.tar.gz (54.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voxtra-0.1.0a1-py3-none-any.whl (50.6 kB view details)

Uploaded Python 3

File details

Details for the file voxtra-0.1.0a1.tar.gz.

File metadata

  • Download URL: voxtra-0.1.0a1.tar.gz
  • Upload date:
  • Size: 54.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for voxtra-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 f57eaff9ea6a43b910cdeeb2405e1a9b05bfb0c70b968b1d690a0c7873c6821c
MD5 0b16503f7ef1b936e8a040335dadf226
BLAKE2b-256 cc1369c2fdaa9d973a8d363a9a856a7dc95a79c335c62bfeca089686e38527bb

See more details on using hashes here.

File details

Details for the file voxtra-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: voxtra-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 50.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for voxtra-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 31414c39f9365a59f9e1755e67398499305c487444f3d506f1151ea55dd94c91
MD5 88cd23a25f15a3403299f88186907513
BLAKE2b-256 63eff14d22fdd533bb78a6049250b36991d1d7e55c2a2c95080225468b90a461

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page