POST Audio URL

We're working to improve this content! :star:

The Async Audio URL API accepts a URL to an audio file of which you want to process.

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

🚧

URL Requirement

The URL provided must be a publicly available URL. Currently, we do not support any redirected links, shortened links (e.g. bit.ly), YouTube, Vimeo, or links from any audio/video platforms.

Authentication

Before using this API, you must generate your authentication token (AUTH_TOKEN). To learn how to get the authentication token, see the Authentication page.

API Endpoint

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

Example API Call

curl --location --request POST "https://api.symbl.ai/v1/process/audio/url" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $AUTH_TOKEN" \
--data-raw '{
  "url": "https://symbltestdata.s3.us-east-2.amazonaws.com/sample_audio_file.wav",
  "name": "Business Meeting",
  "confidenceThreshold": 0.6,
}'
const authToken = AUTH_TOKEN;

const payload = {
  // A valid url string. The URL must be a publicly accessible url.
  "url": "https://symbltestdata.s3.us-east-2.amazonaws.com/sample_audio_file.wav",

  // <Optional, string| your_conversation_name | Your meeting name. Default name set to conversationId.>
  "name": "Business Meeting",

  // <Optional, string| your_webhook_url| Webhook url on which job updates to be sent. (This should be post API)>
  // "webhookUrl": "https://yourdomain.com/jobs/callback",

  // <Optional, list| custom_vocabulary_list> |Contains a list of words and phrases that provide hints to the speech recognition task.
  // "customVocabulary": ["Platform", "Discussion", "Targets"],

  // <Optional, double| confidence_threshold | Minimum required confidence for the insight to be recognized.>
  "confidenceThreshold": 0.6,

  // <Optional, boolean| detect_phrases> |Accepted values are true & false. It shows Actionable Phrases in each sentence of conversation. These sentences can be found in the Conversation's Messages API.
  // "detectPhrases": true,

  // <Optional, boolean| enable_separate_recognition_per_channel> |Enables Speaker Separated Channel audio processing. Accepts true or false.
  // "enableSeparateRecognitionPerChannel": true,

  // <Optional, boolean| channel_metadata> |This 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.
  // "channelMetadata": [{"channel": 1, "speaker": {"name": "Robert Bartheon", "email": "robertbarth[email protected]"}}],

  // <Optional, boolean| language_code> |code of language of recording.
  // "languageCode": "en-US"
};

const responses = {
  400: 'Bad Request! Please refer docs for correct input fields.',
  401: 'Unauthorized. Please generate a new access token.',
  404: 'The conversation and/or it\'s metadata you asked could not be found, please check the input provided',
  429: 'Maximum number of concurrent jobs reached. Please wait for some requests to complete.',
  500: 'Something went wrong! Please contact [email protected]'
}

const fetchData = {
  method: "POST",
  headers: {
    'Authorization': `Bearer ${authToken}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(payload),
}

fetch("https://api.symbl.ai/v1/process/audio/url", fetchData).then(response => {
  if (response.ok) {
    return response.json();
  } else {
    throw new Error(responses[response.status]);
  }
}).then(response => {
  console.log('response', response);
}).catch(error => {
  console.error(error);
});
const request = require('request');
const authToken = AUTH_TOKEN;

const audioOption = {
  url: 'https://api.symbl.ai/v1/process/audio/url',
  headers: {
    'Authorization': `Bearer ${authToken}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    // A valid url string. The URL must be a publicly accessible url.
    "url": "https://symbltestdata.s3.us-east-2.amazonaws.com/sample_audio_file.wav",

    // <Optional, string| your_conversation_name | Your meeting name. Default name set to conversationId.>
    "name": "Business Meeting",

    // <Optional, string| your_webhook_url| Webhook url on which job updates to be sent. (This should be post API)>
    // "webhookUrl": "https://yourdomain.com/jobs/callback",

    // <Optional, list| custom_vocabulary_list> |Contains a list of words and phrases that provide hints to the speech recognition task.
    // "customVocabulary": ["Platform", "Discussion", "Targets"],

    // <Optional, double| confidence_threshold | Minimum required confidence for the insight to be recognized.>
    "confidenceThreshold": 0.6,

    // <Optional, boolean| detect_phrases> |Accepted values are true & false. It shows Actionable Phrases in each sentence of conversation. These sentences can be found in the Conversation's Messages API.
    // "detectPhrases": true,

    // <Optional, boolean| enable_separate_recognition_per_channel> |Enables Speaker Separated Channel audio processing. Accepts true or false.
    // "enableSeparateRecognitionPerChannel": true,

    // <Optional, boolean| channel_metadata> |This 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.
    // "channelMetadata": [{"channel": 1, "speaker": {"name": "Robert Bartheon", "email": "[email protected]"}}],

    // <Optional, boolean| language_code> |code of language of recording.
    // "languageCode": "en-US"
  })
};

