Skip to content

About

Voice agent to automate conversation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VOS

We created this proto type to understand how voice orchestrations works.

Everything is a Frame

  • Audio pieces
  • LLM tokens
  • Text messages
  • Metadata

Supports MANY Providers

  • OpenAI
  • Deepgram
  • ElevenLabs
  • Google STT
  • CustomLLM (vLLM)

Flow

User Voice
   ↓
Twilio MediaStream (µ-law 8kHz audio)
   ↓
Decode µ-law → PCM16
   ↓
VAD (RMS-based silence detection)
   ↓
STT (Deepgram / OpenAI Whisper)
   ↓
Text recognized
   ↓
LLM (GPT)
   ↓
LLM Text Response
   ↓
TTS (ElevenLabs: wav/mp3 bytes)
   ↓
Decode ElevenLabs output to PCM16
   ↓
Convert PCM16 → µ-law 8kHz
   ↓
Split into 20ms frames (160 bytes)
   ↓
Base64 encode each frame
   ↓
Send to Twilio MediaStream
   ↓
User hears response

Note: Each arrow is a Processor

How To Run

uvicorn src.app:app --reload
ngrok http --url=https://test.ngrok.app  8000

Revision

  • app1.py: Basic Integration with Fake TTS/STT/LLM
  • app2.py: Integration with STT and Open AI LLM
  • app3.py: Integration with TTS
  • app4.py: Improve VAD to take complete input even if the user take pause
  • app5.py: Add BARGE-IN DETECTION
  • app6.py: Add MIN_UTTERANCE_MS & MAX_PAUSE_FRAMES
  • app7.py: Enable STT Streaming
  • app8.py: Fixed hard coded url issues
  • app9.py: Integration with LLM // We start using custom LLM Qwen 30B Model
  • app10.py: Improving VAD & BargeIN
  • app11.py: Enable CustomLLM Streaming with simple Logger
  • app12.py: Add Tool Call support
  • app13.py: Example setup with CustomLLM + ElevenLabs + Google STT (regional)
  • app14.py: Example setup with CustomLLM + ElevenLabs + Google STT (global)

How To Run Sample Revisions

uvicorn samples.app4:app --reload
ngrok http --url=https://test.ngrok.app  8000

About

Voice agent to automate conversation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages