openai / openai-realtime-console

React app for inspecting, building and debugging with the Realtime API
MIT License
2.14k stars 795 forks source link

Console performance degrades over time leading to misinput, and eventually API disconnection #25

Open SkySlider opened 1 month ago

SkySlider commented 1 month ago

After just 2 minutes of using the console, the framerate begins to drop, noticeable by looking at the audio visualizers. 5 minutes in, the framerate decreases significantly to around 15 FPS, the model might not hear you (if in vad mode). The recording of the user input might be something that was said a minute ago or just empty (0 seconds). After approximately 15 minutes of continuous use, an uncaught error occurs, and the real-time API disconnects.

I'm using mid-range hardware, the problem persist in different browsers (tried chrome, opera).

partridgeworks commented 1 month ago

This sort of symptom smells like it's potentially some sort of event-handling error, e.g. the same event handlers being added several times / not being removed upon teardown of a React component.

khorwood-openai commented 1 month ago

I suspect it might be a memory issue; the current implementation saves every audio snippet as a blob with an Object URL reference to it. These files can be quite large. Can you share your machine specs?

SkySlider commented 1 month ago

I suspect it might be a memory issue; the current implementation saves every audio snippet as a blob with an Object URL reference to it. These files can be quite large. Can you share your machine specs?

i3 10th gen, 16 gb ram, RTX 3050, system and browser on nvme drive

3dsemu commented 1 month ago

Experiencing this as well, on all devices I've tested - M2 Pro 16GB MBP, and iPhone 15 Pro Max. Any way to reduce the memory load?

Stillerman commented 1 month ago

I am having this as well