support mod_google_tts_streaming (#1409)

* support mod_google_tts_streaming

* wip

* wip
This commit is contained in:
Hoan Luu Huu
2026-01-27 20:18:47 +07:00
committed by GitHub
parent 325af42946
commit faee30278b
3 changed files with 13 additions and 0 deletions
+7
View File
@@ -157,6 +157,13 @@ class TtsTask extends Task {
...(reduceLatency && {RIMELABS_TTS_STREAMING_REDUCE_LATENCY: reduceLatency}) ...(reduceLatency && {RIMELABS_TTS_STREAMING_REDUCE_LATENCY: reduceLatency})
}; };
break; break;
case 'google':
obj = {
GOOGLE_TTS_LANGUAGE_CODE: language,
GOOGLE_TTS_VOICE_NAME: voice,
GOOGLE_APPLICATION_CREDENTIALS: JSON.stringify(credentials.credentials)
};
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://');
+5
View File
@@ -311,6 +311,11 @@
"ConnectFailure": "deepgram_tts_streaming::connect_failed", "ConnectFailure": "deepgram_tts_streaming::connect_failed",
"Connect": "deepgram_tts_streaming::connect" "Connect": "deepgram_tts_streaming::connect"
}, },
"GoogleTtsStreamingEvents": {
"Empty": "google_tts_streaming::empty",
"ConnectFailure": "google_tts_streaming::connect_failed",
"Connect": "google_tts_streaming::connect"
},
"CartesiaTtsStreamingEvents": { "CartesiaTtsStreamingEvents": {
"Empty": "cartesia_tts_streaming::empty", "Empty": "cartesia_tts_streaming::empty",
"ConnectFailure": "cartesia_tts_streaming::connect_failed", "ConnectFailure": "cartesia_tts_streaming::connect_failed",
+1
View File
@@ -421,6 +421,7 @@ class TtsStreamingBuffer extends Emitter {
'cartesia', 'cartesia',
'elevenlabs', 'elevenlabs',
'rimelabs', 'rimelabs',
'google',
'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`;