We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keep geeting this error while i run my code real-time-vad.ts:238 Encountered an error while loading model file https://cdn.jsdelivr.net/npm/@ricky0123/[email protected]/dist/silero_vad_v5.onnx
here's how i used it.
const vad = useMicVAD({ model: "v5", startOnLoad: true, onSpeechEnd: async (audio) => { // Prevent multiple simultaneous processing if (isProcessing) return; setIsProcessing(true); try { // Convert audio to base64 for storage or transmission if needed const wavBuffer = utils.encodeWAV(audio); const base64 = utils.arrayBufferToBase64(wavBuffer); const audioUrl = `data:audio/wav;base64,${base64}`; // Add audio to list for playback setAudioList((old) => [audioUrl, ...old]); // Convert audio blob for transcription const audioBlob = new Blob([wavBuffer], { type: "audio/wav" }); // Transcribe audio const transcription = await STTService.transcribeAudio(audioBlob); if (transcription) { // Process transcription with local AI model const response = await processWithLocalAI(transcription); // Synthesize speech response if (response) { await TTSService.synthesizeSpeech(response); } } } catch (error) { console.error("Voice assistant error:", error); } finally { setIsProcessing(false); } }, });
here is my webpack config
const CopyPlugin = require("copy-webpack-plugin"); module.exports = { entry: "./src/index.jsx", module: { rules: [ { test: /\.m?jsx?$/, exclude: /node_modules/, use: { loader: "babel-loader", options: { presets: [["@babel/preset-react"]], }, }, }, ], }, plugins: [ new CopyPlugin({ patterns: [ { from: "node_modules/@ricky0123/vad-web/dist/vad.worklet.bundle.min.js", to: "src/components/VoiceAssistant.js", }, { from: "node_modules/@ricky0123/vad-web/dist/*.onnx", to: "src/components/VoiceAssistant.js", }, { from: "node_modules/onnxruntime-web/dist/*.wasm", to: "src/components/VoiceAssistant.js", }, { from: "src/index.html", to: "[name][ext]" }, ], }), ], output: { clean: true, }, };
The text was updated successfully, but these errors were encountered:
me too
Sorry, something went wrong.
Hi, can you look in the network tab of browser dev tools and see where it is trying to load the vad from? Is it getting a 404?
No branches or pull requests
keep geeting this error while i run my code
real-time-vad.ts:238 Encountered an error while loading model file https://cdn.jsdelivr.net/npm/@ricky0123/[email protected]/dist/silero_vad_v5.onnx
here's how i used it.
here is my webpack config
The text was updated successfully, but these errors were encountered: