diff --git a/src/web/live_transcription.html b/src/web/live_transcription.html
index b9d4ea6..951d95e 100644
--- a/src/web/live_transcription.html
+++ b/src/web/live_transcription.html
@@ -1,339 +1,361 @@
+
-
-
- Audio Transcription
-
+
+ .loading {
+ color: #666;
+ background-color: #eff9ff;
+ font-size: 14px;
+ border-radius: 30px;
+ padding: 2px 10px;
+ }
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
+
+
-
+ if (websocket) {
+ websocket.close();
+ websocket = null;
+ }
+
+ updateUI();
+ }
+
+ async function toggleRecording() {
+ if (!isRecording) {
+ linesTranscriptDiv.innerHTML = "";
+ try {
+ await setupWebSocket();
+ await startRecording();
+ } catch (err) {
+ statusText.textContent = "Could not connect to WebSocket or access mic. Aborted.";
+ }
+ } else {
+ stopRecording();
+ }
+ }
+
+ function updateUI() {
+ recordButton.classList.toggle("recording", isRecording);
+ statusText.textContent = isRecording ? "Recording..." : "Click to start transcription";
+ }
+
+ recordButton.addEventListener("click", toggleRecording);
+
+
\ No newline at end of file