docs: document running the server on loopback TCP (localhost:port) - #10
Merged
Conversation
Bare `python -m stt_server` uses the system interpreter and fails with ModuleNotFoundError on websockets. The examples already use `uv run` but there was no explicit callout that the prefix (or an activated .venv) is required, which trips up first-time runs.
The only TCP example required --auth-token-file, making a token look mandatory. On loopback auth is warn-only (server.py:183-192), so add a minimal no-token form, note there is no default port (--port is required; --port 0 = OS-assigned), and that V1 rejects non-loopback binds.
A developer hitting ModuleNotFoundError on mlx_whisper from the run examples had no in-place pointer to the required `uv sync --extra mlx`. Add a note + anchor link to 'Choosing a backend and model'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents how to run the STT server on a loopback TCP port (
localhost:port) — the one run mode the README only showed in its auth-required form, which made a bearer token look mandatory and left no example for a quick local TCP bring-up.Concretely, the
## Running the serversection now has:uv sync, run viauv run(orsource .venv/bin/activate). Barepython -m stt_server …uses the system interpreter and fails withModuleNotFoundError: No module named 'websockets'.--host 127.0.0.1 --port 9900 --backend echo). Auth is warn-only on loopback (server.py:183-192), so a token is optional for local experiments.--portis required;--port 0lets the OS assign one), and V1 rejects non-loopback binds (127.0.0.1/::1/localhostonly).Plus a matching
### Documentationentry under## [Unreleased]in the changelog.Docs-only — no code changes.
Test plan
ModuleNotFoundError: websocketssymptom is exactly what barepythonproduces (reproduced this session).server.py(__post_init__loopback guard atserver.py:113-114, warn-only auth atserver.py:183-192,listening_port()for--port 0).