index.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Whisper Speech Recognition Test (File-based)</title>
  7. <style>
  8. body {
  9. font-family: Arial, sans-serif;
  10. display: flex;
  11. flex-direction: column;
  12. align-items: center;
  13. padding: 20px;
  14. background-color: #f0f0f0;
  15. }
  16. h1 {
  17. color: #333;
  18. }
  19. #controls {
  20. margin: 20px 0;
  21. }
  22. button {
  23. padding: 10px 20px;
  24. margin: 0 10px;
  25. font-size: 16px;
  26. cursor: pointer;
  27. background-color: #007bff;
  28. color: white;
  29. border: none;
  30. border-radius: 5px;
  31. }
  32. button:disabled {
  33. background-color: #cccccc;
  34. cursor: not-allowed;
  35. }
  36. #status {
  37. margin: 10px 0;
  38. font-weight: bold;
  39. color: #555;
  40. }
  41. #transcription, #translation {
  42. width: 80%;
  43. max-width: 600px;
  44. min-height: 100px;
  45. padding: 10px;
  46. background-color: white;
  47. border: 1px solid #ccc;
  48. border-radius: 5px;
  49. white-space: pre-wrap;
  50. overflow-y: auto;
  51. }
  52. </style>
  53. </head>
  54. <body>
  55. <h1>Whisper Speech Recognition Test</h1>
  56. <div id="controls">
  57. <button id="startBtn">Start Recording</button>
  58. <button id="stopBtn" disabled>Stop Recording</button>
  59. </div>
  60. <div id="status">Status: Idle</div>
  61. <div id="transcription">Transcription will appear here...</div>
  62. <div id="translation">Translation will appear here...</div>
  63. <script src="https://cdn.jsdelivr.net/npm/base64-js@1.5.1/base64js.min.js"></script>
  64. <script type="module" src="./main.js"></script>
  65. </body>
  66. </html>