diff --git a/whisperlivekit/web/live_transcription.html b/whisperlivekit/web/live_transcription.html index 50f981a..6c81c72 100644 --- a/whisperlivekit/web/live_transcription.html +++ b/whisperlivekit/web/live_transcription.html @@ -321,7 +321,7 @@ const host = window.location.hostname || "localhost"; const port = window.location.port || "8000"; - const defaultWebSocketUrl = `ws://${host}:${port}/asr`; + const defaultWebSocketUrl = `${window.location.protocol === "https:" ? "wss" : "ws"}://${host}:${port}/asr`; websocketInput.value = defaultWebSocketUrl; websocketUrl = defaultWebSocketUrl;