Skip to content

feat(web): add loopback Qwen3-ASR voice input - #102

Merged
adityak74 merged 1 commit into
mainfrom
web/voice-input-qwen3-asr
Aug 24, 2026
Merged

feat(web): add loopback Qwen3-ASR voice input#102
adityak74 merged 1 commit into
mainfrom
web/voice-input-qwen3-asr

Conversation

@adityak74

Copy link
Copy Markdown
Contributor

Summary

  • add the standalone zorp-voice crate with the same four loopback protections as zorp-recall
  • add always-registered voice status, readiness, and transcription routes behind the non-default zorp-web/voice feature
  • add browser recording with MediaRecorder, visible permission and secure-context failures, cancel support, and editable transcript insertion
  • document Qwen3-ASR setup, environment defaults, the runtime contract, and the architecture decision

Recorded audio can reach only the checked loopback host and port. The client validates the written URL and every resolved address, uses a resolver pinned to that host and port, refuses redirects, and disables environment proxies. There is no cloud provider or fallback. Transcripts are untrusted text. They enter the composer through value, never send automatically, and change no tool or approval policy.

Runtime contract confirmed before implementation

I checked Transformers Serve 5.13.1 first. Its versioned documentation confirms POST /load_model with streamed SSE progress, GET /v1/models, and POST /v1/audio/transcriptions. I rejected that integration after checking the handler contract. Its generic transcription path prepares audio alone. Qwen3-ASR requires its registered processor, prompt preparation, and output parser. A real loader paired with an incompatible transcription handler is not a usable Qwen3-ASR runtime.

The implemented runtime is qwen-asr 0.0.6. I confirmed the contract in the official package and runtime sources:

The supported qwen-asr-serve runtime has no HTTP model pull endpoint. It downloads weights when the operator starts it. The browser therefore shows an explicit install and start command for a direct root HTTP endpoint, then streams observed readiness polling. It says that it is waiting and shows no percentage or download stage. HTTPS and path-prefixed loopback URLs require an operator-managed proxy, so zorp does not fabricate a direct start command for them.

Defaults are http://127.0.0.1:8000 and Qwen/Qwen3-ASR-0.6B. ZORP_VOICE_URL and ZORP_VOICE_MODEL override them. A non-loopback URL is refused.

Verification

Passed:

  • cargo build --workspace
  • cargo build --workspace --locked
  • cargo test --workspace --no-run
  • cargo test -p zorp-web --features voice --no-run
  • cargo test -p zorp-voice --no-run
  • cargo test -p zorp-web --features voice --lib, 100 tests
  • cargo test -p zorp-voice --lib, 6 tests
  • cargo fmt --all
  • cargo clippy --workspace --all-targets, with two unchanged warnings in zorp-track
  • cargo clippy -p zorp-web --features voice --all-targets
  • npm run check
  • npm test, 261 tests
  • npm run build
  • git diff --check

The three requested full test commands were also run. The managed execution sandbox refuses every local TCP bind with Operation not permitted, so socket-backed integration tests cannot start their loopback canaries here:

  • cargo test --workspace reached the existing root integration suite, then four tests failed while binding 127.0.0.1:0 at tests/common/mod.rs:11.
  • cargo test -p zorp-web --features voice passed all 100 library tests, then the existing artifact integration test failed while binding at zorp-web/tests/common/mod.rs:144.
  • cargo test -p zorp-voice passed all 6 library tests, then the loopback canary failed while binding at zorp-voice/tests/common/mod.rs:18.

Compilation of every integration test passed through the --no-run commands. The connection-counting tests remain in the PR for CI and an unrestricted local environment.

@adityak74
adityak74 force-pushed the web/voice-input-qwen3-asr branch from 0a23a95 to 15e2492 Compare August 24, 2026 18:09
@adityak74
adityak74 force-pushed the web/voice-input-qwen3-asr branch from 15e2492 to 3311aab Compare August 24, 2026 18:13
@adityak74
adityak74 merged commit 4a6501e into main Aug 24, 2026
7 checks passed
@adityak74
adityak74 deleted the web/voice-input-qwen3-asr branch August 24, 2026 18:14
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