Chapter 325: openAiWhisperApiToCaptions()
Core Idea
Turns the output from openai. audio.
Key Concepts
Code Examples
const openai = new OpenAI();
const transcription = await openai.audio.transcriptions.create({
file: fs.createReadStream('audio.mp3'),
model: 'whisper-1',
response_format: 'verbose_json',
prompt: 'Hello, welcome to my lecture.',
timestamp_granularities: ['word'],
});
const {captions} = openAiWhisperApiToCaptions({transcription});
- What it demonstrates: Usage pattern for openAiWhisperApiToCaptions() from the official docs.
Key Takeaways
- Understand see also when working with openAiWhisperApiToCaptions().
Connects To
- ai Saas Template: related page in the AI Tooling Integrations section.
- Bolt: related page in the AI Tooling Integrations section.
- Chatbot: related page in the AI Tooling Integrations section.