redfernstech commited on
Commit
2888165
·
verified ·
1 Parent(s): c93994b

Update static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +3 -1
static/index.html CHANGED
@@ -147,7 +147,9 @@
147
  const botMessage = data.response;
148
  addMessage("Bot", botMessage, "bot-message");
149
  chatHistoryArray.push({ sender: "Bot", message: botMessage });
150
- playAudio(data.audioUrl);
 
 
151
  } catch (error) {
152
  botTyping.remove();
153
  console.error("Error:", error);
 
147
  const botMessage = data.response;
148
  addMessage("Bot", botMessage, "bot-message");
149
  chatHistoryArray.push({ sender: "Bot", message: botMessage });
150
+ if (data.audioUrl) {
151
+ playAudio(data.audioUrl);
152
+ }
153
  } catch (error) {
154
  botTyping.remove();
155
  console.error("Error:", error);