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 '{
  "audioList": [
    123
  ],
  "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 <api-key>'

Body

application/json
audioList
number[]

The audio list that contains the audio data as numbers of type float. Audio data should be of type WAV. You can not send this field and audioBase64 together!

Float numbers which represents the audio data.

audioBase64
string

The audio base64 string that contains the audio data. Audio data should be of type WAV. You can not send this field and audioList together!

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.