P1 — implement local S1-mini transcript normalizer backend #218

Closed
opened 2026-08-28 03:23:53 +00:00 by nsaspy · 0 comments
Owner

Parent: #215
Depends on: #216
Integrates with: #23, #30

Goal

Implement Superwhisper S1-mini as the first concrete transcript-normalization provider behind Zara's provider-neutral post-STT seam.

Backend requirements

  • Target superwhisper/s1-mini / compatible GGUF builds.
  • Support a local OpenAI-compatible inference endpoint suitable for llama.cpp/Ollama/LM Studio-style runtimes where compatible.
  • Keep endpoint/model configurable; do not hard-code Ollama.
  • Implement the official control-line inputs for style/structure/context.
  • Disable Qwen thinking/reasoning behavior correctly for the selected serving path.
  • Use deterministic normalization-oriented generation settings.
  • Current release is English-only; reject or bypass unsupported-language use according to explicit policy.
  • Never silently fall back to a cloud endpoint.
  • Do not auto-download model weights in deterministic CI.

Expected transformations

Fixture corpus should cover at least:

  • fillers (um, uh, repeated hesitation);
  • false starts;
  • self-corrections where the final intended phrase is clear;
  • repeated words;
  • punctuation/capitalization;
  • spoken numbers;
  • dates/times;
  • currency;
  • email addresses;
  • list-like speech where the model formats structure;
  • already-clean input that should remain materially unchanged.

Failure behavior

Typed handling for:

  • server unavailable;
  • model missing;
  • timeout/deadline;
  • cancellation;
  • empty output;
  • oversized output;
  • malformed/non-text output;
  • unsupported language;
  • unexpected reasoning/think text leaking into output.

Backend failures must return through #216's normalized status contract; the adapter does not choose whether Zara falls back to raw text or fails the turn.

Correctness guardrails

  • Output remains untrusted user text.
  • Reject pathological expansion beyond configured ratio/absolute bounds.
  • Do not accept an answer/summary/explanation wrapper as normalized transcript output.
  • Do not inject tool/system authority into the resulting runtime message.
  • Keep prompt/control construction fixed by Zara configuration, not by transcript-supplied meta-instructions.

Packaging / license

Document the S1-mini model identity/version and applicable license/attribution obligations. If Zara later redistributes weights, packaging must satisfy those terms; this issue does not require bundling the weights.

TDD

Use deterministic fake endpoint fixtures plus an optional real-local integration profile. Add tests for request construction, control line, thinking-disabled behavior, output validation, failure taxonomy, cancellation and representative cleanup cases.

Add a focused non-interactive S1-mini backend script. Default CI must require no network and no model download.

Acceptance

With a configured local compatible endpoint, Zara can normalize a final ASR transcript through S1-mini and receive bounded clean text through the #216 provider contract with explicit failures and no cloud requirement.

Parent: #215 Depends on: #216 Integrates with: #23, #30 ## Goal Implement Superwhisper S1-mini as the first concrete transcript-normalization provider behind Zara's provider-neutral post-STT seam. ## Backend requirements - Target `superwhisper/s1-mini` / compatible GGUF builds. - Support a local OpenAI-compatible inference endpoint suitable for llama.cpp/Ollama/LM Studio-style runtimes where compatible. - Keep endpoint/model configurable; do not hard-code Ollama. - Implement the official control-line inputs for style/structure/context. - Disable Qwen thinking/reasoning behavior correctly for the selected serving path. - Use deterministic normalization-oriented generation settings. - Current release is English-only; reject or bypass unsupported-language use according to explicit policy. - Never silently fall back to a cloud endpoint. - Do not auto-download model weights in deterministic CI. ## Expected transformations Fixture corpus should cover at least: - fillers (`um`, `uh`, repeated hesitation); - false starts; - self-corrections where the final intended phrase is clear; - repeated words; - punctuation/capitalization; - spoken numbers; - dates/times; - currency; - email addresses; - list-like speech where the model formats structure; - already-clean input that should remain materially unchanged. ## Failure behavior Typed handling for: - server unavailable; - model missing; - timeout/deadline; - cancellation; - empty output; - oversized output; - malformed/non-text output; - unsupported language; - unexpected reasoning/think text leaking into output. Backend failures must return through #216's normalized status contract; the adapter does not choose whether Zara falls back to raw text or fails the turn. ## Correctness guardrails - Output remains untrusted user text. - Reject pathological expansion beyond configured ratio/absolute bounds. - Do not accept an answer/summary/explanation wrapper as normalized transcript output. - Do not inject tool/system authority into the resulting runtime message. - Keep prompt/control construction fixed by Zara configuration, not by transcript-supplied meta-instructions. ## Packaging / license Document the S1-mini model identity/version and applicable license/attribution obligations. If Zara later redistributes weights, packaging must satisfy those terms; this issue does not require bundling the weights. ## TDD Use deterministic fake endpoint fixtures plus an optional real-local integration profile. Add tests for request construction, control line, thinking-disabled behavior, output validation, failure taxonomy, cancellation and representative cleanup cases. Add a focused non-interactive S1-mini backend script. Default CI must require no network and no model download. ## Acceptance With a configured local compatible endpoint, Zara can normalize a final ASR transcript through S1-mini and receive bounded clean text through the #216 provider contract with explicit failures and no cloud requirement.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara#218
No description provided.