const responses = {
  400: 'Bad Request! Please refer docs for correct input fields.',
  401: 'Unauthorized. Please generate a new access token.',
  404: 'The conversation and/or it\'s metadata you asked could not be found, please check the input provided',
  429: 'Maximum number of concurrent jobs reached. Please wait for some requests to complete.',
  500: 'Something went wrong! Please contact [email protected]'
}

request.post(audioOption, (error, response, body) => {
  const statusCode = response.statusCode;
  if (error || Object.keys(responses).indexOf(statusCode.toString()) !== -1) {
    throw new Error(responses[statusCode]);
  }
  console.log('Status code: ', statusCode);
  console.log('Body', response.body);
});
import json
import requests

url = "https://api.symbl.ai/v1/process/audio/url"

# set your access token here. See https://docs.symbl.ai/docs/developer-tools/authentication
access_token = 'your_access_token'

headers = {
    'Authorization': 'Bearer ' + access_token,
    'Content-Type': 'application/json'
}

payload = {
    'url': "https://symbltestdata.s3.us-east-2.amazonaws.com/sample_audio_file.wav",
    # A valid url string. The URL must be a publicly accessible url.

    'name': "Business Meeting",
    # <Optional, string| your_conversation_name | Your meeting name. Default name set to conversationId.>

    # 'webhookUrl': "https://yourdomain.com/jobs/callback",
    # <Optional, string| your_webhook_url| Webhook url on which job updates to be sent. (This should be post API)>

    # 'customVocabulary': ['Platform', 'Discussion', 'Targets'],
    # <Optional, list| custom_vocabulary_list> |Contains a list of words and phrases that provide hints to the speech recognition task.

    'confidenceThreshold': 0.6,
    # <Optional, double| confidence_threshold | Minimum required confidence for the insight to be recognized.>

    # 'detectPhrases': True,
    # <Optional, boolean| detect_phrases> |Accepted values are true & false. It shows Actionable Phrases in each sentence of conversation. These sentences can be found in the Conversation's Messages API.

    # 'enableSeparateRecognitionPerChannel': True,
    # <Optional, boolean| enable_separate_recognition_per_channel> |Enables Speaker Separated Channel audio processing. Accepts true or false.

    # 'channelMetadata': [{"channel": 1, "speaker": {"name": "Robert Bartheon", "email": "[email protected]"}}],
    # <Optional, boolean| channel_metadata> |This 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.

    # 'languageCode': "en-US"
    # <Optional, boolean| language_code> |code of language of recording.
}

responses = {
    400: 'Bad Request! Please refer docs for correct input fields.',
    401: 'Unauthorized. Please generate a new access token.',
    404: 'The conversation and/or it\'s metadata you asked could not be found, please check the input provided',
    429: 'Maximum number of concurrent jobs reached. Please wait for some requests to complete.',
    500: 'Something went wrong! Please contact [email protected]'
}

response = requests.request("POST", url, headers=headers, data=json.dumps(payload))

