Skip to content

@remotion/whisper-web: fix package not working in Vite and upgrade whisper.cpp to 1.7.5 - #5302

Merged
JonnyBurger merged 6 commits into
mainfrom
support/whisper-web-refine
May 25, 2025
Merged

JonnyBurger merged 6 commits into
mainfrom
support/whisper-web-refine

Conversation

@samohovets

@samohovets samohovets commented May 19, 2025 •

Copy link
Copy Markdown
Member

@vercel

vercel Bot commented May 19, 2025 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bugs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2025 10:54pm
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2025 10:54pm

@JonnyBurger JonnyBurger changed the title @remotion/whisper-web fixes and refines @remotion/whisper-web: fixes and refines May 21, 2025
@samohovets samohovets changed the title @remotion/whisper-web: fixes and refines @remotion/whisper-web: fix package not working in Vite, upgrade to whisper 1.7.5, refactor May 21, 2025
@samohovets

samohovets commented May 21, 2025 •

Copy link
Copy Markdown
Member Author

After a long investigation, I've decided to leave a note in the docs about Vite instead of patching the compiled main.js.

Simplified, the current problem looks like this:

  • Webpack doesn't work with new Worker(new URL(import.meta.url)) syntax. It was fixed recently; however, a lot of frameworks and setups are using the old webpack version, and we should not require everyone to upgrade to use the package.

  • Vite doesn't work correctly when spawning the worker like this: new Worker(new URL('./main.js', import.meta.url)) (default emscripten way). It's a known issue.

So, it's just that Vite dep optimizer doesn't support this.

For now, let's recommend using optimizeDeps.exclude.

Hopefully, this will be fixed on the Vite side in the future.

Leaving the list of issues here for reference:

@samohovets
samohovets marked this pull request as ready for review May 21, 2025 22:34
@samohovets
samohovets requested a review from JonnyBurger May 21, 2025 22:35
@samohovets samohovets changed the title @remotion/whisper-web: fix package not working in Vite, upgrade to whisper 1.7.5, refactor @remotion/whisper-web: fix package not working in Vite and upgrade whisper.cpp May 22, 2025
@samohovets samohovets changed the title @remotion/whisper-web: fix package not working in Vite and upgrade whisper.cpp @remotion/whisper-web: fix package not working in Vite and upgrade whisper.cpp to 1.7.5 May 22, 2025
@JonnyBurger
JonnyBurger merged commit c5d4ea1 into main May 25, 2025
@JonnyBurger
JonnyBurger deleted the support/whisper-web-refine branch May 25, 2025 11:21
@JonnyBurger

JonnyBurger commented May 25, 2025 •

Copy link
Copy Markdown
Member

Thank you!

This branch was successfully deployed

2 active deployments
Preview – bugs — 39bdc75b Deployed May 21, 2025 by vercel[bot]
Preview – remotion — 39bdc75b Deployed May 21, 2025 by vercel[bot]
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.

Compiled code using pthreads breaks Vite bundler

2 participants