cloudflare / cloudflare/workerd
🐛 Bug Report — Runtime APIs - Nova-3 model
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
We are trying to use nova-3 ASR in a Cloudflare Worker following the guide here:
https://developers.cloudflare.com/workers-ai/models/nova-3/
The API is producing 5006: Error: required properties at '/audio' are 'body,contentType' even though the object is provided as specified.
Whisper and Whisper 3 and working well, only nova-3 is causing issues.
Here is a sample of the code we are using, we have tried the pass the input as a Buffer and Stream and it generated the same error in both cases.
```
async function transcribeWithNova3(
c: Context<{ Bindings: Env; Variables: Variables }>,
model: STTModel,
audioBase64: string,
audioType?: string,
): Promise<{ text?: string; confidence?: number }> {
const buffer = Buffer.from(audioBase64, "base64");
const input = {
audio: {
body: buffer,
contentType: audioType || "audio/wav",
},
};
const rawResponse = await c.env.AI.run(model, input, {
returnRawResponse: true,
});
const novaResult = await rawResponse.json();
...
```
Contributor guide
Research direction
Start with the Cloudflare Workers AI nova-3 guide and the c.env.AI.run(model, input, ...) call shown in the report. Compare the nova-3 audio input contract with the working Whisper integrations and reproduce the 5006 response; done means the provided body and contentType are accepted without the required-properties error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100