Skip to content

fix(captioning): correct web-demuxer.wasm URL — transcription always failed with "Failed to fetch" - #370

Open
superkc2026 wants to merge 1 commit into
getopenscreen:mainfrom
superkc2026:fix/transcription-wasm-path
Open

fix(captioning): correct web-demuxer.wasm URL — transcription always failed with "Failed to fetch"#370
superkc2026 wants to merge 1 commit into
getopenscreen:mainfrom
superkc2026:fix/transcription-wasm-path

Conversation

@superkc2026

@superkc2026 superkc2026 commented Aug 14, 2026

Copy link
Copy Markdown

Problem

Every transcription run fails with Failed to fetch — in dev and in packaged builds.

Root cause

extractMono16kWebDemuxer.ts resolves the web-demuxer wasm from:

../exporter/wasm/web-demuxer.wasm

but the asset lives in public/wasm/ and is emitted at dist/wasm/, next to the renderer entry. The resolved URL 404s, so new WebDemuxer(...) dies at the wasm fetch step and transcription never starts.

Fix

Align it with the two other consumers (streamingAudioPeaks.ts, streamingDecoder.ts), which already use the correct relative path:

-return new URL("../exporter/wasm/web-demuxer.wasm", window.location.href).href;
+return new URL("./wasm/web-demuxer.wasm", window.location.href).href;

Testing

  • Packaged Windows build: transcription was 100% failing before; after this one-line change it transcribes correctly (whisper.cpp local inference).
  • The same relative asset path is already proven by the other two wasm consumers.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed WebDemuxer WASM asset loading by resolving it from the correct local path.

…failed with "Failed to fetch"

The captioning demuxer resolved web-demuxer.wasm from
`../exporter/wasm/`, but the asset ships in `public/wasm/` and is
emitted at `dist/wasm/` next to the renderer entry — so the resolved
URL 404s in both dev and packaged builds, and every transcription run
fails at wasm fetch. The two other consumers (streamingAudioPeaks.ts,
streamingDecoder.ts) already use `./wasm/`; this aligns the last one.
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c625a86f-46db-45bc-a200-f4f8db1529dc

📥 Commits

Reviewing files that changed from the base of the PR and between d5b1e8f and ab0b36a.

📒 Files selected for processing (1)
  • src/lib/captioning/extractMono16kWebDemuxer.ts

📝 Walkthrough

Walkthrough

The WebDemuxer WASM asset URL now points to the local ./wasm directory.

Changes

WebDemuxer asset loading

Layer / File(s) Summary
Update WASM asset path
src/lib/captioning/extractMono16kWebDemuxer.ts
The demuxer now loads web-demuxer.wasm from ./wasm instead of ../exporter/wasm.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to ab0b3

This localized URL correction restores wasm loading for transcription and is reported to work in the packaged build; no actionable merge-blocking risk remains.

Suggested reviewers: etiennelescot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the WASM URL fix and the transcription fetch failure it resolves.
Description check ✅ Passed The description clearly explains the problem, root cause, fix, and testing results, although it omits several template checklist sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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