QVAC-23965 feat[api]: describe whisper + parakeet modelConfig fields - #4068
Open
lauripiisang wants to merge 1 commit into
Open
QVAC-23965 feat[api]: describe whisper + parakeet modelConfig fields#4068lauripiisang wants to merge 1 commit into
lauripiisang wants to merge 1 commit into
Conversation
Contributor
Review StatusCurrent Status: ❌ PENDING Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member. |
Contributor
License compliance — cleanNo new dependency license findings in this PR. Warn-only (shadow) mode — this check does not block merges yet. Updated automatically by the canonical license compliance workflow. NOTICE presence (advisory)Missing NOTICE (advisory, does not block):
|
ishanvohra2
requested changes
Aug 26, 2026
| backendsDir: z | ||
| .string() | ||
| .optional() | ||
| .describe('Root directory for dynamically-loaded ggml backend `.so` files. Defaults to `prebuilds/`.'), |
Contributor
There was a problem hiding this comment.
- Both
SDK Pod Checksruns fail thepackages/inferenceformat check on this file, which also causes Merge Guard to fail. - Please run the package formatter and commit its output so this PR can pass CI.
| .int() | ||
| .nonnegative() | ||
| .optional() | ||
| .describe('ASR encoder left-context window in ms; `-1` keeps the model default (10000).'), |
Contributor
There was a problem hiding this comment.
- This description says callers can pass
-1, but.nonnegative()rejects that value before it reaches the addon. The same mismatch exists onstreamingRightLookaheadMsbelow. - The addon itself uses
-1when these fields are omitted, so either allow-1in both schemas or document that callers must omit the fields to retain the model defaults. - Please add coverage for the chosen contract so the generated TypeScript and Python clients do not advertise an unusable value.
| samples_overlap: z | ||
| .number() | ||
| .optional() | ||
| .describe('Overlap between consecutive speech segments (0–1).') |
Contributor
There was a problem hiding this comment.
- This advertises an inclusive
0–1range, but the streaming driver resolvessamples_overlapwithvadParams.samples_overlap || defaults.samplesOverlap; an explicit0therefore silently becomes the default overlap. - Please either resolve the driver value with
??so zero works, or change the documented/validated range if zero is intentionally unsupported, with a regression test for streaming config construction.
- Add .describe() to whisperConfigSchema scalar/nested fields (top-level, vad_params, contextParams, miscConfig, vadModelSrc) sourced from @qvac/asr-ggml whisper-addon-help.md / README - Add .describe() to every parakeetRuntimeConfigSchema field sourced from @qvac/asr-ggml PARAKEET-README.md; existing JSDoc-only fields (streamingEnergyVad, language) converted to describes - 11 whisper fields map 1:1 to upstream whisper_full_params with no in-repo semantics (no_context, single_segment, print_realtime, print_timestamps, token_timestamps, thold_ptsum, split_on_word, max_tokens, debug_mode, suppress_blank, length_penalty) — left undescribed with a TODO for the addon owner - Regenerate contract/schema.json and the Python generated models
lauripiisang
force-pushed
the
QVAC-23965-describe-transcription
branch
from
August 26, 2026 14:38
1d1c233 to
9ce3671
Compare
GustavoA1604
left a comment
Contributor
There was a problem hiding this comment.
Field descriptions (all map 1:1 to whisper_full_params):
- no_context — Do not carry past transcription forward as the decoder's initial prompt; each window is decoded independently. Avoids earlier text biasing later chunks and repetition-loop carryover.
- single_segment — Force the whole audio into one output segment. For streaming/short clips where you don't want splitting.
- print_realtime — whisper.cpp prints results to stderr as it decodes. Upstream advises against it; use the segment callback instead. Diagnostic only.
- print_timestamps — Only affects print_realtime output: prefixes each printed line with [t0 --> t1]. No effect on returned data.
- token_timestamps — [EXPERIMENTAL] Compute per-token timestamps (populates t0/t1 in whisper_token_data). Needed for word/token-level timing.
- thold_ptsum — Timestamp-token sum-probability threshold (~0.01) used when deriving token-level timestamps. Handler enforces 0 ≤ x ≤ 1.
- split_on_word — When max_len > 0, split segments on word boundaries instead of mid-token.
- max_tokens — Max tokens per segment; 0 = no limit. Handler enforces ≥ 0.
- debug_mode — [EXPERIMENTAL] Extra debug output (e.g. dumps the log-mel). Off in normal use.
- suppress_blank — Suppresses the blank/leading-space token at the start of sampling (OpenAI decoding.py behavior).
- length_penalty — Beam-search length penalty. Note: upstream default -1.0 means "disabled", but our handler rejects negatives (≥ 0 required), so the disabled sentinel can't be set via config — default stays -1 unless a caller passes ≥ 0. Worth noting in docs.
About detect_language:
- Confirmed rejected natively — there is no detect_language handler key in WHISPER_MAIN_HANDLERS; unknown keys throw InvalidArgument (WhisperConfig.cpp:48).
- Intentionally not exposed: auto-detection is driven by language: "auto", which sets language = nullptr and keeps detect_language = false on purpose (WhisperHandlers.cpp:249-256).
- Setting detect_language = true makes whisper_full return right after detecting the language and emit no segments — that's why it's suppressed.
- Action: don't document it as a config field; document language: "auto" as the way to auto-detect.
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.
🎯 What problem does this PR solve?
modelConfigfields shipped without descriptions, so the generated contract consumed byqvac configureand the generated clients couldn't say what any field means.📝 How does it solve it?
whisperConfigSchema): adds.describe()to the scalar fields and the nestedvad_params,contextParams,miscConfig, plusaudio_formatandvadModelSrc. Text sourced from@qvac/asr-ggmldocs/whisper-addon-help.md/ README.parakeetRuntimeConfigSchema): adds.describe()to every field, sourced from@qvac/asr-ggmldocs/PARAKEET-README.md; the two fields that carried only JSDoc (streamingEnergyVad,language) are converted to descriptions so they reach the contract.contract/schema.jsonand the Python generated models.Part of QVAC-23933.
Flagged (needs addon-owner input)
11 whisper fields map 1:1 to upstream
whisper_full_paramsand have no human-readable semantics documented in-repo, so they are intentionally left without a description (in-code TODO):no_context,single_segment,print_realtime,print_timestamps,token_timestamps,thold_ptsum,split_on_word,max_tokens,debug_mode,suppress_blank,length_penalty.The 9 deprecated parakeet ONNX placeholder fields are also left as-is (they only exist to raise a structured migration error).
🧪 How was it tested?
bun run contract:exportregenerated;contract:check,typecheck,lint,format, and fulltest:unit(incl. contract-export freshness) pass.packages/inferencetypecheck+lintpass.packages/sdk-pythongenerate.py --checkpasses.🔌 API Changes
Additive only: