ASR scripts for the Montague biography project
Main file is annotate.py
usage: python annotate.py [-h] [-i INPUT] [-s {asr-only,asr-first,drz-first,multitier}] [-n NUM_SPEAKERS] [-m ASR_MODEL] [-d DRZ_MODEL] [-D DEVICE] [-c CHUNK_LENGTH_S] [-w] [-r] [-b ASR_BATCH_SIZE]
optional arguments:
asr-first (default) will run Whisper first then
diarization with PyAnnote, and the PyAnnote diarization will be used to decide the speaker identityfor
each chunk output by Whisper. asr-only will run Whisper without performing speaker diarization.
drz-first will run diarization with PyAnnote first and then send each speaker turn to Whisper for
transcription. This will likely result in poor turn boundaries, so asr-first should generally be
preferred. multitier will output an .eaf file with Whisper annotations and PyAnnote speaker turns on
separate tiers, and is mostly useful for debugging and understanding the decisions that ASR and
diarization are making independently.cuda:0 if available else cpu.For each input .wav file, saves a .eaf and .txt file with annotations for that recording with the same path as the input file.
205 commits
Jupyter Notebook
98.9%
Python
1.1%
ASR scripts for the Montague biography project
Main file is annotate.py
usage: python annotate.py [-h] [-i INPUT] [-s {asr-only,asr-first,drz-first,multitier}] [-n NUM_SPEAKERS] [-m ASR_MODEL] [-d DRZ_MODEL] [-D DEVICE] [-c CHUNK_LENGTH_S] [-w] [-r] [-b ASR_BATCH_SIZE]
optional arguments:
asr-first (default) will run Whisper first then
diarization with PyAnnote, and the PyAnnote diarization will be used to decide the speaker identityfor
each chunk output by Whisper. asr-only will run Whisper without performing speaker diarization.
drz-first will run diarization with PyAnnote first and then send each speaker turn to Whisper for
transcription. This will likely result in poor turn boundaries, so asr-first should generally be
preferred. multitier will output an .eaf file with Whisper annotations and PyAnnote speaker turns on
separate tiers, and is mostly useful for debugging and understanding the decisions that ASR and
diarization are making independently.cuda:0 if available else cpu.For each input .wav file, saves a .eaf and .txt file with annotations for that recording with the same path as the input file.
205 commits
Jupyter Notebook
98.9%
Python
1.1%