Speak a confirmation when toggling PC audio
This commit is contained in:
@@ -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))]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user