Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix: configure OpenAI Realtime session with pcm16 format and VAD

Gabriel Steina76fbddcc480
diff --git a/src/helpers/openaiRealtimeStreaming.js b/src/helpers/openaiRealtimeStreaming.js
index 4a90c21de..10f392e2c 100644
--- a/src/helpers/openaiRealtimeStreaming.js
+++ b/src/helpers/openaiRealtimeStreaming.js
@@ -62,6 +62,23 @@ class OpenAIRealtimeStreaming {
this.ws.on("open", () => {
debugLogger.debug("OpenAI Realtime WebSocket opened");
+ this.ws.send(
+ JSON.stringify({
+ type: "transcription_session.update",
+ session: {
+ input_audio_format: "pcm16",
+ input_audio_transcription: {
+ model: this.model,
+ },
+ turn_detection: {
+ type: "server_vad",
+ threshold: 0.5,
+ silence_duration_ms: 800,
+ prefix_padding_ms: 300,
+ },
+ },
+ })
+ );
});
this.ws.on("message", (data) => {