fix: distinguish automatic local language from legacy English captures

This commit is contained in:
Blendman974 committed 2026-11-06 02:13:43 +01:00
1 parent 44e4cd7300
commit c5b57e85b0
3 files changed
+9 -3

No files matched your search

+4 -1
View File
@@ -173,7 +173,7 @@ function androidBridge() {
'@nativescript/core': { Utils: { android: { getApplicationContext: () => ({}) } } },
'./speech-pause': { SpeechPauseDetector: class { reset() {} } },
'./cloud-stt-provider': { createCloudSttClient: () => null,
transcriptionKey: options => `${options.provider}:${options.language ?? ''}` },
transcriptionKey: options => `${options.provider}:${options.language ?? (options.provider === 'onboard-whisper' ? 'en' : '')}` },
}, { global: { isAndroid: true }, com: { faceclaw: { app: {
FaceclawVoiceController: function () { return controller; },
FaceclawVoiceControllerListener: function (listener) { return listener; },
@@ -193,8 +193,11 @@ test('local Whisper receives French and restarts for auto or English, sharing an
assert.equal(controller.starts, 2);
bridge.retargetContinuousCapture({ provider: 'onboard-whisper' });
// An omitted language preserves the native bridge's original English behavior.
assert.equal(controller.language, 'en');
assert.equal(controller.starts, 3);
bridge.retargetContinuousCapture({ provider: 'onboard-whisper', language: 'en' });
assert.equal(controller.language, 'en');
assert.equal(controller.starts, 3);
bridge.stop();
});