diff --git a/README.md b/README.md index 9915aa8..d3e8ead 100644 --- a/README.md +++ b/README.md @@ -287,9 +287,9 @@ PIPER_SPEAKER_ID_ES= but new deployments should prefer `PIPER_MODEL_PATH_EN` and `PIPER_MODEL_PATH_ES`. If the requested language-specific model is missing, the agent logs the actual fallback source, for example -`piper_voice_source=piper_model_path_es_fallback`. On the CPU demo image, that -means English text can temporarily fall back to the bundled Spanish voice until -an English Piper model is added through `PIPER_MODEL_PATH_EN`. +`piper_voice_source=piper_model_path_es_fallback`. The CPU deployment image is +expected to include both the Spanish and English Piper models and should set +`PIPER_MODEL_PATH_EN` to the English model path. A site can override the full session instructions through LiveKit room metadata (`agent_prompt`) or future site configuration. Code, comments, tests, and public diff --git a/src/config.py b/src/config.py index 4668129..8c5ad53 100644 --- a/src/config.py +++ b/src/config.py @@ -151,7 +151,7 @@ class Settings(BaseSettings): description="Optional legacy language-agnostic Piper ONNX voice fallback", ) piper_model_path_en: str | None = Field( - default=None, + default="/srv/piper/voices/en_US-lessac-medium.onnx", description="Optional Piper ONNX voice model for English agent voice", ) piper_model_path_es: str | None = Field( diff --git a/tests/test_local_providers.py b/tests/test_local_providers.py index ddc3673..ffd5563 100644 --- a/tests/test_local_providers.py +++ b/tests/test_local_providers.py @@ -141,6 +141,18 @@ def test_piper_voice_selection_settings_are_available(self): assert s.piper_speaker_id_en == 1 assert s.deepgram_enable_diarization is True + def test_piper_english_voice_has_image_default(self): + s = Settings( + livekit_url="ws://localhost:7880", + livekit_api_key="k", + livekit_api_secret="s", + tts_provider="piper", + llm_provider="ollama", + stt_provider="whisper", + ) + + assert s.piper_model_path_en == "/srv/piper/voices/en_US-lessac-medium.onnx" + class TestFullLocalStack: def test_all_local_no_api_keys(self, monkeypatch):