if response.status_code == 201:
    # Successful API execution
    print("conversationId => " + response.json()['conversationId'])  # ID to be used with Conversation API.
    print("jobId => " + response.json()['jobId'])  # ID to be used with Job API.
elif response.status_code in responses.keys():
    print(responses[response.status_code])  # Expected error occurred
else:
    print("Unexpected error occurred. Please contact [email protected]" + ", Debug Message => " + str(response.text))

exit()

Request Headers

Header NameRequiredDescription
AuthorizationYesBearer <token> The token you get from our authentication process.
Content-Type YesAccepted value: application/json
x-api-keyNoDEPRECATED. The JWT token you get from our authentication process.

Request Body

{
  "url": "https://symbltestdata.s3.us-east-2.amazonaws.com/sample_audio_file.wav",
  "customVocabulary": [
    "Platform",
    "Discussion",
    "Targets"
  ],
  "confidenceThreshold": 0.6,
  "detectPhrases": true,
  "name": "Business Meeting",
  "webhookUrl": "",
  "entities": [
    {
      "customType": "Company Executives",
      "value": "Marketing director",
      "text": "Marketing director"
    }
  ],
  "detectEntities": true,
  "languageCode": "en-US",
  "mode": "phone",
  "enableSeparateRecognitionPerChannel": true,
  "channelMetadata": [],
  "trackers": [
    {
      "name": "Promotion Mention",
      "vocabulary": [
        "We have a special promotion going on if you book this before",
        "I can offer you a discount of 10 20 percent you being a new customer for us",
        "We have our month special this month",
        "We have a sale right now on"
      ]
    }
  ]
}

Request Body Parameters

ParameterDescription
urlString, mandatory

A valid url string. The URL must be a publicly accessible url.

Example: "url": "https://symbltestdata.s3.us-east-2.amazonaws.com/sample_audio_file.wav"
customVocabularyString, optional

Contains a list of words and phrases that provide hints to the speech recognition task.

Example: "customVocabulary": "Platform", "Discussion"
confidenceThresholdDouble, optional

Minimum confidence score that you can set for an API to consider it as a valid insight (action items, follow-ups, topics, and questions). It should be in the range <=0.5 to <=1.0 (i.e., greater than or equal to 0.5 and less than or equal to 1.0.). The default value is 0.5.

Example: "confidenceThreshold": 0.6
detectPhrasesBoolean, optional

It shows Actionable Phrases in each sentence of conversation. These sentences can be found using the Conversation's Messages API. Default value is false.

Example: "detectPhrases": true
nameString, optional

Your meeting name. Default name set to conversationId.

Example: name: "Sales call", name: "Customer call".
webhookUrlString, optional

The URL where Symbl sends an HTTP request to your application when the job status is updated. This should be after making the API request. See the Webhook section for more.

Example: """jobId"": ""9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"", ""status"": ""in_progress"""
entitiesObject, optional

Input custom entities which can be detected in conversation using Entities API.

Example: "entities": "customType": "Company Executives", "value": "Marketing director", "text": "Marketing director"
detectEntitiesBoolean, optional

Default value is false. If not set the Entities API will not return any entities from the conversation.

Example: "detectEntities": true
languageCodeString, optional

We accept different languages. Please check language Code as per your requirement.

Example: "languageCode": "en-US"
modeString, optional

Accepts phone or default. phone mode is best for audio that is generated from phone call(which is typically recorded at 8khz sampling rate).
default mode works best for audio generated from video or online meetings(which is typically recorded at 16khz or more sampling rate).
When you don't pass this parameter default is selected automatically.

Example: "mode": "phone"
enableSeparateRecognitionPerChannelBoolean, optional

Enables Speaker Separated Channel audio processing. Accepts true or false.

Example: "enableSeparateRecognitionPerChannel": true
channelMetadataObject, optional

This object parameter contains two variables speaker and channel to specific which speaker corresponds to which channel. This object only works when enableSeparateRecognitionPerChannel is set to true. Learn more in the Channel Metadata section below.

