Skip to content

🎥 Make videos programmatically with React

enable typescript

Jonny Burger81f6085123dc
diff --git a/packages/example/package.json b/packages/example/package.json
index 941d46e456..18c383ee81 100644
--- a/packages/example/package.json
+++ b/packages/example/package.json
@@ -64,6 +64,7 @@
"@remotion/three": "workspace:*",
"@remotion/transitions": "workspace:*",
"@remotion/media-parser": "workspace:*",
+ "@remotion/whisper-wasm": "workspace:*",
"@remotion/zod-types": "workspace:*",
"@shopify/react-native-skia": "1.6.0",
"@types/express": "^4.17.11",
diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsx
index 7fc22609e5..eb036a4fa6 100644
--- a/packages/example/src/Root.tsx
+++ b/packages/example/src/Root.tsx
@@ -1568,6 +1568,14 @@ export const Index: React.FC = () => {
durationInFrames={900}
/>
</Folder>
+ <Composition
+ id="whisper-wasm"
+ component={Empty}
+ width={1080}
+ height={1080}
+ fps={30}
+ durationInFrames={900}
+ />
<Composition
id="empty"
component={Empty}
diff --git a/packages/example/src/WhisperWasm/index.tsx b/packages/example/src/WhisperWasm/index.tsx
new file mode 100644
index 0000000000..30361038ad
--- /dev/null
+++ b/packages/example/src/WhisperWasm/index.tsx
@@ -0,0 +1,14 @@
+import {downloadWhisperModel} from '@remotion/whisper-wasm';
+import {useCallback} from 'react';
+
+export const WhisperWasm = () => {
+ const onClick = useCallback(() => {
+ downloadWhisperModel();
+ }, []);
+
+ return (
+ <div>
+ <button onClick={onClick}>Download</button>
+ </div>
+ );
+};
diff --git a/packages/whisper-wasm/tsconfig.json b/packages/whisper-wasm/tsconfig.json
index 6a5abc5aa1..c4db2c7b13 100644
--- a/packages/whisper-wasm/tsconfig.json
+++ b/packages/whisper-wasm/tsconfig.json
@@ -1,8 +1,9 @@
{
- "extends": "../tsconfig.settings.json",
- "compilerOptions": {
- "rootDir": "src",
- "outDir": "dist"
- },
- "include": ["src/index.ts", "src/main.ts"]
+ "extends": "../tsconfig.settings.json",
+ "compilerOptions": {
+ "rootDir": "src",
+ "outDir": "dist"
+ },
+ "include": ["src"],
+ "exclude": ["bundle.ts"]
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0137df3e2d..1d30beb043 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1058,6 +1058,9 @@ importers:
'@remotion/webcodecs':
specifier: workspace:*
version: link:../webcodecs
+ '@remotion/whisper-wasm':
+ specifier: workspace:*
+ version: link:../whisper-wasm
'@remotion/zod-types':
specifier: workspace:*
version: link:../zod-types