From db358d48709f33c987ddcb8eab22cc0b4ed304fa Mon Sep 17 00:00:00 2001 From: Ivan Panin Date: Thu, 20 Nov 2025 01:09:30 +0300 Subject: [PATCH] Add placeholder whisper wasm modules --- README.md | 2 ++ app/public/wasm/whisper-web.js | 10 ++++++++++ app/public/wasm/whisper-web.single.js | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 app/public/wasm/whisper-web.js create mode 100644 app/public/wasm/whisper-web.single.js diff --git a/README.md b/README.md index c6cc9d0..3eaf6e2 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,5 @@ cd app npm install npm run dev ``` + +If you skip the build step above, the repository ships small placeholder modules so the app still builds, but Whisper will not run until you generate the real WASM binaries. diff --git a/app/public/wasm/whisper-web.js b/app/public/wasm/whisper-web.js new file mode 100644 index 0000000..05cf858 --- /dev/null +++ b/app/public/wasm/whisper-web.js @@ -0,0 +1,10 @@ +// Placeholder Whisper WASM factory used when the real bundle is not built. +// Run ./scripts/build-wasm.sh to generate the optimized version. +export default async function whisperFactory() { + console.warn('Using placeholder Whisper WASM bundle. Run ./scripts/build-wasm.sh to build the real binary.'); + return { + FS_writeFile: () => { + // no-op placeholder + } + }; +} diff --git a/app/public/wasm/whisper-web.single.js b/app/public/wasm/whisper-web.single.js new file mode 100644 index 0000000..aa53cc1 --- /dev/null +++ b/app/public/wasm/whisper-web.single.js @@ -0,0 +1,3 @@ +// Placeholder single-threaded Whisper WASM factory. +import whisperFactory from './whisper-web.js'; +export default whisperFactory;