

/ws to /asr to distinguish protocol ws:// from endpoint
@4de8651f1af5c4ec909aac03230620b8da90c167
--- README.md
+++ README.md
... | ... | @@ -86,7 +86,7 @@ |
86 | 86 |
### How the Live Interface Works |
87 | 87 |
|
88 | 88 |
- Once you **allow microphone access**, the page records small chunks of audio using the **MediaRecorder** API in **webm/opus** format. |
89 |
-- These chunks are sent over a **WebSocket** to the FastAPI endpoint at `/ws`. |
|
89 |
+- These chunks are sent over a **WebSocket** to the FastAPI endpoint at `/asr`. |
|
90 | 90 |
- The Python server decodes `.webm` chunks on the fly using **FFmpeg** and streams them into the **whisper streaming** implementation for transcription. |
91 | 91 |
- **Partial transcription** appears as soon as enough audio is processed. The “unvalidated” text is shown in **lighter or grey color** (i.e., an ‘aperçu’) to indicate it’s still buffered partial output. Once Whisper finalizes that segment, it’s displayed in normal text. |
92 | 92 |
- You can watch the transcription update in near real time, ideal for demos, prototyping, or quick debugging. |
--- src/live_transcription.html
+++ src/live_transcription.html
... | ... | @@ -92,7 +92,7 @@ |
92 | 92 |
</div> |
93 | 93 |
<div> |
94 | 94 |
<label for="websocketInput">WebSocket URL:</label> |
95 |
- <input id="websocketInput" type="text" value="ws://localhost:8000/ws" /> |
|
95 |
+ <input id="websocketInput" type="text" value="ws://localhost:8000/asr" /> |
|
96 | 96 |
</div> |
97 | 97 |
</div> |
98 | 98 |
</div> |
... | ... | @@ -105,7 +105,7 @@ |
105 | 105 |
websocket, |
106 | 106 |
recorder, |
107 | 107 |
chunkDuration = 1000, |
108 |
- websocketUrl = "ws://localhost:8000/ws"; |
|
108 |
+ websocketUrl = "ws://localhost:8000/asr"; |
|
109 | 109 |
|
110 | 110 |
// Tracks whether the user voluntarily closed the WebSocket |
111 | 111 |
let userClosing = false; |
--- whisper_fastapi_online_server.py
+++ whisper_fastapi_online_server.py
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 |
) |
58 | 58 |
return process |
59 | 59 |
|
60 |
-@app.websocket("/ws") |
|
60 |
+@app.websocket("/asr") |
|
61 | 61 |
async def websocket_endpoint(websocket: WebSocket): |
62 | 62 |
await websocket.accept() |
63 | 63 |
print("WebSocket connection opened.") |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?