add custome voice
This commit is contained in:
10
src/app.js
10
src/app.js
@@ -1013,6 +1013,10 @@ const TRANSLATIONS = {
|
||||
"audio.enabled": "Aktivera nya raceljud",
|
||||
"audio.mute": "Tysta allt",
|
||||
"audio.language": "Utropsspråk",
|
||||
"audio.voice_select": "Race-röst",
|
||||
"audio.voice_auto": "Automatisk röst för valt språk",
|
||||
"audio.voice_rate": "Race-röstens hastighet",
|
||||
"audio.voice_pitch": "Race-röstens tonhöjd",
|
||||
"audio.start_countdown": "Nedräkning före start",
|
||||
"audio.master_volume": "Mastervolym",
|
||||
"audio.effects_volume": "Effektvolym",
|
||||
@@ -2120,6 +2124,10 @@ const TRANSLATIONS = {
|
||||
"audio.enabled": "Enable new race audio",
|
||||
"audio.mute": "Mute all",
|
||||
"audio.language": "Announcement language",
|
||||
"audio.voice_select": "Race voice",
|
||||
"audio.voice_auto": "Automatic voice for selected language",
|
||||
"audio.voice_rate": "Race voice speed",
|
||||
"audio.voice_pitch": "Race voice pitch",
|
||||
"audio.start_countdown": "Pre-start countdown",
|
||||
"audio.master_volume": "Master volume",
|
||||
"audio.effects_volume": "Effects volume",
|
||||
@@ -2744,7 +2752,7 @@ const raceAudioEngine = createRaceAudioEngine({
|
||||
speak: (text, options = {}) => new Promise((resolve) => {
|
||||
let settled = false;
|
||||
const done = (value) => { if (!settled) { settled = true; resolve(value); } };
|
||||
const started = speakText(text, { ...options, voiceUri: "", onEnd: () => done(true), onError: () => done(false) });
|
||||
const started = speakText(text, { ...options, voiceUri: state.settings.raceAudio?.voiceUri || "", rate: state.settings.raceAudio?.voiceRate, pitch: state.settings.raceAudio?.voicePitch, onEnd: () => done(true), onError: () => done(false) });
|
||||
if (!started) done(false);
|
||||
else setTimeout(() => done(true), 15000);
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user