Example: "channelMetadata": "channel": 1, "speaker": "name": "Robert Bartheon", "email": "[email protected]"
trackers BETA List, optional

A tracker entity containing name and vocabulary (a list of key words and/or phrases to be tracked). Read more in the Tracker API section.

Example: "trackers": "name": "Promotion Mention", "vocabulary": "We have a special promotion going on if you book this before"
enableAllTrackers BETA Boolean, optional

Default value is false. Setting this parameter to true will enable detection of all the Trackers maintained for your account by the Management API. This will allow Symbl to detect all the available Trackers in a specific Conversation. Learn about this parameter here.

Example: "enableAllTrackers": true
enableSummary ALPHA Boolean, optional

Setting this parameter to true allows you to generate Summaries using Summary API. Ensure that you use https://api.symbl.ai/ as the base URL.

Example: "enableSummary": true
enableSpeakerDiarizationBoolean, optional

Whether the diarization should be enabled for this conversation. Pass this as true to enable Speaker Separation. To learn more, refer to the Speaker Separation section below.

Example: "enableSeparateRecognitionPerChannel": true
diarizationSpeakerCountInteger, optional

The number of unique speakers in this conversation. To learn more, refer to the Speaker Separation section below.

Example: diarizationSpeakerCount=$NUMBER_OF_UNIQUE_SPEAKERS"

Channel Metadata

The channelMetadata object has the members channel and speaker.
Given below is an example of a channelMetadata object:

{
  "channelMetadata": [
    {
      "channel": 1,
      "speaker": {
        "name": "Robert Bartheon",
        "email": "[email protected]"
      }
    },
    {
      "channel": 2,
      "speaker": {
        "name": "Arya Stark",
        "email": "[email protected]"
      }
    }
  ]
}

channelMetadata object has following members:

FieldDescription
channelInteger, mandatory

This denotes the channel number in the audio file. Each channel will contain independent speaker's voice data.
speakerString, mandatory

This is the wrapper object which defines the speaker for this channel.

speaker has the following members:

FieldDescription
nameString, optional

Name of the speaker.
emailString, optional

Email address of the speaker.

Response

{
  "conversationId": "5815170693595136",
  "jobId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
FieldDescription
conversationIdID to be used with Conversation API.
jobIdID to be used with Job API.

Speaker Separation


The Async Audio & Async Video APIs can detect and separate unique speakers in a single stream of audio & video without the need for separate speaker events.

To enable this capability with either of the APIs the enableSpeakerDiarization and diarizationSpeakerCount query parameters need to be passed with the request. The diarizationSpeakerCount should be equal to the number of unique speakers in the conversation. If the number varies then this might introduce false positives in the diarized results.

👉 To learn how to implement Speaker Separation, see How to implement Speaker Separation page.

If you’re looking for similar capability in Real-Time APIs, refer to Active Speaker Events and Speaker Separation in WebSocket API sections.

🚧

Speaker Diarization Language Support

Currently, Speaker Diarization is available for English and Spanish languages only.

Billing for Speaker Separated Channels

The billing for a speaker separated channel audio file is 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.

Using Webhook


The webhookUrl will be used to send the status of job created for uploaded audio URL. Every time the status of the job changes it will be notified on the Webhook Url.

Code Example
{
  "jobId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "status": "in_progress"
}
FieldDescription
jobIdID to be used with Job API.
statusCurrent status of the job. (Valid statuses: [ scheduled, in_progress, completed, failed ])

API Limit Error


{
  "statusCode" : 429,
  "message" : "This API has a limit of maximum of `X` number of concurrent jobs per account. If you are looking to scale, and need more concurrent jobs than this limit, please contact us at [email protected]"
}

Here value of X can be found in FAQ.

❗️

You must wait for the job to complete processing before you proceed with getting the Conversation Intelligence. If you immediately make a GET request to Conversation API, it is possible that you'll receive incomplete insights. Therefore, ensure that you wait for the job to complete.