mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
feat(speech): make OpenAI realtime transcription URL configurable (#570)
Allow `OPENAI_REALTIME_URL` env var to override the hardcoded `wss://api.openai.com/v1/realtime?intent=transcription` endpoint, with the current value as default. Pairs with the OpenAI SDK's existing `OPENAI_BASE_URL` support that already makes HTTP audio endpoints reroutable. Unblocks pointing the realtime session at any OpenAI Realtime API protocol-compatible backend (Azure OpenAI, Alibaba Bailian / DashScope, self-hosted compat layers) without further changes. Closes #569 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -102,7 +102,8 @@ export class OpenAIRealtimeTranscriptionSession
|
||||
|
||||
this.closing = false;
|
||||
this.ready = new Promise<void>((resolve, reject) => {
|
||||
const url = "wss://api.openai.com/v1/realtime?intent=transcription";
|
||||
const url =
|
||||
process.env.OPENAI_REALTIME_URL ?? "wss://api.openai.com/v1/realtime?intent=transcription";
|
||||
const ws = new WebSocket(url, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.apiKey}`,
|
||||
|
||||
Reference in New Issue
Block a user