Skip to main content

Summarization

Using the VoiceAI platform, you can directly generate an abstractive summary of the transcript. This can be useful especially when the audios are very long. For example, summary of customer calls, meetings or legal proceedings can give context without the need for going through the whole transcript. Another use case could be generating descriptions for YouTube videos or for podcasts.

File Transcription Job with Summarization

Copy and paste the below curl request on your terminal to start a transcription using the API. Fill the variables with the appropriate values, as mentioned in the overview.

curl --location 'https://voice.neuralspace.ai/api/v1/jobs' \
--header 'Authorization: {{API_KEY}}' \
--form 'files=@"{{LOCAL_AUDIO_FILE_PATH}}"' \
--form 'config="{\"file_transcription\":{\"language_id\":\"{{LANG}}\", \"mode\":\"{{MODE}}\"},
\"summarize\":true}"'

In the above request, summarize is an extra configuration that is being passed. It also returns a response similar to the regular file transcription API as seen in overview.

{
"success": true,
"message": "Job created successfully",
"data": {
"jobId": "281f8662-cdc3-4c76-82d0-e7d14af52c46"
}
}

Fetch Transcription and Summarization Results

When you pass the jobId (received in response to the transcription API) to the API below, it fetches the status and results of the job.

info
  • If you have selected the translation feature while creating the job, you will also receive the translated summaries in all the mentioned target languages. These translated summaries are unavailable when translation is not enabled.
curl --location 'https://voice.neuralspace.ai/api/v1/jobs/{{jobId}}' \
--header 'Authorization: {{API_KEY}}'

The response of the request above appears as follows:

{
...
"data": {
...
"result": {
...
"transcription": {
...
"summary": "After hours of searching in the library, the speakers stumble upon an old book that reveals the location of a lost treasure in Lima, Peru. Excited, they plan their next adventure and head to the specified coordinates in Peru, hoping it won't be a waste of time."
},
...
"translation": {
"save_path": "uploads/trnslt-21f60760-8047-4e8e-be05-e19a15c8b939.json",
"hi": {
...
"summary": "पुस्तकालय में घंटों खोजने के बाद, वक्ताओं को एक पुरानी किताब मिलती है जो पेरू के लीमा में खोए हुए खजाने के स्थान का खुलासा करती है। उत्साहित होकर, वे अपने अगले साहसिक कार्य की योजना बनाते हैं और पेरू में निर्दिष्ट स्थानों पर जाते हैं, उम्मीद करते हैं कि यह समय की बर्बादी नहीं होगी।"
},
"ar": {
...
"summary": "بعد ساعات من البحث في المكتبة، يعثر المتحدثون على كتاب قديم يكشف عن مكان الكنز المفقود في ليما، البيرو. متحمسون، يخططون لمغامرتهم القادمة ويتوجهون إلى الإحداثيات المحددة في بيرو، على أمل ألا يكون ذلك مضيعة للوقت."
}
...
}
}
}

In the response above, the summary for the whole transcript is obtained. The summary for the translated transcript is also obtained like so if translation is enabled.

info
  • If you have selected the translation feature while creating the job, you will also receive the translated summaries in all the mentioned target languages. These translated summaries are unavailable when translation is not enabled.

Troubleshooting and FAQ

Not able to proceed? Check out our FAQ page. If you still need help, feel free to reach out to us directly at support@neuralspace.ai or join our Slack community.