Skip to content

fix(clone): say a long reference is too long when no speech-to-text model is installed - #2444

Merged
debpalash merged 3 commits into
debpalash:mainfrom
drakeo338:claude/2442-fix
Oct 1, 2026
Merged

debpalash merged 3 commits into
debpalash:mainfrom
drakeo338:claude/2442-fix

Conversation

@drakeo338

@drakeo338 drakeo338 commented Sep 30, 2026 •

Copy link
Copy Markdown

Summary

Fixes #2442.

With no speech-to-text model, a reference over 20 s got a request for a transcript that would be refused anyway. It now says the clip is too long and to trim it to 3-10 s.

Changes

  • Name the length limit in the error (omnivoice.py), plus tests and CHANGELOG

Type

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • 🧪 Tests
  • 🔧 CI / Build
  • 🚀 Release prep

Testing

Ran tests/test_clone_long_reference.py, tests/test_omnivoice_reference_bound.py and tests/test_reference_asr_offline.py on the committed HEAD: 85 passed (4 failed on the base). smoke-matrix not run locally, so unticked.

Checklist

  • I've tested this locally
  • I've updated relevant documentation (if applicable)
  • No local machine paths, logs, or personal env details in this PR
  • Maintained version files are in sync (if an owner-requested bump): root package.json, pyproject.toml, backend/core/version.py, and lockfiles
  • If this PR changes runtime behavior, the regression fixture at tests/fixtures/omnivoice_data/ still loads green on the smoke-matrix CI job (macOS + Windows + Linux)

Release cadence

VoiceStudio ships continuous-to-main — no release candidates, no soak windows.
Every merged PR is immediately part of rolling source (main) and Docker
:latest. Electron artifact rehearsals validate desktop packages without publishing.
Version bumps require owner approval; validated releases are tagged from main
and published explicitly under the release checklist.
Users who want stability install an Electron release or pin Docker :stable.

OmniVoice now reports the 20-second reference limit for long clips that cannot use transcript-based processing, while shorter clips retain the missing-ASR or transcript guidance. This gives users the relevant error and trim guidance; tests and the changelog reflect the change. The author reports 85 tests passed and 4 failures also present on the base; the smoke matrix was not run locally.

…-to-text model

A reference over 20 s cannot take a transcript, yet the missing-ASR error only asked for one. Say the clip is too long and to trim it to 3-10 s, keeping the old message for clips within 20 s.

Refs debpalash#2442

Signed-off-by: drakeo338 <[email protected]>
…transcript

Remove the second, unreachable copy of the over-limit message. The over-75 s
and no-speech errors no longer suggest a transcript for clips over 20 s, which
are refused anyway. Reword the missing-ASR hint and update the offline test.

Refs debpalash#2442

Signed-off-by: drakeo338 <[email protected]>
@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Retrigger

[Medium risk] Voice clone reference validation changes error messages.

The PR appears safe to merge; no outstanding finding remains.

Summary

The PR gives references over 20 seconds a length-specific error when the cached speech-to-text model is missing.

  • It preserves unrelated ASR loading errors and adds regression coverage for both cases.
  • The changelog now credits the contributor.

Reviews (2) · Last reviewed commit: "fix(clone): only map the missing ASR sna..."

Comment thread omnivoice/models/omnivoice.py Resolved
Comment thread CHANGELOG.md Resolved
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: debpalash/VoiceStudio/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 7b4ae3a6-9ec5-4a00-b3ee-3e174260f26a

📥 Commits

Reviewing files that changed from the base of the PR and between f1aa37f and 0d4a299.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • omnivoice/models/omnivoice.py
  • tests/test_clone_long_reference.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Reference audio error messages now account for the 20-second transcript limit. Long clips receive trimming guidance when a transcript or cached ASR model is unavailable. Shorter clips retain transcript guidance where applicable.

Changes

Reference transcription errors

Layer / File(s) Summary
Duration-aware error handling
omnivoice/models/omnivoice.py, CHANGELOG.md
A typed error distinguishes a missing cached ASR snapshot. Errors for long references provide transcript-limit and trimming guidance without suggesting a transcript. The changelog records the updated guidance.
Reference error tests
tests/test_clone_long_reference.py, tests/test_omnivoice_reference_bound.py, tests/test_reference_asr_offline.py
Tests cover long and short references when cached ASR is unavailable, unrelated ASR errors, offline ASR behavior, and cases where speech is not detected.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: debpalash

Merge Risk: ⚪ Minimal · up to 0d4a2

Long references without an available speech-to-text model receive trim guidance, while the interface distinguishes the transcript and no-transcript limits. No material merge risk is established.

🚥 Pre-merge checks | ✅ 7 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 53.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
I18n Completeness (21 Locales) ⚠️ Warning The PR adds and changes user-facing clone errors as hardcoded Python strings in omnivoice/models/omnivoice.py:833-838, 856-864, and 885-889. The renderer does not translate these messages: it fa… Replace the backend prose with stable error codes and interpolation parameters. Add the corresponding translated keys to all 21 renderer locale files, then map the codes to i18next.t(...) before displaying the errors.
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required conventional-commit format with scope, describes the long-reference error change, and the body includes issue reference #2442.
Description check ✅ Passed The description includes the required summary, changes, type, testing, checklist, and release cadence sections. It also states that smoke-matrix was not run locally, which remains a CI verification it…
Linked Issues check ✅ Passed For issue #2442, the missing cached ASR snapshot now produces a length-specific error for references over 20 seconds, including the measured duration, the 20-second limit, and trim-to-3–10-second guid…
Out of Scope Changes check ✅ Passed The production changes, tests, and changelog all support issue #2442 by selecting the length error only for the missing-ASR case and preserving other ASR errors. No unrelated behavior is demonstrated.
Cross-Platform Default Parity ✅ Passed PASS — The PR changes default reference-selection behavior, but the changed path is platform-independent. omnivoice/models/omnivoice.py uses the same 20-second limit, exception mapping, message, and…
Local-First Guarantee ✅ Passed The PR adds no cloud call, account requirement, API key, or telemetry. The changed ASR path still uses snapshot_download(..., local_files_only=True), and the diff only changes the exception type and…
Backward Compatibility ✅ Passed No backward-compatibility failure is introduced. The PR changes only OmniVoice error handling and tests/changelog; it does not change omnivoice_data, voices, projects, settings, engine files, depend…
Full details: Docstring Coverage

Explanation

Docstring coverage is 53.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. (1 skipped: 1 unsupported.)

Full details: I18n Completeness (21 Locales)

Explanation

The PR adds and changes user-facing clone errors as hardcoded Python strings in omnivoice/models/omnivoice.py:833-838, 856-864, and 885-889. The renderer does not translate these messages: it falls back to event.detail, while generationFailureMessage.ts handles only unrelated structured topics. No frontend t('...') keys changed, so no locale file is missing a changed key.

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@drakeo338

Copy link
Copy Markdown
Author

Narrowed the catch to the missing-snapshot error so other ASR load failures surface as before, and added the changelog credit, in 0d4a299.

@debpalash
debpalash merged commit 8eddae1 into debpalash:main Oct 1, 2026
16 checks passed
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.

[Bug] Automatic reference transcription needs an installed speech-to-text model

2 participants