I can use text to get audio response and barge in

This commit is contained in:
Xin Wang
2026-01-29 16:25:53 +08:00
parent cd90b4fb37
commit ac0c76e6e8
16 changed files with 3394 additions and 119 deletions

30
.env.example Normal file
View File

@@ -0,0 +1,30 @@
# Server Configuration
HOST=0.0.0.0
PORT=8000
# Audio Configuration
SAMPLE_RATE=16000
CHUNK_SIZE_MS=20
# VAD Configuration
VAD_THRESHOLD=0.5
VAD_EOU_THRESHOLD_MS=400
# OpenAI / LLM Configuration (required for duplex voice)
OPENAI_API_KEY=sk-your-openai-api-key-here
# OPENAI_API_URL=https://api.openai.com/v1 # Optional: for Azure or compatible APIs
LLM_MODEL=gpt-4o-mini
LLM_TEMPERATURE=0.7
# TTS Configuration
TTS_VOICE=en-US-JennyNeural
TTS_SPEED=1.0
# Duplex Pipeline Configuration
DUPLEX_ENABLED=true
# DUPLEX_GREETING=Hello! How can I help you today?
DUPLEX_SYSTEM_PROMPT=You are a helpful, friendly voice assistant. Keep your responses concise and conversational.
# Logging
LOG_LEVEL=INFO
LOG_FORMAT=text