This commit is contained in:
Hoan HL
2026-01-17 16:16:11 +07:00
parent 89007ba7cc
commit 10095de25d
2 changed files with 6 additions and 4 deletions
+2 -3
View File
@@ -421,8 +421,6 @@ const synthGoogle = async(logger, {
const isVoiceCloning = typeof voice === 'object' && voice.voice_cloning_key;
// HD voices have pattern like en-US-Chirp3-HD-Charon
const isHDVoice = typeof voice === 'string' && voice.includes('-HD-');
// Live API is used for HD voices and Gemini voices
const useLiveApi = isGemini || isHDVoice;
// Streaming support for Google TTS (Gemini, HD voices, and standard voices)
// Voice cloning does not support streaming
@@ -441,7 +439,8 @@ const synthGoogle = async(logger, {
params += `,voice=${voice}`;
params += `,language_code=${language || 'en-US'}`;
params += `,write_cache_file=${disableTtsCache ? 0 : 1}`;
params += `,use_live_api=${useLiveApi ? 1 : 0}`;
params += `,use_live_api=${isHDVoice ? 1 : 0}`;
params += `,use_gemini_tts=${isGemini ? 1 : 0}`;
if (model) params += `,model_name=${model}`;
if (gender) params += `,gender=${gender}`;
// comma is used to separate parameters in freeswitch tts module