selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
voice-chat-ai logo

Self-host voice-chat-ai

v1.4.1

Voice chat with AI characters via local and cloud models

ReleaseOpen SourceMIT
docker run -d -e "PULSE_SERVER=/mnt/wslg/PulseServer" -v /mnt/wslg/:/mnt/wslg/ -v ./elevenlabs_voices.json:/app/elevenlabs_voices.json --env-file .env --name voice-chat-ai -p 8000:8000 bigsk1/voice-chat-ai:latest
Updated9 hours ago
LanguagePython
Setup difficultyModerate
Stars
468
Port
8000 (Web UI / API served by uvicorn)
Requires
Ffmpeg
Docker
bigsk1/voice-chat-ai
voice-chat-ai screenshot 1voice-chat-ai screenshot 2

What is voice-chat-ai?

Voice Chat AI lets you hold spoken conversations with a large library of built-in AI characters (Einstein, a wizard, HAL 9000 and dozens more) through a FastAPI web UI or a feature-rich terminal CLI. Chat can go to Ollama, OpenAI, xAI or Anthropic models, while speech can be produced locally with Spark-TTS zero-shot voice cloning, Kokoro or Qwen3-TTS, or through cloud APIs from OpenAI, ElevenLabs, xAI, Typecast and Speechify; transcription defaults to OpenAI with an optional local Faster Whisper. It supports an OpenAI Enhanced mode with emotional TTS instructions, WebRTC-based OpenAI Realtime speech-to-speech conversations with natural interruption (or a self-hosted GA-compatible realtime server), mood-aware replies via sentiment analysis, spoken triggers that have the model describe your desktop, plus 15+ interactive games and immersive story adventures. You install it natively with Python 3.11+, ffmpeg and a virtualenv, or run the bigsk1/voice-chat-ai Docker image (base CPU or CUDA variant) with a .env file; the UI is served on port 8000. The maintainer recommends native installation over Docker because container audio requires PulseAudio/microphone mapping.

Should you self-host voice-chat-ai?

voice-chat-ai scores 46/100 on selfhost.directory (how scoring works) and ranks #41 of 69 in AI Chat. It has 468 GitHub stars.

It shipped 6 stable releases in the past year. The latest, v1.4.1, came out on 25 September 2026. New versions land roughly every 2 months.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is LibreChat (85/100, 46 421 stars). It scores higher overall, so compare the two before you pick. See voice-chat-ai vs LibreChat side by side.

Features

  • Built-in character library
  • Custom characters
  • Docker CUDA support
  • Emotional TTS mode
  • Interactive games
  • Interactive stories
  • Local voice cloning
  • Mood / sentiment analysis
  • Multiple LLM providers
  • Multiple TTS providers
  • Realtime speech-to-speech
  • Screen vision
  • Speech recognition
  • Terminal/CLI mode
  • Web UI

voice-chat-ai README

How to install voice-chat-ai

Install voice-chat-ai with Docker

Environment variables
MODEL_PROVIDER, TTS_PROVIDER, OPENAI_API_KEY, ELEVENLABS_API_KEY
docker pull bigsk1/voice-chat-ai:latest
docker run -d -e "PULSE_SERVER=/mnt/wslg/PulseServer" -v /mnt/wslg/:/mnt/wslg/ -v ./elevenlabs_voices.json:/app/elevenlabs_voices.json --env-file .env --name voice-chat-ai -p 8000:8000 bigsk1/voice-chat-ai:latest

A .env file with API keys must be in the working directory; native install is recommended for microphone access.

