Whisper is a pre-trained model for automatic speech recognition (ASR) and speech translation, trained on 680k hours of labelled data without the need for fine-tuning. It is a Transformer based encoder-decoder model, trained on either English-only or multilingual data, and is available in five configurations of varying model sizes. The models were trained on the tasks of speech recognition and speech translation, predicting transcriptions in the same or different languages as the audio.
Whisper is a pre-trained model for automatic speech recognition (ASR) and speech translation, trained on 680k hours of labelled data without the need for fine-tuning. It is a Transformer based encoder-decoder model, trained on either English-only or multilingual data, and is available in five configurations of varying model sizes. The models were trained on the tasks of speech recognition and speech translation, predicting transcriptions in the same or different languages as the audio.
You can use cURL or any other http client to run inferences:
curl -X POST \
-H "Authorization: bearer $DEEPINFRA_TOKEN" \
-F audio=@my_voice.mp3 \
'https://api.deepinfra.com/v1/inference/openai/whisper-small.en'
which will give you back something similar to:
{
"text": "",
"segments": [
{
"end": 1.0,
"id": 0,
"start": 0.0,
"text": "Hello"
},
{
"end": 5.0,
"id": 1,
"start": 4.0,
"text": "World"
}
],
"language": "en",
"input_length_ms": 0,
"words": [
{
"end": 1.0,
"start": 0.0,
"text": "Hello"
},
{
"end": 5.0,
"start": 4.0,
"text": "World"
}
],
"duration": 0.0,
"request_id": null,
"inference_status": {
"status": "unknown",
"runtime_ms": 0,
"cost": 0.0,
"tokens_generated": 0,
"tokens_input": 0
}
}
language
stringlanguage that the audio is in; uses detected language if None; use two letter language code (ISO 639-1) (e.g. en, de, ja)
Allowed values: af
am
ar
as
az
ba
be
bg
bn
bo
br
bs
ca
cs
cy
da
de
el
en
es
et
eu
fa
fi
fo
fr
gl
gu
ha
haw
he
hi
hr
ht
hu
hy
id
is
it
ja
jw
ka
kk
km
kn
ko
la
lb
ln
lo
lt
lv
mg
mi
mk
ml
mn
mr
ms
mt
my
ne
nl
nn
no
oc
pa
pl
ps
pt
ro
ru
sa
sd
si
sk
sl
sn
so
sq
sr
su
sv
sw
ta
te
tg
th
tk
tl
tr
tt
uk
ur
uz
vi
yi
yo
yue
zh
chunk_level
stringchunk level, either 'segment' or 'word'
Default value: "segment"
Allowed values: segment
word
chunk_length_s
integerchunk length in seconds to split audio
Default value: 30
Range: 1 ≤ chunk_length_s ≤ 30
webhook
fileThe webhook to call when inference is done, by default you will get the output in the response of your inference request