Fix TTS
Rolling release / release (push) Successful in 14m2s

This commit is contained in:
2026-09-11 21:56:55 -04:00
parent 324f0d5e3a
commit e4546f8e95
11 changed files with 182 additions and 67 deletions
+8
View File
@@ -5,6 +5,7 @@ import { QvacScheduler } from '../daemon/qvac-scheduler.js';
import { JarvisDaemon } from '../daemon/index.js';
import { HarnessBridge } from '../daemon/harness-bridge.js';
import { spokenReply } from '../skills/voice-prompt.js';
import { voiceSettings } from '../daemon/voice-settings.js';
test('voice state machine handles wake, reply, cancel, and idle sleep', () => {
let now = 0;
@@ -37,6 +38,13 @@ test('spoken replies use harness text and strip HUD sidecars', () => {
assert.equal(spokenReply('[object Object]'), '');
});
test('voice settings default TTS on and honor an explicit disable', () => {
assert.equal(voiceSettings({}).ttsEnabled, true);
assert.equal(voiceSettings({ ttsEnabled: true }).ttsEnabled, true);
assert.equal(voiceSettings({ ttsEnabled: false }).ttsEnabled, false);
assert.equal(voiceSettings({ tts_enabled: false }).ttsEnabled, false);
});
test('ask extracts harness reply text instead of stringifying the object', async () => {
const daemon = new JarvisDaemon();
daemon.harness = { ask: async () => ({ ok: true, text: 'Hello there.', reason: 'stop' }), cancel() {}, close: async () => {} };