Gregniuki commited on
Commit
fd6f301
·
1 Parent(s): 5e2a8be

Update templates/interface.html

Browse files
Files changed (1) hide show
  1. templates/interface.html +8 -7
templates/interface.html CHANGED
@@ -55,14 +55,15 @@
55
  <button type="submit" id="synthesize_button">Synthesize</button>
56
  <button type="button" id="close_button" onclick="closeGUI()">Exit</button>
57
  </div>
58
- <div>
59
- <!-- HTML audio element to play the generated audio -->
60
- <audio controls>
61
- <source src="/generate_audio" type="audio/wav"> <!-- Replace "/generate_audio" with your FastAPI route URL -->
62
- Your browser does not support the audio element.
63
- </audio>
64
- </div>
65
  </form>
 
 
 
 
 
 
 
 
66
  <script>
67
  // JavaScript function for handling the "Exit" button click
68
  function closeGUI() {
 
55
  <button type="submit" id="synthesize_button">Synthesize</button>
56
  <button type="button" id="close_button" onclick="closeGUI()">Exit</button>
57
  </div>
 
 
 
 
 
 
 
58
  </form>
59
+ {% if audio_file %}
60
+ <h2>Generated Audio</h2>
61
+ <audio controls>
62
+ <source src="{{ audio_file }}" type="audio/mpeg">
63
+ Your browser does not support the audio element.
64
+ </audio>
65
+ <a href="{{ audio_file }}" download>Download Audio</a>
66
+ {% endif %}
67
  <script>
68
  // JavaScript function for handling the "Exit" button click
69
  function closeGUI() {