This commit is contained in:
@@ -117,17 +117,19 @@ test('recognition watchdog closes a session that never ends and permits retry',
|
||||
assert.equal(h.recognitions.length, 2);
|
||||
});
|
||||
|
||||
test('TTS selects Swedish fallback, applies rate, and cancellation invalidates callbacks', () => {
|
||||
test('TTS uses the system default voice unless a named Swedish voice is selected', () => {
|
||||
const h = makeHarness();
|
||||
h.controller.update({mode: 'game-voice', rate: 1.4});
|
||||
assert.equal(h.controller.speak('Hej.'), true);
|
||||
const first = h.utterances[0];
|
||||
assert.equal(first.lang, 'sv-SE');
|
||||
assert.equal(first.rate, 1.4);
|
||||
assert.equal(first.voice.name, 'Svensk');
|
||||
assert.equal(first.voice, null);
|
||||
h.controller.cancelSpeech();
|
||||
first.onend();
|
||||
assert.equal(h.controller.getState(), 'IDLE');
|
||||
assert.equal(h.controller.speak('Namngiven röst.', {voiceName: 'Svensk'}), true);
|
||||
assert.equal(h.utterances.at(-1).voice.name, 'Svensk');
|
||||
});
|
||||
|
||||
test('a player gesture restores the iOS speech primer after cancelling a queued reply', () => {
|
||||
|
||||
Reference in New Issue
Block a user