mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-07-24 13:11:56 +00:00
google tts support api_mode
This commit is contained in:
+3
-4
@@ -439,10 +439,9 @@ const synthGoogle = async(logger, {
|
||||
params += `,voice=${voice}`;
|
||||
params += `,language_code=${language || 'en-US'}`;
|
||||
params += `,write_cache_file=${disableTtsCache ? 0 : 1}`;
|
||||
const useLiveApi = options?.useLiveApi ?? isHDVoice;
|
||||
const useGeminiTts = options?.useGeminiTts ?? isGemini;
|
||||
params += `,use_live_api=${useLiveApi ? 1 : 0}`;
|
||||
params += `,use_gemini_tts=${useGeminiTts ? 1 : 0}`;
|
||||
// api_mode: tts (standard), live (HD voices), gemini (Gemini TTS)
|
||||
const apiMode = options?.apiMode || (isGemini ? 'gemini' : (isHDVoice ? 'live' : 'tts'));
|
||||
params += `,api_mode=${apiMode}`;
|
||||
if (model) params += `,model_name=${model}`;
|
||||
if (gender) params += `,gender=${gender}`;
|
||||
// comma is used to separate parameters in freeswitch tts module
|
||||
|
||||
Reference in New Issue
Block a user