POST Audio API

The Async Audio API allows you to process an audio file.

It can be utilized for any use case where you have access to recorded audio and want to extract insights and other conversational attributes supported by Symbl's Conversation API.

Use this API to upload your file and generate a Conversation ID. If you want to append additional audio information to the same Conversation ID

HTTP REQUEST#

POST https://api.symbl.ai/v1/process/audio

Example API call#

The sample request accepts just the raw audio file from the data with the MIME typeset in the Content-Type Header. The audio file should only have Mono Channel.

# Wave file
curl --location --request POST 'https://api.symbl.ai/v1/process/audio?webhookUrl=<your_webhook_url>&entities= [{"customType": "Custom_Entity_Type", "text": "Custom Entity to be searched in transcript"}]' \
--header 'Content-Type: audio/wav' \
--header 'x-api-key: <generated_valid_token>' \
--data-binary '@/file/location/audio.wav'
# MP3 File
curl --location --request POST 'https://api.symbl.ai/v1/process/audio?webhookUrl=<your_webhook_url>&entities= [{"customType": "Custom_Entity_Type", "text": "Custom Entity to be searched in transcript"}]' \
--header 'Content-Type: audio/mpeg' \
--header 'x-api-key: <generated_valid_token>' \
--data-binary '@/file/location/audio.mp3'

Request Headers#

info

Content-Type: This field is optional.

If you're not sure about audio format, you can omit it since the API will automatically detect the content type. But when it's mentioned, audio format is validated.

Header NameRequiredValue
x-api-keyYesyour_auth_token
Content-LengthYesThis should correctly indicate the length of the request body in bytes.
Content-TypeNoThis is OPTIONAL field which describes the format and codec of the provided audio data. Accepted values are audio/wav, audio/mpeg, audio/mp3 and audio/wave only. If your audio is in formats other than don't use this field.

Query Params#

ParametersRequiredDescription
nameNoYour meeting name. Default name set to conversationId.
webhookUrlNoWebhook url on which job updates to be sent. This should be post API.
customVocabularyNoContains a list of words and phrases that provide hints to the speech recognition task.
entitiesNoInput custom entities which can be detected in your conversation using Entities' API. For example, check the sample code on right.
detectPhrasesNoAccepted values are true & false. It shows Actionable Phrases in each sentence of conversation. These sentences can be found in the Conversation's Messages API.
enableSeparateRecognitionPerChannelNoEnables Speaker Separated Channel audio processing. Accepts true or false.
channelMetadataNoThis object parameter contains two variables speaker and channel to specific which speaker corresponds to which channel. This object only works when enableSeparateRecognitionPerChannel query param is set to true.
languageCodeNoWe accept different languages. Please check language Code as per your requirement.

Webhook Payload#

WebhookUrl will be used to send the status of job created for uploaded audio. Every time the status of the job changes it will be notified on the WebhookUrl

FieldDescription
jobIdID to be used with Job API
statusCurrent status of the job. (Valid statuses - [ scheduled, in_progress, completed, failed ])

channelMetadata Object#

{
"channelMetadata": [
{
"channel": 1,
"speaker": {
"name": "Robert Bartheon",
"email": "robertbartheon@gmail.com"
}
},
{
"channel": 2,
"speaker": {
"name": "Arya Stark",
"email": "aryastark@gmail.com"
}
}
]
}

channelMetadata object has following members:

FieldDescription
channelThis denotes the channel number in the audio file. Each channel will contain independent speaker's voice data.
speakerThis is the wrapper object which defines the speaker for this channel.

speaker has the following members:

FieldDescription
nameName of the speaker.
emailEmail address of the speaker.
caution

Billing for a speaker separated channel audio file happens according to the number of channels present in the audio files. The duration for billing will be calculated according to the below formula:

totalDuration = duration_of_the_audio_file * total_number_of_channels

So if you send a 120-second file with 3 speaker separated channels, the total duration for billing would be 360 seconds or 6 minutes.

Response#

{
"conversationId": "5815170693595136",
"jobId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}

Response Object#

FieldDescription
conversationIdID to be used with Conversation API.
jobIdID to be used with Job API.

Response on reaching limit#

FieldDescription
Payload{ "message" : "This API has a limit of maximum of 5 number of concurrent jobs per account. If you are looking to scale, and need more concurrent jobs than this limit, please contact us at support@symbl.ai" }
Header{ "statusCode" : 429 }