support elevenlabs different endpoint (#1387)

* support elevenlabs different endpoint

* wip

* wip
This commit is contained in:
Hoan Luu Huu
2025-10-09 19:19:40 +07:00
committed by GitHub
parent d1baf2fe37
commit 581d309f36
5 changed files with 10 additions and 6 deletions

View File

@@ -81,7 +81,7 @@ class TtsTask extends Task {
}
async setTtsStreamingChannelVars(vendor, language, voice, credentials, ep) {
const {api_key, model_id, custom_tts_streaming_url, auth_token} = credentials;
const {api_key, model_id, api_uri, custom_tts_streaming_url, auth_token} = credentials;
let obj;
this.logger.debug(`setTtsStreamingChannelVars: vendor: ${vendor}, language: ${language}, voice: ${voice}`);
@@ -105,6 +105,7 @@ class TtsTask extends Task {
const {stability, similarity_boost, use_speaker_boost, style, speed} = this.options.voice_settings || {};
obj = {
ELEVENLABS_API_KEY: api_key,
...(api_uri && {ELEVENLABS_API_URI: api_uri}),
ELEVENLABS_TTS_STREAMING_MODEL_ID: model_id,
ELEVENLABS_TTS_STREAMING_VOICE_ID: voice,
// 20/12/2024 - only eleven_turbo_v2_5 support multiple language