Core Service URLs
These variables configure connections between Unmute services.WebSocket URL for the speech-to-text service.Supports both
ws:// and http:// protocols (automatically converted to WebSocket).Docker Compose default: ws://stt:8080WebSocket URL for the text-to-speech service.Supports both
ws:// and http:// protocols (automatically converted to WebSocket).Docker Compose default: ws://tts:8080HTTP URL for the LLM service (OpenAI-compatible API).Docker Compose default:
http://llm:8000Override the LLM model name.If not set, the backend uses the default model from the LLM server. Required when using external LLM providers.Example with Ollama:Example with OpenAI:
API key for authenticating with the LLM service.Not required for the default vLLM setup, but necessary for external providers like OpenAI, Anthropic, or Mistral.Example:
HTTP URL for the optional voice cloning service.Voice cloning allows users to upload custom voice samples. This service is optional.
Redis connection URL for distributed caching.If not set, an in-memory dictionary cache is used instead. Redis is recommended for production deployments with multiple backend instances.Example:
External API Keys
Hugging Face access token for downloading gated models.Required for:See the Hugging Face Setup guide for details.
- LLM models (Mistral, Llama, Gemma)
- Speech-to-text models
- Text-to-speech models
hf_Set in your shell before running Docker Compose:API key for NewsAPI.org.Used by the “Dev (news)” character voice to fetch recent news articles from The Verge. Optional feature.Example:
Cloudflare Calls API key ID for TURN server configuration.Used with
TURN_KEY_API_TOKEN to generate ICE servers for WebRTC connections. Optional for most deployments.Cloudflare Calls API token for TURN server configuration.Works with
TURN_KEY_ID. See Cloudflare Calls documentation for setup.File Storage
Directory for storing voice donation submissions.Relative to the repository root. Used by the voice donation feature.Default:
{repo_root}/voices/donationDirectory for saving conversation recordings.If not set, recordings are disabled. When enabled, each conversation is saved with audio and event data for debugging.Example:
Development Variables
API key for Freesound.org.Only needed if you’re downloading new voice samples from Freesound for character voices. Not required for running Unmute.
OpenAI API key.Only used in example scripts (
example_websocket_client.py). Not required for running Unmute.Configuration Examples
Default Docker Compose Setup
Using External OpenAI API
Replace the local vLLM service with OpenAI:Using Ollama Locally
Connect to Ollama running on your host machine:Production Setup with Redis
Dockerless Environment
For dockerless deployment, set these in your shell:Validation
To verify your environment variables are set correctly:Security Best Practices
- Store sensitive variables in
.envfiles (add to.gitignore) - Use separate tokens for development and production
- Rotate API keys periodically
- Use read-only Hugging Face tokens for production
- Consider using secret management tools (AWS Secrets Manager, HashiCorp Vault) for production deployments