Skip to content

psychopathdev/voxavatar

Repository files navigation

voxavatar

CI License: MIT Python

voxavatar is a small, dependency-free toolkit for building voice-driven digital humans in Python: the glue between speech recognition, an LLM, speech synthesis, and the lip-sync that makes an avatar's mouth move.

It does not ship its own ASR/LLM/TTS models. Instead it gives you:

  • clean provider protocols (ASRProvider, LLMProvider, TTSProvider) and a registry, so real backends drop in behind a stable interface;
  • a streaming pipeline that turns one user utterance into a stream of transcript → response → audio → viseme events, emitting the first audio as soon as the first sentence is ready;
  • a real grapheme→phoneme→viseme timeline generator (Oculus OVR15 visemes, with an ARKit 52-blendshape exporter for Unity/Unreal);
  • an energy-based VAD and a conversation session with barge-in;
  • deterministic reference backends so the whole thing runs and tests offline, with no API keys and nothing to download.

Features at a glance

area what you get
Providers typed protocols + a case-insensitive registry
Pipeline streaming events, sentence segmentation, per-stage error isolation, metrics
Visemes OVR15 mapping, attack/release envelope, co-articulation, ARKit CSV export
Audio PCM16 WAV I/O, framing, RMS, energy VAD + endpointing, linear resample
Phonemes rule-based G2P with digraphs, silent-e, and contraction handling
CLI voxavatar say / voxavatar providers

Install

pip install voxavatar

The core has zero runtime dependencies — just the Python standard library.

Quickstart

from voxavatar import text_to_visemes

timeline = text_to_visemes("hello world")
print(timeline.to_json())

Or run the whole pipeline with the bundled reference providers:

from voxavatar import Pipeline
from voxavatar.types import AudioBuffer

pipe = Pipeline()                       # mock_asr + echo_llm + sine_tts
mic = AudioBuffer(samples=(0,) * 16000, sample_rate=16000)
for event in pipe.run(mic):
    print(event)

CLI

voxavatar say "hello there" -o hello.wav --visemes hello.json
voxavatar say "open wide" --arkit frames.csv      # ARKit blendshape CSV
voxavatar providers                                # list registered backends

Examples

Runnable, dependency-free walkthroughs live in examples/:

  1. 01_hello_session — a minimal conversation Session
  2. 02_streaming_pipeline — the full pipeline, event by event
  3. 03_text_to_visemes — text → OVR15 viseme piano-roll
  4. 04_arkit_export — ARKit blendshape CSV for Unity/Unreal
  5. 05_custom_provider — register your own backend

Documentation

License

MIT — see LICENSE.

About

Voice-LLM digital human orchestration: pluggable ASR/LLM/TTS providers, an energy VAD, a streaming pipeline, and a phoneme-to-viseme timeline generator with ARKit export. Zero runtime dependencies.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages