feat: per-turn response language constrained to TTS-supported languages #5
Loading…
Reference in a new issue
No description provided.
Delete branch "devel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per-turn response language constrained to TTS-supported languages
The pipeline already plumbed
language_codefrom STT through LLM output toTTSInput, but the LLM could reply in any language and Qwen3-TTS discarded the per-turn code, always synthesizing with its setup-time language.What this adds
resolve_effective_language()(src/computer/LLM/utils.py): maps a detected language onto the TTS-supported set, falling back to a configurable default.--enable_lang_promptinstruction is built, so the model never writes text TTS cannot speak; the resolved code is stamped on the turn for TTS.input_audiopart, and the reply's language is detected from generated text via lingua (≥20 chars) and stamped onto output chunks.process()now resolves each turn'slanguage_codethroughQWEN3_LANGUAGE_ALIASES(base-prefix fallback, configured default otherwise) and threads it into_process_voice_clone/_process_custom_voice/_process_voice_design; existing mixed-language coalescing guard unchanged.--tts_supported_languages/--tts_default_languageadded to shared LM args (verified parseable by HfArgumentParser); documented insrc/computer/LLM/README.md.Also updates the main README: wake word model training is complete (
computer.onnx), noted as a non-distributed asset like chimes/voice data.Testing
tests/test_llm_utils.py,tests/test_language_model_base_arguments.py, plus additions to qwen3-tts backend and chat-completions backend tests (RED→GREEN per unit).git stashand left alone: conformancetest_server_starts_and_delivers_pushed_event, 3 files failingruff format --check.