Skip to main content
POST
/
v1
/
realtime
/
stt
Generates an speech to text transcription (not streamed).
curl --request POST \
  --url https://api.tryhamsa.com/v1/realtime/stt \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "audioBase64": "GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH ...",
  "language": "ar",
  "isEosEnabled": false,
  "eosThreshold": 0.3
}
'
{
  "text": "<string>"
}

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Body

application/json
audioBase64
string
required

The audio base64 string that contains the audio data. Audio data should be of type WAV.

Example:

"GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH ..."

language
enum<string>
default:ar
Available options:
ar,
en
isEosEnabled
boolean
default:false

Whether to enable End of Speech detection or not.

eosThreshold
number
default:0.3

The threshold value for End of Speech detection.

Response

Successful response

text
string

The generated text of the speech audio list.