diff --git a/src/rai_core/rai/frontend/configurator.py b/src/rai_core/rai/frontend/configurator.py index 365b74256..49254ffbc 100644 --- a/src/rai_core/rai/frontend/configurator.py +++ b/src/rai_core/rai/frontend/configurator.py @@ -467,7 +467,7 @@ def on_wake_word_threshold_change(): # Get the current vendor from config and convert to display name current_vendor = st.session_state.config.get("asr", {}).get( - "transciption_model", TRANSCRIBE_MODELS[0] + "transcription_model", TRANSCRIBE_MODELS[0] ) asr_vendor = st.selectbox( diff --git a/tests/frontend/test_configurator_asr_key.py b/tests/frontend/test_configurator_asr_key.py new file mode 100644 index 000000000..783ad1437 --- /dev/null +++ b/tests/frontend/test_configurator_asr_key.py @@ -0,0 +1,8 @@ +"""Regression: ASR vendor select must read the same config key the on_change writer uses.""" +from pathlib import Path + +def test_configurator_reads_transcription_model_key(): + text = Path("src/rai_core/rai/frontend/configurator.py").read_text() + assert "\"transciption_model\"" not in text + assert "config[\"asr\"][\"transcription_model\"]" in text + assert "\"transcription_model\", TRANSCRIBE_MODELS[0]" in text