InferenceUpstreamError: ERROR 3001: Unknown internal error

Hi guys, using the Whisper model I got this error: "Error processing request: InferenceUpstreamError: ERROR 3001: Unknown internal error" Also, this is my code using workers: import { Ai } from "@cloudflare/ai"; export interface Env { AI: any; } export default { async fetch(request: Request, env: Env) { try { if (request.method !== "POST") { console.error("Non-POST request received"); return new Response("Expected a POST request with audio data", { status: 400 }); } const audioData = await request.arrayBuffer(); if (!audioData) { console.error("No audio data found in request"); return new Response("No audio data found in request", { status: 400 }); } console.log(Received audio data: ${audioData.byteLength} bytes); const ai = new Ai(env.AI); const input = { audio: [...new Uint8Array(audioData)], }; console.log("Sending audio data to AI model for processing"); const response = await ai.run("@cf/openai/whisper", input); console.log("AI model processing completed"); return new Response(JSON.stringify({ transcript: response }), { headers: { 'Content-Type': 'application/json' }, }); } catch (error) { console.error("Error occurred in the worker:", error); // Additional logging for debugging if (error instanceof Error) { console.log("Error details:", error.message, error.name, error.stack); } else { console.log("Non-standard error object received"); } return new Response(Error processing request: ${error}, { status: 500 }); } } }
1 Reply
ImJustARobot
ImJustARobotOP•13mo ago
Also, this is the log from the terminal: Received audio data: 587277 bytes Sending audio data to AI model for processing Error occurred in the worker: InferenceUpstreamError: ERROR 3001: Unknown internal error at InferenceSession.run (file:///home/arce/ai-workers/whisper/.wrangler/tmp/dev-YIXMoJ/index.js:2953:13) at async Ai.run (file:///home/arce/ai-workers/whisper/.wrangler/tmp/dev-YIXMoJ/index.js:3021:28) at async Object.fetch (file:///home/arce/ai-workers/whisper/.wrangler/tmp/dev-YIXMoJ/index.js:3052:24) { name: InferenceUpstreamError, httpCode: 500, stack: InferenceUpstreamError: ERROR 3001: Unknown intern…hisper/.wrangler/tmp/dev-YIXMoJ/index.js:3052:24), message: ERROR 3001: Unknown internal error } Error details: ERROR 3001: Unknown internal error InferenceUpstreamError InferenceUpstreamError: ERROR 3001: Unknown internal error at InferenceSession.run (file:///home/arce/ai-workers/whisper/.wrangler/tmp/dev-YIXMoJ/index.js:2953:13) at async Ai.run (file:///home/arce/ai-workers/whisper/.wrangler/tmp/dev-YIXMoJ/index.js:3021:28) at async Object.fetch (file:///home/arce/ai-workers/whisper/.wrangler/tmp/dev-YIXMoJ/index.js:3052:24) 1:09:17 PM POST / 500 I used the same audio file from the example in your documentation guys =S ( https://github.com/Azure-Samples/cognitive-services-speech-sdk/raw/master/samples/cpp/windows/console/samples/enrollment_audio_katie.wav ) Thx in advance 🙏
Want results from more Discord servers?
Add your server