Skip to main content

AI-powered call center with natural conversation capabilities (Pure Python)

Project description

ZeroVoice Python ๐Ÿ

AI-powered call center in a pip package - Natural conversations, concurrent calling, and real-time monitoring.

๐Ÿš€ Quick Start

# Install from PyPI
pip install zerovoice

# Or install from source
git clone https://github.com/collinparan/zero-voice.git
cd zero-voice/python
pip install .

โšก Features

  • ๐Ÿฆ€ Rust Performance: Core written in Rust, 10x faster than pure Python
  • ๐ŸŽญ Natural Conversations: ElevenLabs-style back-and-forth dialogue
  • ๐Ÿ“ž Concurrent Calls: Handle 100+ simultaneous calls
  • ๐Ÿ“Š Web Dashboard: Beautiful monitoring interface
  • ๐ŸŽฏ Simple API: Pythonic interface for non-Rust developers

๐Ÿ“– Basic Usage

Configure

from zerovoice import configure

configure(
    twilio_sid="your_account_sid",
    twilio_token="your_auth_token",
    twilio_phone="+1234567890",
    webhook_url="https://your-domain.ngrok.io"
)

Make Calls

from zerovoice import CallCenter

# Initialize
center = CallCenter(max_concurrent=10)

# Single call
call_id = center.make_call(
    to_number="+0987654321",
    message="Hello, this is an automated call",
    personality="Alex"  # or "Jamie", "Sam"
)

# Campaign
campaign_id = center.start_campaign(
    phone_numbers=["+111", "+222", "+333"],
    script="Hi {name}, calling about {topic}...",
    personality="Jamie"
)

# Get stats
stats = center.get_stats()
print(f"Success rate: {stats['success_rate']:.1%}")

Natural Conversations

from zerovoice import ConversationManager

# Start conversation
manager = ConversationManager(personality="Alex")
session_id = manager.start_session(
    objectives=["Get feedback", "Schedule follow-up"]
)

# Process dialogue
response = manager.process_turn(
    session_id,
    "Hi, I received your call about my order"
)
print(response['text'])
# "Hello! Yes, I'm calling about your recent order. How was your experience?"

Web Dashboard

from zerovoice.dashboard import run_dashboard

# Launch dashboard
run_dashboard(port=8080)
# Visit http://localhost:8080

๐Ÿ–ฅ๏ธ Command Line Interface

# Configure
zerovoice setup --sid YOUR_SID --token YOUR_TOKEN --phone +1234567890

# Make a call
zerovoice call +0987654321 -m "Hello from ZeroVoice" -p Alex

# Launch campaign
zerovoice campaign -f contacts.csv -s "Survey about {product}" -c 20

# View statistics
zerovoice stats

# Call history
zerovoice history --limit 10

# View transcript
zerovoice transcript CALL_ID

# Search calls
zerovoice search +1234567890

# Launch dashboard
zerovoice dashboard --port 8080

๐Ÿ“Š Dashboard Features

The dashboard provides:

  • Real-time Statistics: Live metrics updated every 5 seconds
  • Call History: Searchable log of all calls
  • Transcript Viewer: Read full conversations
  • Quick Dial: Make calls from the browser
  • Campaign Launcher: Start bulk calling campaigns
  • Audio Playback: Listen to call recordings

๐Ÿ› ๏ธ Advanced Usage

Custom Configuration

# Use SQLite database
center = CallCenter(
    max_concurrent=50,
    database_url="sqlite:///path/to/calls.db"
)

# Custom personalities
manager = ConversationManager(personality="Sam")

Webhook Integration

# Process Twilio webhooks
from flask import Flask, request
from zerovoice import CallCenter

app = Flask(__name__)
center = CallCenter()

@app.route('/webhook', methods=['POST'])
def handle_webhook():
    call_data = request.form
    # Process call data
    return "OK"

Batch Operations

# Process CSV file
import csv

with open('contacts.csv') as f:
    reader = csv.DictReader(f)
    numbers = [row['phone'] for row in reader]

campaign_id = center.start_campaign(
    phone_numbers=numbers,
    script="Personalized message...",
    personality="Jamie"
)

๐Ÿ—๏ธ Architecture

zerovoice/
โ”œโ”€โ”€ Core (Rust)          # High-performance engine
โ”‚   โ”œโ”€โ”€ Call management
โ”‚   โ”œโ”€โ”€ Conversation AI
โ”‚   โ””โ”€โ”€ Database layer
โ”œโ”€โ”€ Python Bindings      # PyO3 interface
โ””โ”€โ”€ Python Package       # User-friendly API
    โ”œโ”€โ”€ CLI
    โ”œโ”€โ”€ Dashboard
    โ””โ”€โ”€ Utilities

๐Ÿ”ง Development

Install for Development

# Clone repository
git clone https://github.com/collinparan/zero-voice.git
cd zero-voice/python

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black zerovoice

Building from Source

# Install maturin
pip install maturin

# Build Rust extension
maturin develop

# Build wheel
maturin build --release

๐Ÿ“‹ Requirements

  • Python 3.8+
  • Twilio Account
  • ngrok (for local development)

๐Ÿณ Docker Support

# Using pre-built image
docker run -p 8080:8080 zerovoice/dashboard

# Build your own
docker build -t my-zerovoice .
docker run -p 8080:8080 my-zerovoice

๐Ÿ“ˆ Performance

  • Concurrent Calls: 100+ simultaneous
  • Response Time: <100ms per turn
  • Memory Usage: <50MB for 1000 active calls
  • Database: SQLite for simplicity, PostgreSQL for scale

๐Ÿค Contributing

Contributions welcome! See CONTRIBUTING.md

๐Ÿ“„ License

MIT License - see LICENSE

๐Ÿ”— Links

๐Ÿ†˜ Support


Built with โค๏ธ using Rust ๐Ÿฆ€ and Python ๐Ÿ

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

zerovoice-0.6.1.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

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

zerovoice-0.6.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file zerovoice-0.6.1.tar.gz.

File metadata

  • Download URL: zerovoice-0.6.1.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for zerovoice-0.6.1.tar.gz
Algorithm Hash digest
SHA256 6cbc24be0126ea775ccab988df50a6ffad96e5df44c7377dd2f2a75ad7cbf840
MD5 e5dd3dbd63706a65103fa83456ec2325
BLAKE2b-256 d35a6f849189bc587a25b31a97f42152d250991820230cc7313864164ad5a04f

See more details on using hashes here.

File details

Details for the file zerovoice-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: zerovoice-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for zerovoice-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 365c9abfcd31bc9da79394cf4e69ecea68f818e505e53380765adf4ba6b06139
MD5 f32f7aae51e5f86c01d907b86ccf6405
BLAKE2b-256 f90179b3139e365403ed0b8ce8cc13180111bb18120d110f26e35d47a18484fa

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