Skip to content
OpenAI logo

whisper-tiny-en Beta

Automatic Speech RecognitionOpenAIHosted

Whisper is a pre-trained model for automatic speech recognition (ASR) and speech translation. Trained on 680k hours of labelled data, Whisper models demonstrate a strong ability to generalize to many datasets and domains without the need for fine-tuning. This is the English-only version of the Whisper Tiny model which was trained on the task of speech recognition.

Model Info
BetaYes

Usage

export interface Env {
AI: Ai;
}
export default {
async fetch(request, env): Promise<Response> {
const res = await fetch(
"https://github.com/Azure-Samples/cognitive-services-speech-sdk/raw/master/samples/cpp/windows/console/samples/enrollment_audio_katie.wav"
);
const blob = await res.arrayBuffer();
const input = {
audio: [...new Uint8Array(blob)],
};
const response = await env.AI.run(
"@cf/openai/whisper-tiny-en",
input
);
return Response.json({ input: { audio: [] }, response });
},
} satisfies ExportedHandler<Env>;

Parameters

Option 1
stringformat: binary

API Schemas

{
"oneOf": [
{
"type": "string",
"format": "binary"
},
{
"type": "object",
"properties": {
"audio": {
"type": "array",
"description": "An array of integers that represent the audio data constrained to 8-bit unsigned integer values",
"items": {
"type": "number",
"description": "A value between 0 and 255"
}
}
},
"required": [
"audio"
]
}
]
}