For the complete documentation index, see llms.txt. This page is also available as Markdown.

Improving Diarization by Prepending Audio from the Primary Speaker

When transcribing short audio files, enabling diarization can result in lower accuracy if there isn't enough audio data for the model to effectively differentiate between speakers. To mitigate this, consider prepending a 30 second clip of the primary speaker's voice before the start of the full audio you want transcribed.

By giving the diarization model a dedicated sample of the main speaker's voice first, it can use that as a reference point to more reliably identify that speaker throughout the rest of the audio. This short prepended clip allows the model to build a stable speaker profile and voice print for the primary speaker before having to jointly process all the other speakers.

Having this initial warm-up period focused on a single speaker makes the diarization task easier for shorter recordings. It provides an anchor point that the model can then use to parse out the other voices with greater accuracy. Prepending this 30 second voice clip will boost diarization performance, especially for audio under 3 minutes in length where speaker differentiation is more challenging with less data.

It is critical that the audio encoding of the prepended voice clip is in the same encoding as the rest of the audio. Combining audio in different formats/encoding will result in corrupt audio. Use a tool such as ffmpeg to convert the prerecorded audio to the correct format.

Finally, add ~3 seconds of silence to the prepended audio. This allows you to reliably remove all words in the first 33 seconds of the transcript (30 seconds of audio + 3 seconds of silence) and shift the timestamps of all words backwards by 33 seconds.

Last updated