Skip to main content

VoxStream

A lightweight, high-performance voice streaming engine for real-time AI applications.

Features

  • 🚀 Ultra-low latency - Optimized for real-time voice streaming (<10ms processing latency)
  • 🎯 Voice Activity Detection - Built-in VAD with customizable thresholds
  • 🔄 Adaptive Processing - Automatic quality adjustment based on system load
  • 🎵 Flexible Audio Support - Multiple formats and sample rates
  • 🧩 Modular Design - Easy to integrate and extend
  • 📊 Performance Monitoring - Built-in metrics and benchmarking

Installation

pip install voxstream

Or install from source:

git clone https://github.com/yourusername/voxstream.git
cd voxstream
pip install -e .

Quick Start

from voxstream import VoxStream, StreamConfig

# Create a voice stream processor
stream = VoxStream()

# Process audio in real-time
audio_chunk = b"..."  # Your audio data
processed = stream.process_audio(audio_chunk)

# With custom configuration
config = StreamConfig(
    sample_rate=16000,
    chunk_duration_ms=20
)
stream = VoxStream(config=config)

Voice Activity Detection

from voxstream import VoxStream, VADConfig

# Configure VAD
vad_config = VADConfig(
    threshold=0.02,
    speech_start_ms=100,
    speech_end_ms=300
)

# Create stream with VAD
stream = VoxStream()
stream.configure_vad(vad_config)

# Process with VAD
audio_chunk = b"..."
processed = stream.process_audio(audio_chunk)
vad_state = stream.get_vad_state()  # Returns: 'speech', 'silence', etc.

Processing Modes

VoxStream offers three processing modes optimized for different use cases:

from voxstream import VoxStream, ProcessingMode

# Real-time mode - Minimum latency
stream = VoxStream(mode=ProcessingMode.REALTIME)

# Quality mode - Maximum quality
stream = VoxStream(mode=ProcessingMode.QUALITY)

# Balanced mode - Adaptive performance
stream = VoxStream(mode=ProcessingMode.BALANCED)

Advanced Usage

Stream Processing

from voxstream import VoxStream
import asyncio

stream = VoxStream()

# Async streaming
async def process_stream(audio_source):
    async for chunk in audio_source:
        processed = stream.process_audio(chunk)
        yield processed

Performance Monitoring

# Get performance metrics
metrics = stream.get_metrics()
print(f"Average latency: {metrics['avg_latency_ms']}ms")
print(f"Chunks processed: {metrics['total_chunks']}")

Custom Processing Pipeline

# Add pre/post processors
def noise_reduction(audio: bytes) -> bytes:
    # Your noise reduction logic
    return audio

stream.add_pre_processor(noise_reduction)
stream.add_post_processor(lambda x: x)  # Your post-processor

Architecture

VoxStream is built with a modular architecture:

voxstream/
├── core/           # Core streaming engine
├── voice/          # Voice-specific features (VAD)
├── config/         # Configuration and types
├── io/             # Audio I/O utilities
└── interfaces/     # Abstract interfaces

Requirements

  • Python 3.7+
  • NumPy >= 1.21.0
  • SoundDevice >= 0.4.0 (for audio I/O)

Documentation

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

VoxStream was created to provide a simple, efficient solution for real-time voice streaming in AI applications.

Download files

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

Source Distribution

voxstream-0.1.0.tar.gz (88.8 kB view details)

Uploaded Source

Built Distribution

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

voxstream-0.1.0-py3-none-any.whl (108.3 kB view details)

Uploaded Python 3

File details

Details for the file voxstream-0.1.0.tar.gz.

File metadata

  • Download URL: voxstream-0.1.0.tar.gz
  • Upload date:
  • Size: 88.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for voxstream-0.1.0.tar.gz
Algorithm Hash digest
SHA256 288fb30a21f81686597043720c6e02b092d02dc01df81267b197d5b6d4c00076
MD5 34262d2f6047ee204ed46cf95c23e144
BLAKE2b-256 4ae6cce08b2020eecca17ff8373a488e0db41b9b7a77d4c7aecca6f01886a05c

See more details on using hashes here.

File details

Details for the file voxstream-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: voxstream-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 108.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for voxstream-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 376c28edfcff2a82597096cbe7b2d3f168a5ab3791efd4ade46332ac5aa1ad74
MD5 1123d8b26a9c6f06b449306630ea326c
BLAKE2b-256 b86519f510e672042613d6831ccebca08a256dc6177550ec82bdbcb8544d905e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

0.0.1

2 files

Supported by

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