Skip to content

Commit 139369a

Browse files
committed
fix(voice): describe Omni native route accurately
1 parent 99b67c3 commit 139369a

10 files changed

Lines changed: 51 additions & 35 deletions

File tree

static/app/app-audio-capture.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,15 +2044,15 @@
20442044
? 'microphone.independentAsrSummary'
20452045
: 'microphone.independentAsrSummaryGeneric', { provider: provider })
20462046
: ('独立 ASR' + (provider ? ' · ' + provider : '')))
2047-
: (window.t ? window.t('microphone.voiceRecognitionDisabled') : '语音识别已关闭');
2047+
: (window.t ? window.t('microphone.voiceRecognitionDisabled') : '当前使用 Omni 原生语音识别');
20482048
if (voiceSettingsPending) {
20492049
voiceStatus.textContent = window.t
20502050
? window.t('microphone.voiceRecognitionSettingsPending')
20512051
: '◐ 设置将在下次语音会话生效';
20522052
} else if (!enabled) {
20532053
voiceStatus.textContent = window.t
20542054
? window.t('microphone.voiceRecognitionDisabledHint')
2055-
: '语音识别已关闭,不会切换到 Omni';
2055+
: '独立 ASR 已关闭;语音输入使用 Omni 原生语音识别';
20562056
} else if (blocked) {
20572057
voiceStatus.textContent = window.t
20582058
? window.t('microphone.voiceRecognitionUnavailable')

static/locales/en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,10 +934,10 @@
934934
"independentAsrActive": "Independent ASR active: {{provider}}",
935935
"independentAsrFallback": "Independent ASR unavailable. Voice input has stopped for this session. Check the independent ASR configuration, then start a new voice session.",
936936
"independentAsrNextSession": "Enabled for the next voice session; it will not automatically switch to Omni if unavailable.",
937-
"independentAsrNative": "Speech recognition is off and will not switch to Omni",
937+
"independentAsrNative": "Using Omni native speech recognition",
938938
"voiceRecognitionSettings": "Speech Recognition Settings",
939-
"voiceRecognitionDisabled": "Speech recognition is off",
940-
"voiceRecognitionDisabledHint": "Speech recognition is off and will not switch to Omni",
939+
"voiceRecognitionDisabled": "Using Omni native speech recognition",
940+
"voiceRecognitionDisabledHint": "Independent ASR is off; voice input uses Omni native speech recognition",
941941
"voiceRecognitionUnavailable": "Independent speech recognition is unavailable. Voice input has stopped for this session",
942942
"voiceRecognitionStatusReady": "● Running normally",
943943
"voiceRecognitionSettingsPending": "◐ Settings take effect in the next voice session",

static/locales/es.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,10 +934,10 @@
934934
"independentAsrActive": "ASR independiente activo: {{provider}}",
935935
"independentAsrFallback": "El ASR independiente no está disponible. La entrada de voz se ha detenido para esta sesión. Revisa la configuración del ASR independiente y después inicia una nueva sesión de voz.",
936936
"independentAsrNextSession": "Se activará en la próxima sesión de voz; no cambiará automáticamente a Omni si no está disponible.",
937-
"independentAsrNative": "El reconocimiento de voz está desactivado y no cambiará a Omni",
937+
"independentAsrNative": "Usando el reconocimiento de voz nativo de Omni",
938938
"voiceRecognitionSettings": "Configuración de reconocimiento de voz",
939-
"voiceRecognitionDisabled": "El reconocimiento de voz está desactivado",
940-
"voiceRecognitionDisabledHint": "El reconocimiento de voz está desactivado y no cambiará a Omni",
939+
"voiceRecognitionDisabled": "Usando el reconocimiento de voz nativo de Omni",
940+
"voiceRecognitionDisabledHint": "El ASR independiente está desactivado; la entrada de voz usa el reconocimiento de voz nativo de Omni",
941941
"voiceRecognitionUnavailable": "El reconocimiento de voz independiente no está disponible. La entrada de voz de esta sesión se ha detenido",
942942
"voiceRecognitionStatusReady": "● Funciona con normalidad",
943943
"voiceRecognitionSettingsPending": "◐ La configuración se aplicará en la próxima sesión de voz",

static/locales/ja.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,10 +934,10 @@
934934
"independentAsrActive": "独立 ASR を使用中:{{provider}}",
935935
"independentAsrFallback": "独立 ASR を利用できないため、この音声セッションの入力を停止しました。独立 ASR の設定を確認してから、新しい音声セッションを開始してください。",
936936
"independentAsrNextSession": "次の音声セッションから有効になります。利用できない場合も Omni へ自動的に切り替わりません。",
937-
"independentAsrNative": "音声認識はオフです。Omni には切り替わりません",
937+
"independentAsrNative": "Omni ネイティブ音声認識を使用中",
938938
"voiceRecognitionSettings": "音声認識設定",
939-
"voiceRecognitionDisabled": "音声認識はオフです",
940-
"voiceRecognitionDisabledHint": "音声認識はオフです。Omni には切り替わりません",
939+
"voiceRecognitionDisabled": "Omni ネイティブ音声認識を使用中",
940+
"voiceRecognitionDisabledHint": "独立 ASR はオフです。音声入力には Omni ネイティブ音声認識を使用します",
941941
"voiceRecognitionUnavailable": "独立音声認識を利用できないため、このセッションの音声入力を停止しました",
942942
"voiceRecognitionStatusReady": "● 正常に動作中",
943943
"voiceRecognitionSettingsPending": "◐ 設定は次の音声セッションから反映されます",

static/locales/ko.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,10 +934,10 @@
934934
"independentAsrActive": "독립 ASR 사용 중: {{provider}}",
935935
"independentAsrFallback": "독립 ASR을 사용할 수 없어 이번 음성 세션의 입력을 중지했습니다. 독립 ASR 설정을 확인한 다음 새 음성 세션을 시작하세요.",
936936
"independentAsrNextSession": "다음 음성 세션부터 활성화되며, 사용할 수 없어도 Omni로 자동 전환되지 않습니다.",
937-
"independentAsrNative": "음성 인식이 꺼져 있으며 Omni로 전환되지 않습니다",
937+
"independentAsrNative": "Omni 네이티브 음성 인식 사용 중",
938938
"voiceRecognitionSettings": "음성 인식 설정",
939-
"voiceRecognitionDisabled": "음성 인식이 꺼져 있습니다",
940-
"voiceRecognitionDisabledHint": "음성 인식이 꺼져 있으며 Omni로 전환되지 않습니다",
939+
"voiceRecognitionDisabled": "Omni 네이티브 음성 인식 사용 중",
940+
"voiceRecognitionDisabledHint": "독립 ASR이 꺼져 있습니다. 음성 입력에는 Omni 네이티브 음성 인식을 사용합니다",
941941
"voiceRecognitionUnavailable": "독립 음성 인식을 사용할 수 없어 이번 세션의 음성 입력이 중지되었습니다",
942942
"voiceRecognitionStatusReady": "● 정상 작동 중",
943943
"voiceRecognitionSettingsPending": "◐ 설정은 다음 음성 세션부터 적용됩니다",

static/locales/pt.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,10 +934,10 @@
934934
"independentAsrActive": "ASR independente ativo: {{provider}}",
935935
"independentAsrFallback": "O ASR independente não está disponível. A entrada de voz foi interrompida nesta sessão. Verifique a configuração do ASR independente e depois inicie uma nova sessão de voz.",
936936
"independentAsrNextSession": "Será ativado na próxima sessão de voz; não mudará automaticamente para o Omni se estiver indisponível.",
937-
"independentAsrNative": "O reconhecimento de voz está desativado e não mudará para o Omni",
937+
"independentAsrNative": "Usando o reconhecimento de voz nativo do Omni",
938938
"voiceRecognitionSettings": "Configurações de reconhecimento de voz",
939-
"voiceRecognitionDisabled": "O reconhecimento de voz está desativado",
940-
"voiceRecognitionDisabledHint": "O reconhecimento de voz está desativado e não mudará para o Omni",
939+
"voiceRecognitionDisabled": "Usando o reconhecimento de voz nativo do Omni",
940+
"voiceRecognitionDisabledHint": "O ASR independente está desativado; a entrada de voz usa o reconhecimento de voz nativo do Omni",
941941
"voiceRecognitionUnavailable": "O reconhecimento de voz independente está indisponível. A entrada de voz desta sessão foi interrompida",
942942
"voiceRecognitionStatusReady": "● Funcionando normalmente",
943943
"voiceRecognitionSettingsPending": "◐ As configurações terão efeito na próxima sessão de voz",

static/locales/ru.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,10 +934,10 @@
934934
"independentAsrActive": "Активен независимый ASR: {{provider}}",
935935
"independentAsrFallback": "Независимый ASR недоступен. Голосовой ввод в этом сеансе остановлен. Проверьте настройки независимого ASR, затем начните новый голосовой сеанс.",
936936
"independentAsrNextSession": "Будет включён в следующем голосовом сеансе; при недоступности автоматического переключения на Omni не произойдёт.",
937-
"independentAsrNative": "Распознавание речи выключено; переключения на Omni не будет",
937+
"independentAsrNative": "Используется встроенное распознавание речи Omni",
938938
"voiceRecognitionSettings": "Настройки распознавания речи",
939-
"voiceRecognitionDisabled": "Распознавание речи выключено",
940-
"voiceRecognitionDisabledHint": "Распознавание речи выключено; переключения на Omni не будет",
939+
"voiceRecognitionDisabled": "Используется встроенное распознавание речи Omni",
940+
"voiceRecognitionDisabledHint": "Независимый ASR выключен; для голосового ввода используется встроенное распознавание речи Omni",
941941
"voiceRecognitionUnavailable": "Независимое распознавание речи недоступно. Голосовой ввод в этом сеансе остановлен",
942942
"voiceRecognitionStatusReady": "● Работает нормально",
943943
"voiceRecognitionSettingsPending": "◐ Настройки вступят в силу в следующем голосовом сеансе",

static/locales/zh-CN.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,10 +934,10 @@
934934
"independentAsrActive": "当前使用独立 ASR:{{provider}}",
935935
"independentAsrFallback": "独立 ASR 不可用,本次语音输入已停止。请检查独立 ASR 配置,然后重新开始语音会话。",
936936
"independentAsrNextSession": "将在下次语音会话启用;不可用时不会自动切换到 Omni。",
937-
"independentAsrNative": "语音识别已关闭,不会切换到 Omni",
937+
"independentAsrNative": "当前使用 Omni 原生语音识别",
938938
"voiceRecognitionSettings": "语音识别设置",
939-
"voiceRecognitionDisabled": "语音识别已关闭",
940-
"voiceRecognitionDisabledHint": "语音识别已关闭,不会切换到 Omni",
939+
"voiceRecognitionDisabled": "当前使用 Omni 原生语音识别",
940+
"voiceRecognitionDisabledHint": "独立 ASR 已关闭;语音输入使用 Omni 原生语音识别",
941941
"voiceRecognitionUnavailable": "独立语音识别不可用,本次语音输入已停止",
942942
"voiceRecognitionStatusReady": "● 当前运行正常",
943943
"voiceRecognitionSettingsPending": "◐ 设置将在下次语音会话生效",

static/locales/zh-TW.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,10 +934,10 @@
934934
"independentAsrActive": "目前使用獨立 ASR:{{provider}}",
935935
"independentAsrFallback": "獨立 ASR 無法使用,本次語音輸入已停止。請檢查獨立 ASR 設定,然後重新開始語音會話。",
936936
"independentAsrNextSession": "將於下次語音會話啟用;無法使用時不會自動切換到 Omni。",
937-
"independentAsrNative": "語音辨識已關閉,不會切換到 Omni",
937+
"independentAsrNative": "目前使用 Omni 原生語音辨識",
938938
"voiceRecognitionSettings": "語音辨識設定",
939-
"voiceRecognitionDisabled": "語音辨識已關閉",
940-
"voiceRecognitionDisabledHint": "語音辨識已關閉,不會切換到 Omni",
939+
"voiceRecognitionDisabled": "目前使用 Omni 原生語音辨識",
940+
"voiceRecognitionDisabledHint": "獨立 ASR 已關閉;語音輸入使用 Omni 原生語音辨識",
941941
"voiceRecognitionUnavailable": "獨立語音辨識無法使用,本次語音輸入已停止",
942942
"voiceRecognitionStatusReady": "● 目前運作正常",
943943
"voiceRecognitionSettingsPending": "◐ 設定將於下次語音會話生效",

tests/unit/test_voice_recognition_settings_static.py

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ def test_voice_recognition_uses_portal_popover_with_keyboard_and_touch_contracts
4545
assert "aria-expanded" in source
4646

4747

48-
def test_voice_recognition_ui_never_advertises_omni_native_fallback() -> None:
48+
def test_disabled_independent_asr_ui_describes_omni_native_route() -> None:
4949
source = APP_AUDIO_CAPTURE.read_text(encoding="utf-8")
5050

51-
assert "Using Omni native recognition" not in source
52-
assert "Using Omni native speech recognition" not in source
51+
assert "window.t('microphone.voiceRecognitionDisabled')" in source
5352
assert "voiceRecognitionDisabledHint" in source
54-
assert "independentAsrNative" not in source
53+
assert "Omni 原生语音识别" in source
5554

5655

5756
def test_voice_recognition_popover_keys_exist_in_all_locales() -> None:
@@ -61,6 +60,7 @@ def test_voice_recognition_popover_keys_exist_in_all_locales() -> None:
6160
"independentAsr",
6261
"independentAsrSummary",
6362
"independentAsrSummaryGeneric",
63+
"independentAsrNative",
6464
"voiceRecognitionSettings",
6565
"voiceRecognitionDisabled",
6666
"voiceRecognitionDisabledHint",
@@ -72,12 +72,28 @@ def test_voice_recognition_popover_keys_exist_in_all_locales() -> None:
7272
"voiceResourceOptimizationHintOff",
7373
}
7474

