This commit is contained in:
Quan HL
2024-09-27 18:24:03 +07:00
parent 6794a0b3be
commit 05fc96edc0
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -757,7 +757,7 @@ const synthElevenlabs = async(logger, {
};
const synthPlayHT = async(client, logger, {
credentials, options, stats, voice, text, renderForCaching, disableTtsStreaming
credentials, options, stats, voice, language, text, renderForCaching, disableTtsStreaming
}) => {
const {api_key, user_id, voice_engine, options: credOpts} = credentials;
const opts = !!options && Object.keys(options).length !== 0 ? options : JSON.parse(credOpts || '{}');
@@ -827,6 +827,7 @@ const synthPlayHT = async(client, logger, {
const mp3 = await post(synthesizeUrl, {
text,
...(voice_engine === 'Play3.0' && { language }),
voice,
voice_engine,
output_format: 'mp3',