geethareddy commited on
Commit
cb0a021
·
verified ·
1 Parent(s): 7fdab26

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +25 -8
templates/index.html CHANGED
@@ -3,16 +3,27 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>AI Dining Assistant</title>
7
  <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
8
  </head>
9
  <body>
10
- <h1>🍽️ Biryani Hub</h1>
11
- <img src="{{ url_for('static', filename='mic.png') }}" id="mic-button" onclick="recordAudio()" alt="Mic Button">
12
- <p id="status">Press the mic button to start...</p>
13
- <audio id="audio-player" controls></audio>
14
- <h3>Your Response:</h3>
15
- <p id="transcription"></p>
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  <script>
18
  async function playWelcomeAudio() {
@@ -42,7 +53,13 @@
42
  });
43
 
44
  let result = await response.json();
45
- document.getElementById("transcription").innerText = result.text || result.error;
 
 
 
 
 
 
46
  };
47
 
48
  mediaRecorder.start();
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Biryani Hub</title>
7
  <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
8
  </head>
9
  <body>
10
+ <div class="container">
11
+ <h1>Biryani Hub</h1>
12
+
13
+ <label for="name">Name</label>
14
+ <input type="text" id="name" placeholder="Your name will appear here..." readonly>
15
+
16
+ <label for="email">Email</label>
17
+ <input type="text" id="email" placeholder="Your email will appear here..." readonly>
18
+
19
+ <button id="mic-button" onclick="recordAudio()">
20
+ 🎙️ Click to Speak
21
+ </button>
22
+
23
+ <p class="instructions">Please say your name when ready</p>
24
+
25
+ <audio id="audio-player" controls></audio>
26
+ </div>
27
 
28
  <script>
29
  async function playWelcomeAudio() {
 
53
  });
54
 
55
  let result = await response.json();
56
+ document.getElementById("name").value = result.text || result.error;
57
+
58
+ // Prompt for Email after Name
59
+ setTimeout(() => {
60
+ let emailPrompt = new Audio("/static/email_prompt.mp3");
61
+ emailPrompt.play();
62
+ }, 2000);
63
  };
64
 
65
  mediaRecorder.start();