When applying the , the transcription not only contains the text but also includes speaker labels, enhancing the overall structure and organization of the output.
speaker_labels
parameter in your request, and then find the results inside a field called utterances
.
upload_url
returned by the AssemblyAI API to create a JSON payload containing the audio_url
parameter and the speaker_labels
paramter set to True
.
POST
request to the AssemblyAI API endpoint with the payload and headers.
completed
, you can retrieve the transcript from the API response, using the utterances
key to access the results.
utterances
key of the response. Each utterance object in the list includes a speaker
field, which contains a string identifier for the speaker (e.g., “A”, “B”, etc.). The utterances list also contains a text
field for each utterance containing the spoken text, and confidence
scores both for utterances and their individual words.
speakers_expected
, that can be used to specify the expected number of speakers in an audio file.
API/Model Reference