mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-07-23 12:41:48 +00:00
feat support google custom voice
This commit is contained in:
+2
-2
@@ -257,8 +257,8 @@ const synthGoogle = async(logger, {credentials, stats, language, voice, gender,
|
||||
const client = new ttsGoogle.TextToSpeechClient(credentials);
|
||||
const opts = {
|
||||
voice: {
|
||||
...( typeof voice === 'string' && {name: voice, ssmlGender: gender || 'SSML_VOICE_GENDER_UNSPECIFIED'}),
|
||||
...( typeof voice === 'object' && {custom_voice: voice}),
|
||||
...(typeof voice === 'string' && {name: voice, ssmlGender: gender || 'SSML_VOICE_GENDER_UNSPECIFIED'}),
|
||||
...(typeof voice === 'object' && {custom_voice: voice}),
|
||||
languageCode: language,
|
||||
},
|
||||
audioConfig: {audioEncoding: 'MP3'}
|
||||
|
||||
Reference in New Issue
Block a user