How to use [openai.whisper]

The reference page of openai.whisper has its arguments, constraints and declaration.

This slot transcribes audio by sending it to OpenAI’s audio transcription endpoint, using the whisper-1 model, and returns the transcribed text as its value. It takes the following arguments as children, and throws an exception if any of the three mandatory ones is missing, or if OpenAI responds with an error.

  • [key] - OpenAI API key. Mandatory.
  • [content] - The audio as raw bytes. Mandatory.
  • [type] - MIME type of the audio, such as audio/mpeg. Mandatory.
  • [language] - Optional language hint.