Error with AI Workers

Hi All!.

I got this error in Ai Workers when i trying to use the openai/Whisper worker.

Command: curl -X POST -H "Authorization: Bearer TOKEN" --data-binary @audio.mp3

{"errors":[{"message":"TypeError: Cannot read properties of undefined (reading 'value')","code":1000}],"success":false,"result":{},"messages":[]}

If i change the format to .wav i got other error:
{"errors":[{"message":"InferenceUpstreamError: ERROR 3010: Invalid or incomplete input for the model","code":1000}],"success":false,"result":{},"messages":[]}

Anyone can transcribe an audio correctly??


1 Like

You will need the following:

TOKEN='abcdefghijk...'${ACCOUNT_ID}/ai/run/@cf/openai/whisper -X POST -H "Authorization: Bearer ${TOKEN}" --data-binary @audio.mp3

You can find your TOKEN via the Cloudflare dashboard (search for token creation). You can find your ACCOUNT_ID (a 32 character long hex number) via the dashboard and/or via a simple curl for endpoint.