For some reason I can't get Whisper to work. I've copied the documentation exactly, but it always gives the same error.
I'm working on this project in Node.js.
Here is my current code:
let transcript = openai.createTranscription({
file: fs.createReadStream(audioFile),
model: "whisper-1",
}).then(response=>{
console.log(`Response recieved! ${response.text}`);
});
Here is the error I keep getting. It's saying there is no model parameter, but it's clearly there in the code above (model: "whisper-1"):
C:\DiscordBots\BloomingBot\node_modules\openai\dist\common.js:39
throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
^
RequiredError: Required parameter model was null or undefined when calling createTranscription.
at exports.assertParamExists (C:\DiscordBots\BloomingBot\node_modules\openai\dist\common.js:39:15)
at Object.<anonymous> (C:\DiscordBots\BloomingBot\node_modules\openai\dist\api.js:561:22)
at Generator.next (<anonymous>)
at C:\DiscordBots\BloomingBot\node_modules\openai\dist\api.js:21:71
at new Promise (<anonymous>)
at __awaiter (C:\DiscordBots\BloomingBot\node_modules\openai\dist\api.js:17:12)
at Object.createTranscription (C:\DiscordBots\BloomingBot\node_modules\openai\dist\api.js:557:108)
at Object.<anonymous> (C:\DiscordBots\BloomingBot\node_modules\openai\dist\api.js:1211:75)
at Generator.next (<anonymous>)
at C:\DiscordBots\BloomingBot\node_modules\openai\dist\api.js:21:71 {
field: 'model'
}