Speaker Diarization
The Speaker Diarization model lets you detect multiple speakers in an audio file and what each speaker said.
If you enable Speaker Diarization, the resulting transcript will return a list of utterances, where each utterance corresponds to an uninterrupted segment of speech from a single speaker.
Speaker Diarization and multichannel
Speaker Diarization doesn’t support multichannel transcription. Enabling both Speaker Diarization and multichannel will result in an error.
Quickstart
Python
TypeScript
Go
Java
C#
Ruby
Example output
Set number of speakers
Python
TypeScript
Go
Java
C#
Ruby
If you know the number of speakers in advance, you can improve the diarization performance by setting the speakers_expected
parameter.
The speakers_expected
parameter is ignored for audio files with a duration less than 2 minutes.
API reference
Request
Response
The response also includes the request parameters used to generate the transcript.
Frequently asked questions
How can I improve the performance of the Speaker Diarization model?
To improve the performance of the Speaker Diarization model, it’s recommended to ensure that each speaker speaks for at least 30 seconds uninterrupted. Avoiding scenarios where a person only speaks a few short phrases like “Yeah”, “Right”, or “Sounds good” can also help. If possible, avoiding cross-talking can also improve performance.
How many speakers can the model handle?
The upper limit on the number of speakers for Speaker Diarization is 10.
How accurate is the Speaker Diarization model?
The accuracy of the Speaker Diarization model depends on several factors, including the quality of the audio, the number of speakers, and the length of the audio file. Ensuring that each speaker speaks for at least 30 seconds uninterrupted and avoiding scenarios where a person only speaks a few short phrases can improve accuracy. However, it’s important to note that the model isn’t perfect and may make mistakes, especially in more challenging scenarios.
Troubleshooting
Why is the speaker diarization not performing as expected?
The speaker diarization may be performing poorly if a speaker only speaks once or infrequently throughout the audio file. Additionally, if the speaker speaks in short or single-word utterances, the model may struggle to create separate clusters for each speaker. Lastly, if the speakers sound similar, there may be difficulties in accurately identifying and separating them. Background noise, cross-talk, or an echo may also cause issues.