All Interactions with the Application besides the Speech recognition and OSC is done using Websockets.
Currently, all Websocket Clients are provided as HTML files. They should run on every relatively modern Browser that supports Websockets. (see support table on caniuse.com)
You have build a nice Client and would like to share?, let me know so i can add it to this list.
-
Simple websocket_clients/simple
Is the simplest implementation.
Mostly intended to show how to use it without much additional logic around it, to make it easier to build your own Overlay.
Supports only the
ws_server
URL argument. -
Streaming Overlay 01 websocket_clients/streaming-overlay-01
Has a lot more around the actual websocket implementation. Including a Styling that should work well for Streaming Overlays.
-
Streaming Overlay 02 websocket_clients/streaming-overlay-02
A rewritten implementation that looks more like traditional subtitles.
-
Websocket Remote websocket_clients/websocket-remote
Is the most complete Websocket implementation with additional Configuration Options that can be changed without restarting the application.
Clicking on any Transcription Box feeds the Transcription and/or Translation into the textual translation Fields to Translate it into another language, edit it or send again over OSC.
All Clients Support some options that can be set without changing the HTML
using Parameters added to the URL in the form:
index.html?ws_server=ws://127.0.0.1:5000&no_scroll=1&auto_hide_message=30
(first option is added with a ?
, all following with a &
)
Arguments | Default Value | Description |
---|---|---|
ws_server |
ws://127.0.0.1:5000 | Sets the Websocket Server IP and Port to connect to. |
no_scroll |
None | Removes the Scrollbar if set. |
bottom_align |
None | align to bottom of page (also removes scrolling) |
no_loader |
None | Disables the audio processing indicator if set. |
auto_hide_message |
0 | Sets the Seconds after which Transcriptions are hidden, but not removed. (Can be shown again by clicking in the lower part where the Boxes appear) 0 = Disabled |
auto_rm_message |
0 | Sets the Seconds after which Transcriptions are removed. (makes it impossible to access them again) 0 = Disabled |
show_transl_results |
websocket-remote=both streaming-overlay= auto |
Sets what is shown as translation / transcription result. Can be:both = shows both whisper and text translations.whisper_only = shows only Whisper results.auto = shows text translation if available, otherwise Whisper result. |
Since it is possible to run multiple AI's concurrently, it is possible to combine multiple Websocket Clients.
For Example, you can create a HTML Page with I-Frames that show the different Websocket Clients.
Following example shows on the left the local remote control webpage and on the right the streaming overlay page connecting to a secondary PC.
(but could also be the same PC using a different websocket port).
<!DOCTYPE html>
<html>
<head>
<title>Websocket Client Frames</title>
</head>
<frameset cols = "60%,40%">
<frame name = "left" src = "audioWhisper/websocket_clients/websocket-remote/index.html" />
<frame name = "right" src = "audioWhisper/websocket_clients/streaming-overlay-01/index.html?ws_server=ws://192.168.2.136:5000" />
<noframes>
<body>Your browser does not support frames.</body>
</noframes>
</frameset>
</html>