fix(audio): longer Piper time for long calls, fallback voice matches the line's language (1.55.2)
This commit is contained in:
1 parent
c3aafba327
commit
36fe1e3933
6 files changed
+21
-8
No files matched your search
@@ -8,13 +8,14 @@ import {
|
||||
speakTextHelper,
|
||||
} from "../src/runtime_services.js";
|
||||
|
||||
test("speech voice selection prefers an explicit voice and then the current language", () => {
|
||||
test("speech voice selection prefers the chosen voice when it speaks the line's language, else the language", () => {
|
||||
const voices = [
|
||||
{ name: "English", lang: "en-US", voiceURI: "voice-en", localService: true },
|
||||
{ name: "Swedish", lang: "sv-SE", voiceURI: "voice-sv", localService: true },
|
||||
];
|
||||
|
||||
assert.equal(selectSpeechVoice(voices, "voice-en", "sv-SE")?.voiceURI, "voice-en");
|
||||
assert.equal(selectSpeechVoice(voices, "voice-en", "en-US")?.voiceURI, "voice-en");
|
||||
assert.equal(selectSpeechVoice(voices, "voice-sv", "en-US")?.voiceURI, "voice-en", "a Swedish voice never reads an English line");
|
||||
assert.equal(selectSpeechVoice(voices, "", "sv-SE")?.voiceURI, "voice-sv");
|
||||
assert.equal(selectSpeechVoice(voices, "missing", "de-DE"), null);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user