Skip to content

Commit

Permalink
Fix models not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ckoates committed Jul 3, 2024
1 parent 5b7e59b commit 7894e24
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
8 changes: 8 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ export default function Home() {
modelURL: "/silero_vad.onnx",
positiveSpeechThreshold: 0.7,
minSpeechFrames: 5,
ortConfig(ort) {
ort.env.wasm.wasmPaths = {
"ort-wasm-simd-threaded.wasm": "/ort-wasm-simd-threaded.wasm",
"ort-wasm-simd.wasm": "/ort-wasm-simd.wasm",
"ort-wasm.wasm": "/ort-wasm.wasm",
"ort-wasm-threaded.wasm": "/ort-wasm-threaded.wasm",
};
},
});

useHotkeys({
Expand Down
34 changes: 17 additions & 17 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ const nextConfig = {
experimental: {
after: true,
},
// async headers() {
// return [
// {
// source: "/(.*)",
// headers: [
// {
// key: "Cross-Origin-Opener-Policy",
// value: "same-origin",
// },
// {
// key: "Cross-Origin-Embedder-Policy",
// value: "require-corp",
// },
// ],
// },
// ];
// },
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
],
},
];
},
};

export default nextConfig;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbo",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
Expand Down

0 comments on commit 7894e24

Please sign in to comment.