75+
native_route_markers = {
76+
"en": "Omni native speech recognition",
77+
"es": "reconocimiento de voz nativo de Omni",
78+
"ja": "Omni ネイティブ音声認識",
79+
"ko": "Omni 네이티브 음성 인식",
80+
"pt": "reconhecimento de voz nativo do Omni",
81+
"ru": "встроенное распознавание речи Omni",
82+
"zh-CN": "Omni 原生语音识别",
83+
"zh-TW": "Omni 原生語音辨識",
84+
}
85+
7586
for locale_name in LOCALES:
7687
locale = json.loads(
7788
(LOCALE_DIR / f"{locale_name}.json").read_text(encoding="utf-8")
7889
)
79-
assert required <= set(locale["microphone"]), locale_name
80-
assert "RNNoise" not in locale["microphone"]["noiseReductionHint"]
81-
assert "native speech recognition" not in locale["microphone"][
82-
"independentAsrNative"
83-
].lower()
90+
microphone = locale["microphone"]
91+
assert required <= set(microphone), locale_name
92+
assert "RNNoise" not in microphone["noiseReductionHint"]
93+
marker = native_route_markers[locale_name]
94+
for key in (
95+
"independentAsrNative",
96+
"voiceRecognitionDisabled",
97+
"voiceRecognitionDisabledHint",
98+
):
99+
assert marker in microphone[key], (locale_name, key)

0 commit comments

Comments
 (0)