Hi team.
I just have a problem.
I use whisper with typescript like this.
import { Configuration, OpenAIApi } from 'openai';
const maxMp3FileSize = 25 * 1024 * 1024;
const configuration = new Configuration({
organization: organization,
apiKey: apiKey,
baseOptions: {
maxBodyLength: maxMp3FileSize,
},
});
const openai = new OpenAIApi(configuration);
const filepath = "path to mp3 file."
const results = await openai.createTranscription(
fs.createReadStream(filepath) as any,
'whisper-1',
undefined,
'vtt',
undefined,
'ja',
{
maxBodyLength: maxMp3FileSize,
}
);
but result is
{
data: '"WEBVTT\\n\\n00:00:00.000 --> 00:00:20.000\\nご視聴ありがとうございました\\n\\n00:00:30.000 --> 00:00:40.000\\nご視聴ありがとうございました\\n\\n"'
}
The mp3 file is silent, I don’t say anything, but response has some text.
I want to recieve empty text, or don’t catch mistaken texts.
How do I solve this problem?
Please tell me it.
openai version is here.
"openai": "^3.3.0",
on the github discussion link
→ @github/openai/whisper/discussions/1731