Paragraphs
Paragraphs splits audio into paragraphs to improve transcript readability.
paragraphs
boolean Default: false
Try this feature out in our API Playground!
- When Paragraphs is enabled, Punctuation feature is enabled by default, and paragraphs are identified based on the transcript’s punctuation.
- When the Diarization feature is enabled and multiple speakers are present, paragraphs breaks are influenced by speaker changes.
- When the Multichannel feature is enabled, paragraphs breaks are influenced by channel changes.
Enable Feature
To enable Paragraphs, when you call Deepgram’s API, add a paragraphs
parameter in the query string and set it to true
:
paragraphs=true
To transcribe audio from a file on your computer, run the following cURL command in a terminal or your favorite API client.
Replace YOUR_DEEPGRAM_API_KEY
with your Deepgram API Key.
Analyze Response
In our terminal, we run the following cURL command:
Replace YOUR_DEEPGRAM_API_KEY
with your Deepgram API Key.
When the file is finished processing, you’ll receive a JSON response.
In this response, we see that each alternative now additionally contains:
paragraphs
: Object containing the information about paragraph divisions for the audio being processed.
And we see that each paragraphs
object contains:
-
transcript
: Transcript for the audio being processed, including line breaks where the transcript is divided into paragraphs. -
paragraphs
: Object containing sentences in the paragraph. Each nestedparagraphs
object contains:sentences
: Object containing each sentence in the paragraph, along with a count of the number of words in the paragraph, and the start and end times for each paragraph.num_words
: Count of the number of words in the paragraph.start
: Number of seconds into the audio stream that the paragraph starts.end
: Number of seconds into the audio stream that the paragraph ends.
Finally, we see that each sentence
object contains:
text
: Text contained in the sentence.start
: Number of seconds into the audio stream that the sentence starts.end
: Number of seconds into the audio stream that the sentence ends.