[SOLVED] Whisper translates into Welsh

Add this to your form data

formData.append("prompt", "This is an English sentence used to place me in an english space. Here is the upcoming audio, spoken by english reader George Washington")

You may want to also consider using the OpenAI library to handle the heavy lifting. Here’s an example using it:

const { Configuration, OpenAIApi } = require("openai");
const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);
const resp = await openai.createTranscription(
  fs.createReadStream("audio.mp3"),
  "whisper-1"
);
1 Like