Speak a confirmation when toggling PC audio

This commit is contained in:
2026-11-14 15:30:51 +03:00
parent 3e83d25410
commit cca93107f5
3 changed files with 20 additions and 2 deletions
+14
View File
@@ -90,5 +90,19 @@ test('voice turns stream dialogue and skip synthesis for confirmed quick actions
assert.deepEqual(await turn(undefined, true), { seen: ['ready', 'done'], audio: [], calls: [] });
assert.deepEqual(recorded, ['выключи музыку.', 'Музыка на паузе.']);
assert.equal(syntheses, 1);
for (const [command, action, enabled, answer] of [
['включи', 'start', true, 'Звук с компьютера включён.'],
['выключи', 'stop', false, 'Звук с компьютера выключен.'],
]) {
transcript = `Алиса, ${command} звук с компьютера.`;
ttsText = '';
assert.deepEqual(await turn({ ok: true, enabled }, true), {
seen: ['ready', 'transcript', 'device_tool', 'done'],
audio: [1, 2, 3, 4],
calls: [['pc_audio', { action }]],
});
assert.equal(ttsText, answer);
}
await Promise.all([new Promise(r => local.close(r)), new Promise(r => stt.close(r)), new Promise(r => tts.close(r))]);
});