feat: harden voice reliability with tts fallback and talk controls

This commit is contained in:
William Valentin
2026-02-26 17:29:23 -08:00
parent 2a9bed8c91
commit 163b1a0139
13 changed files with 781 additions and 17 deletions
+26
View File
@@ -1550,8 +1550,14 @@ describe('config handlers', () => {
'memory.daily_log.enabled': true,
'memory.proactive_extract.enabled': true,
'memory.proactive_extract.min_tool_calls': 2,
'audio.talk_mode.enabled': true,
'audio.talk_mode.wake_phrase': 'ok flynn',
'audio.talk_mode.timeout_ms': 180000,
'audio.talk_mode.allow_manual_toggle': false,
'tts.enabled': true,
'tts.enabled_channels': ['telegram', 'discord'],
'tts.fallback.max_attempts': 2,
'tts.fallback.failure_cooldown_ms': 90000,
},
},
};
@@ -1573,8 +1579,14 @@ describe('config handlers', () => {
'memory.daily_log.enabled',
'memory.proactive_extract.enabled',
'memory.proactive_extract.min_tool_calls',
'audio.talk_mode.enabled',
'audio.talk_mode.wake_phrase',
'audio.talk_mode.timeout_ms',
'audio.talk_mode.allow_manual_toggle',
'tts.enabled',
'tts.enabled_channels',
'tts.fallback.max_attempts',
'tts.fallback.failure_cooldown_ms',
]);
expect(r.rejected).toEqual([]);
expect(r.persisted).toBe(false);
@@ -1593,8 +1605,14 @@ describe('config handlers', () => {
expect(getPath(config, 'memory', 'daily_log', 'enabled')).toBe(true);
expect(getPath(config, 'memory', 'proactive_extract', 'enabled')).toBe(true);
expect(getPath(config, 'memory', 'proactive_extract', 'min_tool_calls')).toBe(2);
expect(getPath(config, 'audio', 'talk_mode', 'enabled')).toBe(true);
expect(getPath(config, 'audio', 'talk_mode', 'wake_phrase')).toBe('ok flynn');
expect(getPath(config, 'audio', 'talk_mode', 'timeout_ms')).toBe(180000);
expect(getPath(config, 'audio', 'talk_mode', 'allow_manual_toggle')).toBe(false);
expect(getPath(config, 'tts', 'enabled')).toBe(true);
expect(getPath(config, 'tts', 'enabled_channels')).toEqual(['telegram', 'discord']);
expect(getPath(config, 'tts', 'fallback', 'max_attempts')).toBe(2);
expect(getPath(config, 'tts', 'fallback', 'failure_cooldown_ms')).toBe(90000);
});
it('config.patch applies councils model and routing patches', async () => {
@@ -1675,7 +1693,11 @@ describe('config handlers', () => {
'hooks.confirm': 'not-an-array',
'server.queue.cap': 0,
'memory.proactive_extract.min_tool_calls': 99,
'audio.talk_mode.wake_phrase': '',
'audio.talk_mode.timeout_ms': 99999999,
'tts.enabled_channels': [1, 2, 3],
'tts.fallback.max_attempts': 0,
'tts.fallback.failure_cooldown_ms': 0,
'automation.daily_briefing.model_tier': 'ultra',
},
},
@@ -1688,7 +1710,11 @@ describe('config handlers', () => {
'hooks.confirm',
'server.queue.cap',
'memory.proactive_extract.min_tool_calls',
'audio.talk_mode.wake_phrase',
'audio.talk_mode.timeout_ms',
'tts.enabled_channels',
'tts.fallback.max_attempts',
'tts.fallback.failure_cooldown_ms',
'automation.daily_briefing.model_tier',
]);
expect(r.persisted).toBe(false);