From ed9b23edd6a98f7f890510ec33622430794ec232 Mon Sep 17 00:00:00 2001 From: Hoan HL Date: Sat, 19 Sep 2026 14:50:07 +0700 Subject: [PATCH] feat: route uuid_voicelive_s2s to mediajam - add voicelive to the s2s command regex - dedicated session.create branch (host, path, authType, apiKey) Co-Authored-By: Claude Opus 5 (1M context) --- lib/endpoint.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/endpoint.js b/lib/endpoint.js index fec22d4..5452697 100644 --- a/lib/endpoint.js +++ b/lib/endpoint.js @@ -243,9 +243,10 @@ class Endpoint extends EventEmitter { * speaks fixed-rate pcm independent of the endpoint codec); assemblyai * passes host/path/apiKey with no authType slot; google passes apiKey * first then optional host/path (key rides a ?key= query param). openai, - * xai, qwen and gptlive all use the default mapping below + * xai, qwen, gptlive and voicelive all use the default mapping below * (host, path, authType, apiKey). */ - const s2 = /^uuid_(openai|voice_agent|ultravox|elevenlabs|assemblyai|google|xai|qwen|gptlive)_s2s$/.exec(command); + const s2 = /^uuid_(openai|voice_agent|ultravox|elevenlabs|assemblyai|google|xai|qwen|gptlive|voicelive)_s2s$/ + .exec(command); if (s2) { const vendor = s2[1]; const raw = Array.isArray(args) ? args.join('|') : String(args || ''); @@ -278,6 +279,14 @@ class Endpoint extends EventEmitter { await this._request('s2s.start', { vendor, host: parts[2], path: parts[3], authType: parts[4], apiKey: parts[5] }); + } else if (vendor === 'voicelive') { + /* azure voice live (own branch): args host, path, authType, apiKey + * (host=.services.ai.azure.com, + * path=voice-live/realtime?api-version=...&model=..., + * authType=query for api-key or bearer for an Entra token) */ + await this._request('s2s.start', { + vendor, host: parts[2], path: parts[3], authType: parts[4], apiKey: parts[5] + }); } else { await this._request('s2s.start', { vendor, host: parts[2], path: parts[3], authType: parts[4], apiKey: parts[5]