Skip to main content
POST
/
models
/
v2
/
facebook
/
data2vec-audio-base-960h
automatic-speech-recognition
curl --request POST \
  --url https://api.bytez.com/models/v2/facebook/data2vec-audio-base-960h \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://huggingface.co/datasets/huggingfacejs/tasks/resolve/main/audio-classification/audio.wav",
  "base64": "data:audio/wav;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"
}
'
{
  "error": "<string>",
  "output": "Down"
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for automatic-speech-recognition models

url
string
required
Example:

"https://huggingface.co/datasets/huggingfacejs/tasks/resolve/main/audio-classification/audio.wav"

base64
string
Example:

"data:audio/wav;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"

Response

Successful automatic-speech-recognition response.

error
string | null
required

Null on success; otherwise an error message.

output
string
required

Successful response with the textual translation of the audio

Example:

"Down"