mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
support rimelabs tts streaming (#1047)
This commit is contained in:
@@ -94,6 +94,23 @@ class TtsTask extends Task {
|
|||||||
...(style && {ELEVENLABS_TTS_STREAMING_VOICE_SETTINGS_STYLE: style})
|
...(style && {ELEVENLABS_TTS_STREAMING_VOICE_SETTINGS_STYLE: style})
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
case 'rimelabs':
|
||||||
|
const {
|
||||||
|
pauseBetweenBrackets, phonemizeBetweenBrackets, inlineSpeedAlpha, speedAlpha, reduceLatency
|
||||||
|
} = this.options;
|
||||||
|
obj = {
|
||||||
|
RIMELABS_API_KEY: api_key,
|
||||||
|
RIMELABS_TTS_STREAMING_MODEL_ID: model_id,
|
||||||
|
RIMELABS_TTS_STREAMING_VOICE_ID: voice,
|
||||||
|
RIMELABS_TTS_STREAMING_LANGUAGE: language || 'en',
|
||||||
|
...(pauseBetweenBrackets && {RIMELABS_TTS_STREAMING_PAUSE_BETWEEN_BRACKETS: pauseBetweenBrackets}),
|
||||||
|
...(phonemizeBetweenBrackets &&
|
||||||
|
{RIMELABS_TTS_STREAMING_PHONEMIZE_BETWEEN_BRACKETS: phonemizeBetweenBrackets}),
|
||||||
|
...(inlineSpeedAlpha && {RIMELABS_TTS_STREAMING_INLINE_SPEED_ALPHA: inlineSpeedAlpha}),
|
||||||
|
...(speedAlpha && {RIMELABS_TTS_STREAMING_SPEED_ALPHA: speedAlpha}),
|
||||||
|
...(reduceLatency && {RIMELABS_TTS_STREAMING_REDUCE_LATENCY: reduceLatency})
|
||||||
|
};
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (vendor.startsWith('custom:')) {
|
if (vendor.startsWith('custom:')) {
|
||||||
const use_tls = custom_tts_streaming_url.startsWith('wss://');
|
const use_tls = custom_tts_streaming_url.startsWith('wss://');
|
||||||
|
|||||||
@@ -259,6 +259,11 @@
|
|||||||
"ConnectFailure": "elevenlabs_tts_streaming::connect_failed",
|
"ConnectFailure": "elevenlabs_tts_streaming::connect_failed",
|
||||||
"Connect": "elevenlabs_tts_streaming::connect"
|
"Connect": "elevenlabs_tts_streaming::connect"
|
||||||
},
|
},
|
||||||
|
"RimelabsTtsStreamingEvents": {
|
||||||
|
"Empty": "rimelabs_tts_streaming::empty",
|
||||||
|
"ConnectFailure": "rimelabs_tts_streaming::connect_failed",
|
||||||
|
"Connect": "rimelabs_tts_streaming::connect"
|
||||||
|
},
|
||||||
"CustomTtsStreamingEvents": {
|
"CustomTtsStreamingEvents": {
|
||||||
"Empty": "custom_tts_streaming::empty",
|
"Empty": "custom_tts_streaming::empty",
|
||||||
"ConnectFailure": "custom_tts_streaming::connect_failed",
|
"ConnectFailure": "custom_tts_streaming::connect_failed",
|
||||||
|
|||||||
@@ -278,6 +278,7 @@ class TtsStreamingBuffer extends Emitter {
|
|||||||
'deepgram',
|
'deepgram',
|
||||||
'cartesia',
|
'cartesia',
|
||||||
'elevenlabs',
|
'elevenlabs',
|
||||||
|
'rimelabs',
|
||||||
'custom'
|
'custom'
|
||||||
].forEach((vendor) => {
|
].forEach((vendor) => {
|
||||||
const eventClassName = `${vendor.charAt(0).toUpperCase() + vendor.slice(1)}TtsStreamingEvents`;
|
const eventClassName = `${vendor.charAt(0).toUpperCase() + vendor.slice(1)}TtsStreamingEvents`;
|
||||||
|
|||||||
Reference in New Issue
Block a user