I have an backend in python which is connected to open ai Realtime API and I am using open ai realtime frontend application which I have taken from the repo of open ai (react application) now frontend is connected to backend in python and python backend is connected to open ai realtime api all are connected using websocket but sometimes I am receiving the same audio twice as well as transcript on frontend I am accessing the audio using below function client.on('conversation.updated', async (response: any) => { const { item, delta } = response; })
here in delta I am receiving same audio twice.
Dear in my opinion and experience .
This could be due to WebSocket reconnections or multiple listeners on the conversation.updated event. Ensure that it does not reconnect WebSocket and that only one listener is active. The backend should also be checked for sending duplicate updates.