From 56d7406a317a2dc52075626b4810eeed71feaa39 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 23 Aug 2023 17:11:47 +0200 Subject: [PATCH] Add logging to diarization --- verbanote/process.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/verbanote/process.py b/verbanote/process.py index eb36eee..809aa16 100644 --- a/verbanote/process.py +++ b/verbanote/process.py @@ -20,15 +20,14 @@ class TxtTranscription: def diarize(audiofile: Path, pipeline: Pipeline, output_path: Path) -> Path: audiofile_prepended = _add_audio_silence(audiofile) + logging.info(f"Beginning diarization of {audiofile}...") DIARIZE_FILE = {"uri": "not-important", "audio": audiofile_prepended} dz = pipeline(DIARIZE_FILE) out_file = Path.joinpath(output_path, "diarization.txt") with open(out_file, "w") as text_file: text_file.write(str(dz)) - - print("Diarized:") - print(*list(dz.itertracks(yield_label=True))[:10], sep="\n") + logging.info(f"Created diarization in {out_file}.") return out_file