fix(voice): scope OpenAI voice credentials

Resolve OpenAI voice credentials and endpoints from voice-specific config before broader OpenAI fallbacks, and use the same REST STT provider for dictation and voice mode.
This commit is contained in:
Mohamed Boudra
2026-06-25 14:46:24 +07:00
parent 2692211ef9
commit f12c9e9cfa
16 changed files with 397 additions and 319 deletions

View File

@@ -32,9 +32,9 @@ async function main(): Promise<void> {
}
const apiKey = requireEnv("OPENAI_API_KEY");
const transcriptionModel = process.env.OPENAI_REALTIME_TRANSCRIPTION_MODEL ?? "gpt-4o-transcribe";
const transcriptionModel = process.env.STT_MODEL ?? "gpt-4o-transcribe";
const prompt =
process.env.OPENAI_REALTIME_DICTATION_TRANSCRIPTION_PROMPT ??
process.env.PASEO_DICTATION_TRANSCRIPTION_PROMPT ??
"Transcribe only what the speaker says. Do not add words. Preserve punctuation and casing. If the audio is silence or non-speech noise, return an empty transcript.";
const openai = new OpenAI({ apiKey });