Skip to main content

Getting started!

Get started with SpeechLytics Pre-recorded STT API

Get Authentication Token

To be able to upload file or get results, first you need to make request in order to receive Beared token. That token will be used for authentication for any other request made to our API.

curl -X POST "https://api.example.com/api/v1/auth/token" 
-H "Content-Type: application/json"
-d "{\"Username\":\"sample\",\"Password\":\"sample\"}"

Upload your file

If you’re working with audio files, you’ll need to upload it first using our POST api/v1/speech/process endpoint This endpoint processes audio data for speech analytics. It requires parameters such as the audio data in base64 format, filename, language, metadata, and options for priority and filename existence check.

curl -X POST "https://api.example.com/api/v1/speech/process" 
-H "Content-Type: application/json"
-d "{
"CheckFilenameExistence": "true",
"DataBase64": "sample",
"Filename": "sample",
"HasPriority": "true",
"Language": "Auto",
"Metadata": "sample"
}"

Example response:

{
"id": 123,
"status": "0 - Queued"
}

Once this request is executed, our API will transcribe the uploaded file, and based on account settings will execute Audio Inteligence processes like Summarization, Translation, NER, Sentiments.

You’ll get an instant response from the request with an id and current status - Queued. The id is your transcription ID that you will use to get your transcription result once it’s done.

Get the transcription result

You can get your transcription results in 3 different ways:

1. Pooling

Once you post your transcription request, you get a transcription id. To get the result with this method, you’ll just have to GET continuously until the status of your transcription is done.

You can get more information on the different transcriptions status by checking directly the API Reference.

2. Webhook

To be able to receive webhook, you can reach our team to setup your endpoint into account settings.

Once a transcription is done, a POST request will be made to the endpoint you configured. The request body is a JSON object containing the full transcription properties, including all audio inteligence post processings. For the full body definition, check our API definition.

3. Web Socket

To be able to use web socket connection, first you will need to request auth token using Auth endpoint and then to connect on the endpoint for websocket, on [/api/v1/calls/events]. Once connected on websocket, after transcription and all audio inteligence processes are done, we will send the result on the opened websocket.