diff --git a/backend/files/system/openai/front.files/chat/default.js b/backend/files/system/openai/front.files/chat/default.js index 408b727b84..67a331fbbf 100644 --- a/backend/files/system/openai/front.files/chat/default.js +++ b/backend/files/system/openai/front.files/chat/default.js @@ -170,6 +170,10 @@ function aista_create_chat_ui() { if (btns.length > 0) { btns[0].style.display = 'block'; } + if (ainiro_con) { + ainiro_con.stop(); + ainiro_con = null; + } } }); @@ -180,6 +184,10 @@ function aista_create_chat_ui() { if (btns.length > 0) { btns[0].style.display = 'block'; } + if (ainiro_con) { + ainiro_con.stop(); + ainiro_con = null; + } }); // Add an event listener to the microphone button.