Skip to content

docs: document running the server on loopback TCP (localhost:port) - #10

Merged
vr000m merged 4 commits into
mainfrom
docs/run-prereq-note
Jun 9, 2026
Merged

docs: document running the server on loopback TCP (localhost:port)#10
vr000m merged 4 commits into
mainfrom
docs/run-prereq-note

Conversation

@vr000m

@vr000m vr000m commented Jun 9, 2026

Copy link
Copy Markdown
Owner

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 server section now has:

  • A prerequisite note: install with uv sync, run via uv run (or source .venv/bin/activate). Bare python -m stt_server … uses the system interpreter and fails with ModuleNotFoundError: No module named 'websockets'.
  • A minimal no-token loopback-TCP example (--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.
  • A Ports note: there is no baked-in default port (--port is required; --port 0 lets the OS assign one), and V1 rejects non-loopback binds (127.0.0.1/::1/localhost only).

Plus a matching ### Documentation entry under ## [Unreleased] in the changelog.

Docs-only — no code changes.

Test plan

  • Verified the documented no-token loopback command actually serves:
    uv run python -m stt_server --host 127.0.0.1 --port 9901 --backend echo
    # → "server listening on 127.0.0.1:9901" + the warn-only auth log, serves until closed
    
  • Confirmed the ModuleNotFoundError: websockets symptom is exactly what bare python produces (reproduced this session).
  • Cross-checked claims against server.py (__post_init__ loopback guard at server.py:113-114, warn-only auth at server.py:183-192, listening_port() for --port 0).

vr000m added 4 commits June 8, 2026 18:55
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'.
@vr000m
vr000m merged commit 99bd35c into main Jun 9, 2026
4 checks passed
@vr000m
vr000m deleted the docs/run-prereq-note branch June 9, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant