From ebcd42c8ebcf90f80c69d89be00c246efdb45836 Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Tue, 16 Dec 2025 10:40:42 +0200 Subject: [PATCH] Fix for speaker identification crash (#1315) --- buzz/locale/ca_ES/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/da_DK/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/de_DE/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/en_US/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/es_ES/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/it_IT/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/ja_JP/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/lv_LV/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/nl/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/pl_PL/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/pt_BR/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/uk_UA/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/zh_CN/LC_MESSAGES/buzz.po | 44 +-- buzz/locale/zh_TW/LC_MESSAGES/buzz.po | 44 +-- .../speaker_identification_widget.py | 353 ++++++++++++------ 15 files changed, 541 insertions(+), 428 deletions(-) diff --git a/buzz/locale/ca_ES/LC_MESSAGES/buzz.po b/buzz/locale/ca_ES/LC_MESSAGES/buzz.po index bf7db49b..e3c3ba24 100644 --- a/buzz/locale/ca_ES/LC_MESSAGES/buzz.po +++ b/buzz/locale/ca_ES/LC_MESSAGES/buzz.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: buzz\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2025-10-17 07:59+0200\n" "Last-Translator: Éric Duarte \n" "Language-Team: Catalan \n" @@ -760,73 +760,73 @@ msgstr "Divideix per la longitud màxima" msgid "Merge" msgstr "Fusiona" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "Cancel·la la transcripció" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "Desa el fitxer" diff --git a/buzz/locale/da_DK/LC_MESSAGES/buzz.po b/buzz/locale/da_DK/LC_MESSAGES/buzz.po index 8deb97db..08302e50 100644 --- a/buzz/locale/da_DK/LC_MESSAGES/buzz.po +++ b/buzz/locale/da_DK/LC_MESSAGES/buzz.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: \n" "Last-Translator: Ole Guldberg2 \n" "Language-Team: \n" @@ -754,73 +754,73 @@ msgstr "Split ved max længde" msgid "Merge" msgstr "Sammenflet" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "Afbryd transkription" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "Gem fil" diff --git a/buzz/locale/de_DE/LC_MESSAGES/buzz.po b/buzz/locale/de_DE/LC_MESSAGES/buzz.po index 0352e5f9..eb751acc 100644 --- a/buzz/locale/de_DE/LC_MESSAGES/buzz.po +++ b/buzz/locale/de_DE/LC_MESSAGES/buzz.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2025-03-05 14:41+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -755,73 +755,73 @@ msgstr "Aufgeteilt nach maximaler Länge" msgid "Merge" msgstr "Vereinigen" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "Transkription abbrechen" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "Datei speichern" diff --git a/buzz/locale/en_US/LC_MESSAGES/buzz.po b/buzz/locale/en_US/LC_MESSAGES/buzz.po index 64d9ac70..e604ee25 100644 --- a/buzz/locale/en_US/LC_MESSAGES/buzz.po +++ b/buzz/locale/en_US/LC_MESSAGES/buzz.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -738,72 +738,72 @@ msgstr "" msgid "Merge" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 msgid "5/8 Preparing transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 msgid "Save" msgstr "" diff --git a/buzz/locale/es_ES/LC_MESSAGES/buzz.po b/buzz/locale/es_ES/LC_MESSAGES/buzz.po index 2f039908..69fd2c3a 100644 --- a/buzz/locale/es_ES/LC_MESSAGES/buzz.po +++ b/buzz/locale/es_ES/LC_MESSAGES/buzz.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2025-09-08 12:43+0200\n" "Last-Translator: Éric Duarte \n" "Language-Team: \n" @@ -801,75 +801,75 @@ msgstr "Dividido por la longitud máxima" msgid "Merge" msgstr "Fusión" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" # automatic translation -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "Cancelar transcripción" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" # automatic translation -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "Guardar archivo" diff --git a/buzz/locale/it_IT/LC_MESSAGES/buzz.po b/buzz/locale/it_IT/LC_MESSAGES/buzz.po index 7fd50c46..53f6279e 100644 --- a/buzz/locale/it_IT/LC_MESSAGES/buzz.po +++ b/buzz/locale/it_IT/LC_MESSAGES/buzz.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: buzz\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2025-11-09 20:22+0200\n" "Language-Team: (Italiano) Albano Battistella \n" "Language: it_IT\n" @@ -763,73 +763,73 @@ msgstr "Diviso per lunghezza massima" msgid "Merge" msgstr "Unione" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "Inizio trascrizione..." -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "Salva file" diff --git a/buzz/locale/ja_JP/LC_MESSAGES/buzz.po b/buzz/locale/ja_JP/LC_MESSAGES/buzz.po index f2bb2f90..a683e72b 100644 --- a/buzz/locale/ja_JP/LC_MESSAGES/buzz.po +++ b/buzz/locale/ja_JP/LC_MESSAGES/buzz.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: \n" "Last-Translator: nunawa <71294849+nunawa@users.noreply.github.com>\n" "Language-Team: \n" @@ -751,73 +751,73 @@ msgstr "" msgid "Merge" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "文字起こしをキャンセルする" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "ファイルを保存" diff --git a/buzz/locale/lv_LV/LC_MESSAGES/buzz.po b/buzz/locale/lv_LV/LC_MESSAGES/buzz.po index 339e8152..1d126d07 100644 --- a/buzz/locale/lv_LV/LC_MESSAGES/buzz.po +++ b/buzz/locale/lv_LV/LC_MESSAGES/buzz.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2025-12-13 10:52+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -758,72 +758,72 @@ msgstr "Dalīt pie maksimālā garuma" msgid "Merge" msgstr "Apvienot" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "1/8 Apkopo transkripcijas" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "2/8 Ielādē audio" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "3/8 Ielādē identifikācijas modeli" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "4/8 Apstrādā audio" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 msgid "5/8 Preparing transcripts" msgstr "5/8 Sagatavo transkripcijas" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "6/8 Nosaka runātājus" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "0/0 Kļūda nosakot runātājus" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "7/8 Marķē runātāju teikumus" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "8/8 Runātāju noteikšana pabeigta" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "0/0 Kļūda nosakot runātājus" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "1. solis: Runātāju noteikšana" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "Noteikt" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "Gatavs noteikt runātājus" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "Audio datne nav atrasta" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "2. solis: Runātāju identifikācija" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "Atskaņot paraugu" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "Apvienot secīgus runātāja teikumus" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 msgid "Save" msgstr "Saglabāt" diff --git a/buzz/locale/nl/LC_MESSAGES/buzz.po b/buzz/locale/nl/LC_MESSAGES/buzz.po index a7b4d2f0..eb8dfa6f 100644 --- a/buzz/locale/nl/LC_MESSAGES/buzz.po +++ b/buzz/locale/nl/LC_MESSAGES/buzz.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2025-03-20 18:30+0100\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: none\n" @@ -755,73 +755,73 @@ msgstr "Splitsen op basis van max. lengte" msgid "Merge" msgstr "Samenvoegen" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "Transcriptie wissen" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "Bestand opslaan" diff --git a/buzz/locale/pl_PL/LC_MESSAGES/buzz.po b/buzz/locale/pl_PL/LC_MESSAGES/buzz.po index a1e36157..fb8bb348 100644 --- a/buzz/locale/pl_PL/LC_MESSAGES/buzz.po +++ b/buzz/locale/pl_PL/LC_MESSAGES/buzz.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2024-03-17 20:50+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -763,73 +763,73 @@ msgstr "" msgid "Merge" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "Anuluj transkrypcję" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "Zapisz plik" diff --git a/buzz/locale/pt_BR/LC_MESSAGES/buzz.po b/buzz/locale/pt_BR/LC_MESSAGES/buzz.po index 129dca1d..30772b58 100644 --- a/buzz/locale/pt_BR/LC_MESSAGES/buzz.po +++ b/buzz/locale/pt_BR/LC_MESSAGES/buzz.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Buzz\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2025-11-01 17:43-0300\n" "Last-Translator: Paulo Schopf \n" "Language-Team: none\n" @@ -758,73 +758,73 @@ msgstr "Dividir por tamanho máximo" msgid "Merge" msgstr "Mesclar" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "Iniciando transcrição..." -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "Salvar Arquivo" diff --git a/buzz/locale/uk_UA/LC_MESSAGES/buzz.po b/buzz/locale/uk_UA/LC_MESSAGES/buzz.po index 3472eed8..39a56d0b 100644 --- a/buzz/locale/uk_UA/LC_MESSAGES/buzz.po +++ b/buzz/locale/uk_UA/LC_MESSAGES/buzz.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: \n" "Last-Translator: Yevhen Popok \n" "Language-Team: \n" @@ -752,73 +752,73 @@ msgstr "" msgid "Merge" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "Скасувати транскрипцію" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "Зберегти файл" diff --git a/buzz/locale/zh_CN/LC_MESSAGES/buzz.po b/buzz/locale/zh_CN/LC_MESSAGES/buzz.po index a416096c..4e71c3f0 100644 --- a/buzz/locale/zh_CN/LC_MESSAGES/buzz.po +++ b/buzz/locale/zh_CN/LC_MESSAGES/buzz.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2023-05-01 15:45+0800\n" "Last-Translator: \n" "Language-Team: lamb \n" @@ -765,73 +765,73 @@ msgstr "按最大长度拆分" msgid "Merge" msgstr "合并" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "取消识别" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "保存文件" diff --git a/buzz/locale/zh_TW/LC_MESSAGES/buzz.po b/buzz/locale/zh_TW/LC_MESSAGES/buzz.po index a5a5d39d..beb2e501 100644 --- a/buzz/locale/zh_TW/LC_MESSAGES/buzz.po +++ b/buzz/locale/zh_TW/LC_MESSAGES/buzz.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-13 10:51+0200\n" +"POT-Creation-Date: 2025-12-16 08:58+0200\n" "PO-Revision-Date: 2023-05-01 15:45+0800\n" "Last-Translator: \n" "Language-Team: Lamb\n" @@ -759,73 +759,73 @@ msgstr "" msgid "Merge" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:92 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:103 msgid "1/8 Collecting transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:106 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:125 msgid "2/8 Loading audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:115 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:140 msgid "3/8 Loading alignment model" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:121 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:150 msgid "4/8 Processing audio" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:133 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:168 #, fuzzy msgid "5/8 Preparing transcripts" msgstr "取消錄製" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:151 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:190 msgid "6/8 Identifying speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:167 -msgid "0/0 Error identifying speakers" -msgstr "" - -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:175 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:217 msgid "7/8 Mapping speakers to transcripts" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:214 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:257 msgid "8/8 Identification done" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:251 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:262 +msgid "0/0 Error identifying speakers" +msgstr "" + +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:316 msgid "Step 1: Identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:263 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 msgid "Identify" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:272 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:337 msgid "Ready to identify speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:274 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:339 msgid "Audio file not found" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:298 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:363 msgid "Step 2: Name speakers" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:313 -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:406 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:378 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:493 msgid "Play sample" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:328 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:393 msgid "Merge speaker sentences" msgstr "" -#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:333 +#: buzz/widgets/transcription_viewer/speaker_identification_widget.py:398 #, fuzzy msgid "Save" msgstr "檔案" diff --git a/buzz/widgets/transcription_viewer/speaker_identification_widget.py b/buzz/widgets/transcription_viewer/speaker_identification_widget.py index 97bdce3d..3fba2c10 100644 --- a/buzz/widgets/transcription_viewer/speaker_identification_widget.py +++ b/buzz/widgets/transcription_viewer/speaker_identification_widget.py @@ -53,11 +53,17 @@ SENTENCE_END = re.compile(r'.*[.!?。!?]') class IdentificationWorker(QObject): finished = pyqtSignal(list) progress_update = pyqtSignal(str) + error = pyqtSignal(str) def __init__(self, transcription, transcription_service): super().__init__() self.transcription = transcription self.transcription_service = transcription_service + self._is_cancelled = False + + def cancel(self): + """Request cancellation of the worker.""" + self._is_cancelled = True def get_transcript(self, audio, **kwargs) -> dict: buzz_segments = self.transcription_service.get_transcription_segments( @@ -89,130 +95,189 @@ class IdentificationWorker(QObject): } def run(self): - self.progress_update.emit(_("1/8 Collecting transcripts")) - - # Step 1 - Get transcript - # TODO - Add detected language to the transcript, detect and store separately in metadata - # Will also be relevant for template parsing of transcript file names - # - See diarize.py for example on how to get this info from whisper transcript, maybe other whisper models also have it - language = self.transcription.language if self.transcription.language else "en" - - segments = self.transcription_service.get_transcription_segments( - transcription_id=self.transcription.id_as_uuid - ) - - full_transcript = "".join(segment.text for segment in segments) - - self.progress_update.emit(_("2/8 Loading audio")) - audio_waveform = faster_whisper.decode_audio(self.transcription.file) - - # Step 2 - Forced alignment - force_cpu = os.getenv("BUZZ_FORCE_CPU", "false") - use_cuda = torch.cuda.is_available() and force_cpu == "false" - device = "cuda" if use_cuda else "cpu" - torch_dtype = torch.float16 if use_cuda else torch.float32 - - self.progress_update.emit(_("3/8 Loading alignment model")) - alignment_model, alignment_tokenizer = load_alignment_model( - device, - dtype=torch_dtype, - ) - - self.progress_update.emit(_("4/8 Processing audio")) - emissions, stride = generate_emissions( - alignment_model, - torch.from_numpy(audio_waveform) - .to(alignment_model.dtype) - .to(alignment_model.device), - batch_size=8, - ) - - del alignment_model - torch.cuda.empty_cache() - - self.progress_update.emit(_("5/8 Preparing transcripts")) - tokens_starred, text_starred = preprocess_text( - full_transcript, - romanize=True, - language=langs_to_iso[language], - ) - - segments, scores, blank_token = get_alignments( - emissions, - tokens_starred, - alignment_tokenizer, - ) - - spans = get_spans(tokens_starred, segments, blank_token) - - word_timestamps = postprocess_results(text_starred, spans, stride, scores) - - # Step 3 - Diarization - self.progress_update.emit(_("6/8 Identifying speakers")) - - # Silence NeMo's verbose logging - logging.getLogger("nemo_logging").setLevel(logging.ERROR) - try: - # Also try to silence NeMo's internal logging system - from nemo.utils import logging as nemo_logging - nemo_logging.setLevel(logging.ERROR) - except (ImportError, AttributeError): - pass + diarizer_model = None + alignment_model = None try: - diarizer_model = MSDDDiarizer(device) - speaker_ts = diarizer_model.diarize(torch.from_numpy(audio_waveform).unsqueeze(0)) + logging.debug("Speaker identification worker: Starting") + self.progress_update.emit(_("1/8 Collecting transcripts")) - except Exception as e: - self.progress_update.emit(_("0/0 Error identifying speakers")) - logging.error(f"Error during diarization: {e}") - return - finally: - del diarizer_model - torch.cuda.empty_cache() + if self._is_cancelled: + logging.debug("Speaker identification worker: Cancelled at step 1") + return - # Step 4 - Reading timestamps <> Speaker Labels mapping - self.progress_update.emit(_("7/8 Mapping speakers to transcripts")) + # Step 1 - Get transcript + # TODO - Add detected language to the transcript, detect and store separately in metadata + # Will also be relevant for template parsing of transcript file names + # - See diarize.py for example on how to get this info from whisper transcript, maybe other whisper models also have it + language = self.transcription.language if self.transcription.language else "en" - wsm = get_words_speaker_mapping(word_timestamps, speaker_ts, "start") - - if language in punct_model_langs: - # restoring punctuation in the transcript to help realign the sentences - punct_model = PunctuationModel(model="kredor/punctuate-all") - - words_list = list(map(lambda x: x["word"], wsm)) - - labled_words = punct_model.predict(words_list, chunk_size=230) - - ending_puncts = ".?!。!?" - model_puncts = ".,;:!?。!?" - - # We don't want to punctuate U.S.A. with a period. Right? - is_acronym = lambda x: re.fullmatch(r"\b(?:[a-zA-Z]\.){2,}", x) - - for word_dict, labeled_tuple in zip(wsm, labled_words): - word = word_dict["word"] - if ( - word - and labeled_tuple[1] in ending_puncts - and (word[-1] not in model_puncts or is_acronym(word)) - ): - word += labeled_tuple[1] - if word.endswith(".."): - word = word.rstrip(".") - word_dict["word"] = word - - else: - logging.warning( - f"Punctuation restoration is not available for {language} language." - " Using the original punctuation." + segments = self.transcription_service.get_transcription_segments( + transcription_id=self.transcription.id_as_uuid ) - wsm = get_realigned_ws_mapping_with_punctuation(wsm) - ssm = get_sentences_speaker_mapping(wsm, speaker_ts) + full_transcript = "".join(segment.text for segment in segments) - self.progress_update.emit(_("8/8 Identification done")) - self.finished.emit(ssm) + if self._is_cancelled: + logging.debug("Speaker identification worker: Cancelled at step 2") + return + + self.progress_update.emit(_("2/8 Loading audio")) + audio_waveform = faster_whisper.decode_audio(self.transcription.file) + + # Step 2 - Forced alignment + force_cpu = os.getenv("BUZZ_FORCE_CPU", "false") + use_cuda = torch.cuda.is_available() and force_cpu == "false" + device = "cuda" if use_cuda else "cpu" + torch_dtype = torch.float16 if use_cuda else torch.float32 + + logging.debug(f"Speaker identification worker: Using device={device}") + + if self._is_cancelled: + logging.debug("Speaker identification worker: Cancelled at step 3") + return + + self.progress_update.emit(_("3/8 Loading alignment model")) + alignment_model, alignment_tokenizer = load_alignment_model( + device, + dtype=torch_dtype, + ) + + if self._is_cancelled: + logging.debug("Speaker identification worker: Cancelled at step 4") + return + + self.progress_update.emit(_("4/8 Processing audio")) + emissions, stride = generate_emissions( + alignment_model, + torch.from_numpy(audio_waveform) + .to(alignment_model.dtype) + .to(alignment_model.device), + batch_size=8, + ) + + # Clean up alignment model + del alignment_model + alignment_model = None + torch.cuda.empty_cache() + + if self._is_cancelled: + logging.debug("Speaker identification worker: Cancelled at step 5") + return + + self.progress_update.emit(_("5/8 Preparing transcripts")) + tokens_starred, text_starred = preprocess_text( + full_transcript, + romanize=True, + language=langs_to_iso[language], + ) + + segments, scores, blank_token = get_alignments( + emissions, + tokens_starred, + alignment_tokenizer, + ) + + spans = get_spans(tokens_starred, segments, blank_token) + + word_timestamps = postprocess_results(text_starred, spans, stride, scores) + + if self._is_cancelled: + logging.debug("Speaker identification worker: Cancelled at step 6") + return + + # Step 3 - Diarization + self.progress_update.emit(_("6/8 Identifying speakers")) + + # Silence NeMo's verbose logging + logging.getLogger("nemo_logging").setLevel(logging.ERROR) + try: + # Also try to silence NeMo's internal logging system + from nemo.utils import logging as nemo_logging + nemo_logging.setLevel(logging.ERROR) + except (ImportError, AttributeError): + pass + + logging.debug("Speaker identification worker: Creating diarizer model") + diarizer_model = MSDDDiarizer(device) + logging.debug("Speaker identification worker: Running diarization") + speaker_ts = diarizer_model.diarize(torch.from_numpy(audio_waveform).unsqueeze(0)) + logging.debug("Speaker identification worker: Diarization complete") + + # Clean up diarizer model immediately after use + del diarizer_model + diarizer_model = None + torch.cuda.empty_cache() + + if self._is_cancelled: + logging.debug("Speaker identification worker: Cancelled at step 7") + return + + # Step 4 - Reading timestamps <> Speaker Labels mapping + self.progress_update.emit(_("7/8 Mapping speakers to transcripts")) + + wsm = get_words_speaker_mapping(word_timestamps, speaker_ts, "start") + + if language in punct_model_langs: + # restoring punctuation in the transcript to help realign the sentences + punct_model = PunctuationModel(model="kredor/punctuate-all") + + words_list = list(map(lambda x: x["word"], wsm)) + + labled_words = punct_model.predict(words_list, chunk_size=230) + + ending_puncts = ".?!。!?" + model_puncts = ".,;:!?。!?" + + # We don't want to punctuate U.S.A. with a period. Right? + is_acronym = lambda x: re.fullmatch(r"\b(?:[a-zA-Z]\.){2,}", x) + + for word_dict, labeled_tuple in zip(wsm, labled_words): + word = word_dict["word"] + if ( + word + and labeled_tuple[1] in ending_puncts + and (word[-1] not in model_puncts or is_acronym(word)) + ): + word += labeled_tuple[1] + if word.endswith(".."): + word = word.rstrip(".") + word_dict["word"] = word + + else: + logging.warning( + f"Punctuation restoration is not available for {language} language." + " Using the original punctuation." + ) + + wsm = get_realigned_ws_mapping_with_punctuation(wsm) + ssm = get_sentences_speaker_mapping(wsm, speaker_ts) + + logging.debug("Speaker identification worker: Finished successfully") + self.progress_update.emit(_("8/8 Identification done")) + self.finished.emit(ssm) + + except Exception as e: + logging.error(f"Speaker identification worker: Error - {e}", exc_info=True) + self.progress_update.emit(_("0/0 Error identifying speakers")) + self.error.emit(str(e)) + # Emit empty list so the UI can reset properly + self.finished.emit([]) + + finally: + # Ensure cleanup happens regardless of how we exit + logging.debug("Speaker identification worker: Cleaning up resources") + if diarizer_model is not None: + try: + del diarizer_model + except Exception: + pass + if alignment_model is not None: + try: + del alignment_model + except Exception: + pass + torch.cuda.empty_cache() class SpeakerIdentificationWidget(QWidget): @@ -350,6 +415,11 @@ class SpeakerIdentificationWidget(QWidget): def on_identify_button_clicked(self): self.step_1_button.setEnabled(False) + # Clean up any existing thread before starting a new one + self._cleanup_thread() + + logging.debug("Speaker identification: Starting identification thread") + self.thread = QThread() self.worker = IdentificationWorker( self.transcription, @@ -357,14 +427,26 @@ class SpeakerIdentificationWidget(QWidget): ) self.worker.moveToThread(self.thread) self.thread.started.connect(self.worker.run) - self.worker.finished.connect(self.thread.quit) - self.worker.finished.connect(self.worker.deleteLater) - self.thread.finished.connect(self.thread.deleteLater) - self.worker.finished.connect(self.on_identification_finished) + self.worker.finished.connect(self._on_thread_finished) self.worker.progress_update.connect(self.on_progress_update) + self.worker.error.connect(self.on_identification_error) self.thread.start() + def _on_thread_finished(self, result): + """Handle thread completion and cleanup.""" + logging.debug("Speaker identification: Thread finished") + if self.thread is not None: + self.thread.quit() + self.thread.wait(5000) + self.on_identification_finished(result) + + def on_identification_error(self, error_message): + """Handle identification error.""" + logging.error(f"Speaker identification error: {error_message}") + self.step_1_button.setEnabled(True) + self.progress_bar.setValue(0) + def on_progress_update(self, progress): self.progress_label.setText(progress) @@ -383,6 +465,11 @@ class SpeakerIdentificationWidget(QWidget): def on_identification_finished(self, result): self.identification_result = result + # Handle empty results (error case) + if not result: + logging.debug("Speaker identification: Empty result received") + return + unique_speakers = {entry['speaker'] for entry in result} while self.speaker_preview_row.count(): @@ -526,4 +613,30 @@ class SpeakerIdentificationWidget(QWidget): def closeEvent(self, event): self.hide() + # Stop media player + self.player.stop() + if self.player_timer: + self.player_timer.stop() + + # Clean up thread if running + self._cleanup_thread() + super().closeEvent(event) + + def _cleanup_thread(self): + """Properly clean up the worker thread.""" + if self.worker is not None: + # Request cancellation first + self.worker.cancel() + + if self.thread is not None and self.thread.isRunning(): + logging.debug("Speaker identification: Stopping running thread") + self.thread.quit() + if not self.thread.wait(10000): # Wait up to 10 seconds + logging.warning("Speaker identification: Thread did not quit, terminating") + self.thread.terminate() + if not self.thread.wait(2000): + logging.error("Speaker identification: Thread failed to terminate") + + self.thread = None + self.worker = None