Formatted transcript
Symbl.ai offers customizable transcription formatting via the conversations API create formatted transcript operation.
Once you have a conversation ID, you can generate a formatted transcript in Markdown or SubRip Subtitle (SRT) format. You can also refine the output using optional parameters for paragraphs, phrases, and speaker separation.
Follow these high-level steps create a formatted transcript:
- Process a conversation to get a conversation ID.
- Submit the conversation ID in a Create formatted transcript request.
Note that you can get a basic transcript of all messages in a conversation using the Get messages operation as described in Speech-to-text.
Authentication
This request requires an access token, as described in Authenticate.
Create formatted transcripts
This section describes how to create formatted transcripts from a conversation. You need a conversation ID from a previously processed conversation.
To get a formatted transcript, use the following operation:
POST https://api.symbl.ai/v1/conversations/{conversationId}/transcript
Try our interactive examples!
We provide interactive versions of these code samples: curl, Node.js, Python
To get started with our code samples, see Set Up Your Test Environment.
curl --request POST \
--url https://api.symbl.ai/v1/conversations/<CONVERSTION_ID>/transcript \
--header 'accept: application/json' \
--header 'authorization: <ACCESS_TOKEN>' \
--header 'content-type: application/json' \
--data '
{
"contentType": "<CONTENT_TYPE>"
}
'
import fetch from 'node-fetch';
const accessToken = '<ACCESS_TOKEN>';
const conversationId = '<CONVERSATION_ID>';
const contentType = '<CONTENT_TYPE>';
const fetchResponse = await fetch(`https://api.symbl.ai/v1/conversations/${conversationId}/transcript?contentType=${contentType}`, {
method: 'get',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
});
const responseBody = await fetchResponse.json();
console.log(JSON.stringify(responseBody, null, 2));
import json
import requests
access_token = "<ACCESS_TOKEN>"
conversation_id = "<CONVERSATION_ID>"
content_type = "<CONTENT_TYPE>"
headers = {
"Authorization": "Bearer " + access_token,
"Content-Type": "application/json"
}
response = requests.request(
method="GET",
url="https://api.symbl.ai/v1/conversations/" + conversation_id + "/transcript?contentType=" + content_type ,
headers=headers
)
print(json.dumps(response.json(), indent=2))
Where:
<ACCESS_TOKEN>
is a valid API access token.<CONVERSATION_ID>
is the ID of a conversation that you previously processed.<CONTENT_TYPE>
is the content type. Specify either Markdowntext/markdown
or SubRip Subtitle (SRT)text/srt
.
Note that these three parameters are required.
Optional request parameters
This request supports the following optional request parameters.
Parameter | Type | Description |
---|---|---|
createParagraphs | Boolean | Inserts paragraph breaks in the transcript. Such as <br><br> in Markdown and \n\n in SRT.If not included, the default value is false . |
highlightOnlyInsightKeyPhrases | Boolean | Highlights only the insight key phrases. If not included, the default value is false . |
highlightAllKeyPhrases | Boolean | Highlights all key phrases. If not included, the default value is false . |
showSpeakerSeparation | Boolean | Shows speaker separation in the transcript. Such as Speaker 1: , Speaker 2: and so on.If not included, the default value is false . |
Response
The following table describes the response body that is returned by this request. The request returns the conversation transcript, formatted according to the request parameters. The fields in the table appear in the individual message objects.
Field | Description |
---|---|
payload | The formatted transcript of the conversation. |
contentType | The content type, either Markdown text/markdown or SubRip Subtitle (SRT) text/srt . |
Example responses
{
"transcript": {
"payload": "This is your local internet service provider. How may I help you today? I installed your
internet service for my new home and its really slow. I can send it internet service technician to your
home whenever you're free. Could you let me know what time works for you? I will finish my work by 5 PM
so you could send a technician after that, okay? I just need to follow up with the technician first. I
will call you back in an hour to confirm your appointment. Okay. Thank you for calling. Thank you.",
"contentType": "text/markdown"
}
}
{
"transcript": {
"payload": "1\n00:00:00,000 --> 00:00:02,100\nThis is your local internet service provider.
\n\n2\n00:00:02,200 --> 00:00:03,300\nHow may I help you today?\n\n3\n00:00:04,300 --> 00:00:07,000\n
I installed your internet service for my new home and its really slow.\n\n4\n00:00:08,200 --> 00:00:11,500\n
I can send it internet service technician to your home whenever you're free.\n\n5\n00:00:11,700 -->
00:00:13,600\nCould you let me know what time works for you?\n\n6\n00:00:14,500 --> 00:00:19,900\n
I will finish my work by 5 PM so you could send a technician after that, okay?\n\n7\n00:00:20,100 -->
00:00:22,300\nI just need to follow up with the technician first.\n\n8\n00:00:22,500 --> 00:00:25,100\n
I will call you back in an hour to confirm your appointment.\n\n9\n00:00:25,900 --> 00:00:26,400\n
Okay.\n\n10\n00:00:27,400 --> 00:00:28,200\nThank you for calling.\n\n11\n00:00:28,700 --> 00:00:29,200\n
Thank you.",
"contentType": "text/srt"
}
}
Updated about 2 months ago