yasserrmd commited on
Commit
e119305
·
verified ·
1 Parent(s): 5dda573

Update static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +3 -3
static/index.html CHANGED
@@ -39,12 +39,12 @@
39
  });
40
 
41
  document.getElementById("generateButton").addEventListener("click", async () => {
42
- const text = prompt("Enter text to convert to speech:");
43
- if (text) {
44
  const response = await fetch("/tts/", {
45
  method: "POST",
46
  headers: { "Content-Type": "application/json" },
47
- body: JSON.stringify({ text })
48
  });
49
  const audioData = await response.blob();
50
  document.getElementById("audioPlayer").src = URL.createObjectURL(audioData);
 
39
  });
40
 
41
  document.getElementById("generateButton").addEventListener("click", async () => {
42
+ const inputText = prompt("Enter text to convert to speech:");
43
+ if (inputText) {
44
  const response = await fetch("/tts/", {
45
  method: "POST",
46
  headers: { "Content-Type": "application/json" },
47
+ body: JSON.stringify({ text:inputText})
48
  });
49
  const audioData = await response.blob();
50
  document.getElementById("audioPlayer").src = URL.createObjectURL(audioData);