How to configure voice-chat-ai

  • ALSA_CARDSuppress ALSA warnings in WSL2

    Suppress ALSA warnings in WSL2

  • ANTHROPIC_API_KEY
  • ANTHROPIC_MODELclaude-sonnet-4-6Anthropic Configuration: claude-sonnet-4-6, claude-sonnet-4-5, claude-haiku-4-5-20251001

    Anthropic Configuration: claude-sonnet-4-6, claude-sonnet-4-5, claude-haiku-4-5-20251001

  • AUDIODEV
  • CHARACTER_NAMEbigfootCharacter to use - Options: alien_scientist, anarchist, ant_anarchist, bigfoot, bipolar_ai, capo_mio, chatgpt, clumsyhero, conandoyle, conspiracy, cyberpunk, detective, dog, dream_weaver, drill_sergeant, einstein, elon_musk, femme_fatale, fight_club, fitness_trainer, ghost, granny, grok_xai, hal9000, haunted_teddybear, insult, joker, method_actor, morpheus, mouse, mumbler, nebula_barista, nerd, ne

    Character to use - Options: alien_scientist, anarchist, ant_anarchist, bigfoot, bipolar_ai, capo_mio, chatgpt, clumsyhero, conandoyle, conspiracy, cyberpunk, detective, dog, dream_weaver, drill_sergeant, einstein, elon_musk, femme_fatale, fight_club, fitness_trainer, ghost, granny, grok_xai, hal9000, haunted_teddybear, insult, joker, method_actor, morpheus, mouse, mumbler, nebula_barista, nerd, ne

  • DEBUGfalseDebug settings - true or false Set to true to enable extensive debug output

    Debug settings - true or false Set to true to enable extensive debug output

  • DEBUG_AUDIO_LEVELSfalseSet to true to see audio level readings during recording

    Set to true to see audio level readings during recording

  • ELEVENLABS_API_KEYElevenLabs Configuration: (replace with your actual API key)

    ElevenLabs Configuration: (replace with your actual API key)

  • ELEVENLABS_TTS_MODELeleven_multilingual_v2ElevenLabs TTS Model eleven_multilingual_v2 , eleven_flash_v2_5 is faster but less quality

    ElevenLabs TTS Model eleven_multilingual_v2 , eleven_flash_v2_5 is faster but less quality

  • ELEVENLABS_TTS_VOICEDefault voice ID - find voice id's in your elevenlabs account

    Default voice ID - find voice id's in your elevenlabs account

  • FASTER_WHISPER_LOCALfalseLocal Transcription settings - true or false Set to false to skip loading Faster Whisper on startup and use OpenAI transcription

    Local Transcription settings - true or false Set to false to skip loading Faster Whisper on startup and use OpenAI transcription

  • KOKORO_BASE_URLKokoro API base URL - default is localhost, change if running on another machine or in docker

    Kokoro API base URL - default is localhost, change if running on another machine or in docker

  • KOKORO_PASSWORD
  • KOKORO_TTS_VOICEaf_bellaKokoro TTS Configuration: bm_fable, bm_daniel, bm_lewis, af_alloy, af_bella See the kokoro web url ( if you have it installed ) for more voices http://localhost:8880/web/

    Kokoro TTS Configuration: bm_fable, bm_daniel, bm_lewis, af_alloy, af_bella See the kokoro web url ( if you have it installed ) for more voices http://localhost:8880/web/

  • KOKORO_USERNAMEFor remote Kokoro TTS basic auth username and password if needed

    For remote Kokoro TTS basic auth username and password if needed

  • KOKORO_VOICES_LEGACYKokoro v0.4+ returns voice objects instead of plain strings; the app handles both automatically. https://github.com/remsky/Kokoro-FastAPI/blob/v0.4.0/CHANGELOG.md Set to true only if you need to force the legacy ?legacy=true voice list from Kokoro-FastAPI.

    Kokoro v0.4+ returns voice objects instead of plain strings; the app handles both automatically. https://github.com/remsky/Kokoro-FastAPI/blob/v0.4.0/CHANGELOG.md Set to true only if you need to force the legacy ?legacy=true voice list from Kokoro-FastAPI.

  • LOCAL_REALTIME_SILENCE_MS1000Wait this long after speech falls quiet before ending the user's turn.

    Wait this long after speech falls quiet before ending the user's turn.

  • LOCAL_REALTIME_URLLocal Realtime settings. Used only when OPENAI_REALTIME_PROVIDER=local. see https://github.com/bigsk1/realtime This server accepts raw SDP and does not use the OpenAI API key.

    Local Realtime settings. Used only when OPENAI_REALTIME_PROVIDER=local. see https://github.com/bigsk1/realtime This server accepts raw SDP and does not use the OpenAI API key.

  • LOCAL_REALTIME_VAD_THRESHOLD0.6Lower values detect softer speech; higher values reject more background noise.

    Lower values detect softer speech; higher values reject more background noise.

  • LOCAL_REALTIME_VOICEAidenOptions: Aiden, Ryan, Vivian, Serena, Uncle_Fu, Dylan, Eric, Ono_Anna, Sohee

    Options: Aiden, Ryan, Vivian, Serena, Uncle_Fu, Dylan, Eric, Ono_Anna, Sohee

  • MAX_CHAR_LENGTHAUDIO GENERATION LENGTH Maximum character length for audio generation - set to 2000+ for stories and games, 3000 for assassin story, 4000 for mars encounter interactive MAX_CHAR_LENGTH is used for openai, elevenlabs, kokoro and speechify, is also used for max tokens for chat response, if MAX_CHAR_LENGTH is 500, then 500 * 4 // 3 = 666 max tokens is sent to provider

    AUDIO GENERATION LENGTH Maximum character length for audio generation - set to 2000+ for stories and games, 3000 for assassin story, 4000 for mars encounter interactive MAX_CHAR_LENGTH is used for openai, elevenlabs, kokoro and speechify, is also used for max tokens for chat response, if MAX_CHAR_LENGTH is 500, then 500 * 4 // 3 = 666 max tokens is sent to provider

  • MODEL_PROVIDERopenaiModel Provider: openai or ollama or xai or anthropic

    Model Provider: openai or ollama or xai or anthropic

  • OLLAMA_BASE_URLhttp://localhost:11434
  • OLLAMA_MODELllama3.2Ollama Models Configuration: Models to use - OPTIONAL: For screen analysis, if MODEL_PROVIDER is ollama, llava will be used by default. Model to use - llama3.1 or 3.2 works well for local usage. In the UI it will get the list of models from /api/tags and display them. Not all models are supported. Uncencored model Godmoded/llama3-lexi-uncensored:latest

    Ollama Models Configuration: Models to use - OPTIONAL: For screen analysis, if MODEL_PROVIDER is ollama, llava will be used by default. Model to use - llama3.1 or 3.2 works well for local usage. In the UI it will get the list of models from /api/tags and display them. Not all models are supported. Uncencored model Godmoded/llama3-lexi-uncensored:latest

  • OLLAMA_NUM_CTXOptional: increase Ollama context window (num_ctx). Leave unset to use the model default. Requires enough RAM/VRAM for large values (e.g. 128000).

    Optional: increase Ollama context window (num_ctx). Leave unset to use the model default. Requires enough RAM/VRAM for large values (e.g. 128000).

  • OPENAI_API_KEYOpenAI API Key for models and speech (replace with your actual API key)

    OpenAI API Key for models and speech (replace with your actual API key)

  • OPENAI_BASE_URLEndpoints: Set these below and no need to change often

    Endpoints: Set these below and no need to change often

  • OPENAI_MODELgpt-5-miniOpenAI Configuration: gpt-4o-mini- gpt-4o, gpt-5-mini-2025-08-07, gpt-5-mini

    OpenAI Configuration: gpt-4o-mini- gpt-4o, gpt-5-mini-2025-08-07, gpt-5-mini

  • OPENAI_MODEL_TTSgpt-4o-mini-ttsOpenAI TTS Model- NEW it uses emotions see https://www.openai.fm/ Model options: gpt-4o-mini-tts, tts-1, tts-1-hd (use tts-1 for local Qwen3 — see docs/QWEN3_TTS.md)

    OpenAI TTS Model- NEW it uses emotions see https://www.openai.fm/ Model options: gpt-4o-mini-tts, tts-1, tts-1-hd (use tts-1 for local Qwen3 — see docs/QWEN3_TTS.md)

  • OPENAI_REALTIME_MODELgpt-realtime-2.1-miniHosted OpenAI Realtime model. Options: gpt-realtime-2.1, gpt-realtime-2.1-mini (lower cost), gpt-realtime-1.5 Prefer the full model for long character prompts.

    Hosted OpenAI Realtime model. Options: gpt-realtime-2.1, gpt-realtime-2.1-mini (lower cost), gpt-realtime-1.5 Prefer the full model for long character prompts.

  • OPENAI_REALTIME_PROVIDERopenaiRealtime WebRTC backend: openai (hosted default) or local (GA-compatible server)

    Realtime WebRTC backend: openai (hosted default) or local (GA-compatible server)

  • OPENAI_TRANSCRIPTION_MODELgpt-4o-mini-transcribeOpenAI Enhanced Mode Transcription Model Model options: gpt-4o-transcribe, gpt-4o-mini-transcribe, whisper-1

    OpenAI Enhanced Mode Transcription Model Model options: gpt-4o-transcribe, gpt-4o-mini-transcribe, whisper-1

  • OPENAI_TTS_URLhttps://api.openai.com/v1/audio/speechOpenai compatible TTS URL ( can use custom TTS server like Qwen3 TTS see docs/QWEN3_TTS.md)

    Openai compatible TTS URL ( can use custom TTS server like Qwen3 TTS see docs/QWEN3_TTS.md)

  • OPENAI_TTS_VOICEonyxOpenAI TTS Voice - Used when TTS_PROVIDER is set to openai above Voice options: alloy, echo, fable, onyx, nova, shimmer, ash, coral, sage

    OpenAI TTS Voice - Used when TTS_PROVIDER is set to openai above Voice options: alloy, echo, fable, onyx, nova, shimmer, ash, coral, sage

  • SPARKTTS_MAX_CHARS1000
  • SPARKTTS_MODEL_DIRpretrained_models/Spark-TTS-0.5B
  • SPEECHIFY_API_KEYSpeechify TTS Configuration: Get your API key at https://platform.speechify.ai/signup?utm_source=github&utm_medium=integration&utm_campaign=voice-chat-ai (see docs/SPEECHIFY.md)

    Speechify TTS Configuration: Get your API key at https://platform.speechify.ai/signup?utm_source=github&utm_medium=integration&utm_campaign=voice-chat-ai (see docs/SPEECHIFY.md)

  • SPEECHIFY_TTS_LANGUAGEOptional: language of the text, e.g. fr-FR. Leave blank to use the voice's own locale.

    Optional: language of the text, e.g. fr-FR. Leave blank to use the voice's own locale.

  • SPEECHIFY_TTS_MODELsimba-3.5Model: simba-3.5 (recommended, 48 languages, works with every voice), simba-3.2 (English only) or simba-3.0 (six languages)

    Model: simba-3.5 (recommended, 48 languages, works with every voice), simba-3.2 (English only) or simba-3.0 (six languages)

  • SPEECHIFY_TTS_VOICEDefault voice. The dashboard lists every voice your key can use with the model below.

    Default voice. The dashboard lists every voice your key can use with the model below.

  • STT_SILENCE_DURATION2.0Built-in microphone STT: how long to wait after you stop speaking (seconds of silence) Increase (e.g. 4.0–6.0) if recording cuts off while you pause mid-sentence

    Built-in microphone STT: how long to wait after you stop speaking (seconds of silence) Increase (e.g. 4.0–6.0) if recording cuts off while you pause mid-sentence

  • STT_SILENCE_THRESHOLD300Mean audio level below this counts as silence (lower = more sensitive, stops sooner)

    Mean audio level below this counts as silence (lower = more sensitive, stops sooner)

  • TTS_PROVIDERText-to-Speech (TTS) Configuration: TTS Provider - Options: sparktts (local uses the custom character .wav) or openai (uses OpenAI TTS voice) or xai or elevenlabs or kokoro (your own selfhosted tts) or typecast or speechify

    Text-to-Speech (TTS) Configuration: TTS Provider - Options: sparktts (local uses the custom character .wav) or openai (uses OpenAI TTS voice) or xai or elevenlabs or kokoro (your own selfhosted tts) or typecast or speechify

  • TYPECAST_API_KEYTypecast TTS Configuration: Get your API key at https://typecast.ai

    Typecast TTS Configuration: Get your API key at https://typecast.ai

  • TYPECAST_EMOTION_PRESETnormalEmotion preset: normal, happy, sad, angry, whisper, toneup, tonedown

    Emotion preset: normal, happy, sad, angry, whisper, toneup, tonedown

  • TYPECAST_TTS_MODELssfm-v30Model: ssfm-v30 (default, supports smart emotion) or ssfm-v21

    Model: ssfm-v30 (default, supports smart emotion) or ssfm-v21

  • TYPECAST_TTS_VOICEVoice ID from your Typecast account

    Voice ID from your Typecast account

  • UI_SERVER_LOGStrueDashboard-only terminal log panel (streams server output to the UI via /ws/logs)

    Dashboard-only terminal log panel (streams server output to the UI via /ws/logs)

  • VOICE_SPEED1.0Voice Speed for all TTS providers - 0.7 to 1.2, default is 1.0

    Voice Speed for all TTS providers - 0.7 to 1.2, default is 1.0

  • XAI_API_KEY
  • XAI_BASE_URLhttps://api.x.ai/v1
  • XAI_CHAT_TIMEOUTOptional request timeout override in seconds. Defaults: 45 normally, 120 for Grok 4.5.

    Optional request timeout override in seconds. Defaults: 45 normally, 120 for Grok 4.5.

  • XAI_MODELgrok-4.3XAI Configuration: Chat options: grok-4.3 (fast/no reasoning), grok-4.5 (low reasoning)

    XAI Configuration: Chat options: grok-4.3 (fast/no reasoning), grok-4.5 (low reasoning)

  • XAI_TTS_BIT_RATE
  • XAI_TTS_FORMATmp3Playable dashboard/CLI formats: mp3 or wav

    Playable dashboard/CLI formats: mp3 or wav

  • XAI_TTS_LANGUAGEenDefault language is English. Use auto for language detection.

    Default language is English. Use auto for language detection.

  • XAI_TTS_SAMPLE_RATEOptional output tuning. Leave blank to use xAI defaults.

    Optional output tuning. Leave blank to use xAI defaults.

  • XAI_TTS_TIMEOUT180Increase for long story/game responses that need more time to synthesize.

    Increase for long story/game responses that need more time to synthesize.

  • XAI_TTS_URLhttps://api.x.ai/v1/tts
  • XAI_TTS_VOICEevexAI Grok TTS Configuration: https://x.ai/api/voice for examples to listen to The dashboard exposes the current built-in voice catalog; the default is eve.

    xAI Grok TTS Configuration: https://x.ai/api/voice for examples to listen to The dashboard exposes the current built-in voice catalog; the default is eve.

  • XAI_VISION_MODELgrok-4.3Image understanding defaults to the fast multimodal model.

    Image understanding defaults to the fast multimodal model.

voice-chat-ai releases & version history

More in Voice Assistants

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…