Hi,
I want to update the input_audio_transcription prompt during the Realtime session as mentioned here :
I use the following code :
const transcriptionUpdate = {
type: "transcription_session.update",
session: {
input_audio_format: "g711_ulaw", // "pcm16"
input_audio_transcription: {
model: "gpt-4o-transcribe",
prompt: conversationHistoryForPrompt,
language: "fr",
},
turn_detection: {
type: "server_vad",
threshold: 0.5,
prefix_padding_ms: 300,
silence_duration_ms: 500,
// create_response: true, // By the way, I need to comment this parameter or I get error "Unknown parameter: 'session.turn_detection.create_response'"
},
input_audio_noise_reduction: {
type: "near_field",
},
// include: ["item.input_audio_transcription.logprobs"], // I comment this, I don't need it
},
};
But I get the following error:
openAiWs.on('message') - Message OpenAI Reçu: {
"type": "error",
"event_id": "event_xxxxxxxxxx",
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "Passing a transcription session update event to a realtime session is not allowed.",
"param": "",
"event_id": null
}
}
So, is it impossible to update the transcription during a realtime session (using websocket) ? If it is the case, why is it mentioned in the openAI doc ? Am I missing someting to solve this issue ?
Thanks a lot.