From 3869ac08dba98140cdac24531efbed4ac3af4e4d Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Fri, 27 Feb 2026 19:49:38 +0200 Subject: [PATCH] 1329 improve folder watch (#1402) --- Makefile | 18 ++-- buzz/locale/ca_ES/LC_MESSAGES/buzz.po | 47 +++++++--- buzz/locale/da_DK/LC_MESSAGES/buzz.po | 90 +++++++++++++++++-- buzz/locale/de_DE/LC_MESSAGES/buzz.po | 39 +++++--- buzz/locale/en_US/LC_MESSAGES/buzz.po | 10 +-- buzz/locale/es_ES/LC_MESSAGES/buzz.po | 41 ++++++--- buzz/locale/it_IT/LC_MESSAGES/buzz.po | 17 ++-- buzz/locale/ja_JP/LC_MESSAGES/buzz.po | 35 ++++---- buzz/locale/lv_LV/LC_MESSAGES/buzz.po | 15 ++-- buzz/locale/nl/LC_MESSAGES/buzz.po | 50 +++++++---- buzz/locale/pl_PL/LC_MESSAGES/buzz.po | 48 ++++++---- buzz/locale/pt_BR/LC_MESSAGES/buzz.po | 4 + buzz/locale/uk_UA/LC_MESSAGES/buzz.po | 38 +++++--- buzz/locale/zh_CN/LC_MESSAGES/buzz.po | 30 +++---- buzz/locale/zh_TW/LC_MESSAGES/buzz.po | 49 +++++----- buzz/transcriber/file_transcriber.py | 17 ++-- buzz/transcriber/transcriber.py | 1 + .../folder_watch_preferences_widget.py | 46 +++++++--- .../models/folder_watch_preferences.py | 5 ++ .../transcription_task_folder_watcher.py | 1 + snap/snapcraft.yaml | 8 +- .../whisper_file_transcriber_test.py | 36 ++++++++ .../folder_watch_preferences_widget_test.py | 43 +++++++++ .../transcription_task_folder_watcher_test.py | 70 +++++++++++++++ 24 files changed, 562 insertions(+), 196 deletions(-) diff --git a/Makefile b/Makefile index adaa5934..0888f589 100644 --- a/Makefile +++ b/Makefile @@ -188,20 +188,20 @@ gh_upgrade_pr: # Internationalization translation_po_all: - $(MAKE) translation_po locale=en_US $(MAKE) translation_po locale=ca_ES - $(MAKE) translation_po locale=es_ES - $(MAKE) translation_po locale=pl_PL - $(MAKE) translation_po locale=zh_CN - $(MAKE) translation_po locale=zh_TW - $(MAKE) translation_po locale=it_IT - $(MAKE) translation_po locale=lv_LV - $(MAKE) translation_po locale=uk_UA - $(MAKE) translation_po locale=ja_JP $(MAKE) translation_po locale=da_DK $(MAKE) translation_po locale=de_DE + $(MAKE) translation_po locale=en_US + $(MAKE) translation_po locale=es_ES + $(MAKE) translation_po locale=it_IT + $(MAKE) translation_po locale=ja_JP + $(MAKE) translation_po locale=lv_LV $(MAKE) translation_po locale=nl + $(MAKE) translation_po locale=pl_PL $(MAKE) translation_po locale=pt_BR + $(MAKE) translation_po locale=uk_UA + $(MAKE) translation_po locale=zh_CN + $(MAKE) translation_po locale=zh_TW TMP_POT_FILE_PATH := $(shell mktemp) PO_FILE_PATH := buzz/locale/${locale}/LC_MESSAGES/buzz.po diff --git a/buzz/locale/ca_ES/LC_MESSAGES/buzz.po b/buzz/locale/ca_ES/LC_MESSAGES/buzz.po index 2324331c..9e07929a 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: 2025-10-17 07:59+0200\n" "Last-Translator: Éric Duarte \n" "Language-Team: Catalan \n" @@ -184,7 +184,8 @@ msgid "" "in the Live Recording screen in a future version." msgstr "" "Nota: La configuració d'exportació d'enregistrament en directe es mourà a la " -"Configuració avançada a la pantalla d'enregistrament en directe en una versió futura." +"Configuració avançada a la pantalla d'enregistrament en directe en una " +"versió futura." #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Use 8-bit quantization to reduce memory usage" @@ -259,6 +260,10 @@ msgstr "" msgid "Enable folder watch" msgstr "Habilita el seguiment de carpetes" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Eliminar fitxers processats" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Carpeta d'entrada" @@ -623,11 +628,15 @@ msgstr "No s'ha pogut reiniciar la transcripció: {}" msgid "" "Could not restart transcription: model not available and could not be " "downloaded." -msgstr "No s'ha pogut reiniciar la transcripció: el model no està disponible i no s'ha pogut descarregar." +msgstr "" +"No s'ha pogut reiniciar la transcripció: el model no està disponible i no " +"s'ha pogut descarregar." #: buzz/widgets/transcription_tasks_table_widget.py msgid "Could not restart transcription: transcriber worker not found." -msgstr "No s'ha pogut reiniciar la transcripció: no s'ha trobat el treballador del transcriptor." +msgstr "" +"No s'ha pogut reiniciar la transcripció: no s'ha trobat el treballador del " +"transcriptor." #: buzz/widgets/recording_transcriber_widget.py msgid "Live Recording" @@ -896,7 +905,9 @@ msgstr "Longitud desitjada dels subtítols" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were disabled during transcription" -msgstr "Disponible només si els temps a nivell de paraula estaven desactivats durant la transcripció" +msgstr "" +"Disponible només si els temps a nivell de paraula estaven desactivats durant " +"la transcripció" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Merge Options" @@ -920,12 +931,16 @@ msgstr "Fusiona" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were enabled during transcription" -msgstr "Disponible només si els temps a nivell de paraula estaven activats durant la transcripció" +msgstr "" +"Disponible només si els temps a nivell de paraula estaven activats durant la " +"transcripció" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" "Speaker identification is not available: failed to load required libraries." -msgstr "La identificació de parlants no està disponible: no s'han pogut carregar les biblioteques necessàries." +msgstr "" +"La identificació de parlants no està disponible: no s'han pogut carregar les " +"biblioteques necessàries." #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "1/8 Collecting transcripts" @@ -941,13 +956,16 @@ msgstr "3/8 Carregant el model d'alineació" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "3/8 Loading alignment model (retrying with cache...)" -msgstr "3/8 Carregant el model d'alineació (tornant a intentar amb la memòria cau...)" +msgstr "" +"3/8 Carregant el model d'alineació (tornant a intentar amb la memòria cau...)" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" "Failed to load alignment model. Please check your internet connection and " "try again." -msgstr "No s'ha pogut carregar el model d'alineació. Comproveu la vostra connexió a Internet i torneu-ho a intentar." +msgstr "" +"No s'ha pogut carregar el model d'alineació. Comproveu la vostra connexió a " +"Internet i torneu-ho a intentar." #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "4/8 Processing audio" @@ -1551,15 +1569,16 @@ msgstr "Afegeix a sobre" msgid "Append and correct" msgstr "Afegeix i corregeix" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "Error de traducció, vegeu els registres!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " "to be downloaded." -msgstr "Ha fallat l'extracció de veu! Comproveu la vostra connexió a Internet — pot ser que s'hagi de descarregar un model." +msgstr "" +"Ha fallat l'extracció de veu! Comproveu la vostra connexió a Internet — pot " +"ser que s'hagi de descarregar un model." + +#~ msgid "Translation error, see logs!" +#~ msgstr "Error de traducció, vegeu els registres!" #~ msgid "Snap permission notice" #~ msgstr "Avís de permís d'ajust" diff --git a/buzz/locale/da_DK/LC_MESSAGES/buzz.po b/buzz/locale/da_DK/LC_MESSAGES/buzz.po index bd44d211..50fd489f 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: \n" "Last-Translator: Ole Guldberg2 \n" "Language-Team: \n" @@ -205,7 +205,9 @@ msgstr "Brug kun CPU og deaktiver GPU-acceleration" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Set this if larger models do not fit your GPU memory and Buzz crashes" -msgstr "Aktivér dette hvis større modeller ikke passer i GPU-hukommelsen og Buzz crasher" +msgstr "" +"Aktivér dette hvis større modeller ikke passer i GPU-hukommelsen og Buzz " +"crasher" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Disable GPU" @@ -254,6 +256,10 @@ msgstr "" msgid "Enable folder watch" msgstr "Aktiver mappeovervågning" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Slet behandlede filer" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Inputmappe" @@ -618,12 +624,13 @@ msgid "" "Could not restart transcription: model not available and could not be " "downloaded." msgstr "" -"Kunne ikke genstarte transkription: modellen er ikke tilgængelig og " -"kunne ikke downloades." +"Kunne ikke genstarte transkription: modellen er ikke tilgængelig og kunne " +"ikke downloades." #: buzz/widgets/transcription_tasks_table_widget.py msgid "Could not restart transcription: transcriber worker not found." -msgstr "Kunne ikke genstarte transkription: transkriptionsprocessen blev ikke fundet." +msgstr "" +"Kunne ikke genstarte transkription: transkriptionsprocessen blev ikke fundet." #: buzz/widgets/recording_transcriber_widget.py msgid "Live Recording" @@ -892,7 +899,9 @@ msgstr "Ønskede undertekst længde" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were disabled during transcription" -msgstr "Kun tilgængeligt hvis ordniveau-tidsstempler var deaktiveret under transkription" +msgstr "" +"Kun tilgængeligt hvis ordniveau-tidsstempler var deaktiveret under " +"transkription" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Merge Options" @@ -916,13 +925,16 @@ msgstr "Sammenflet" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were enabled during transcription" -msgstr "Kun tilgængeligt hvis ordniveau-tidsstempler var aktiveret under transkription" +msgstr "" +"Kun tilgængeligt hvis ordniveau-tidsstempler var aktiveret under " +"transkription" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" "Speaker identification is not available: failed to load required libraries." msgstr "" -"Taler-identifikation er ikke tilgængelig: kunne ikke indlæse nødvendige biblioteker." +"Taler-identifikation er ikke tilgængelig: kunne ikke indlæse nødvendige " +"biblioteker." #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "1/8 Collecting transcripts" @@ -1491,3 +1503,65 @@ msgstr "Vis transkriberede oversættelse" #: buzz/settings/shortcut.py msgid "View Transcript Timestamps" msgstr "Vis transkriptionstidstempler " + +#: buzz/settings/shortcut.py +msgid "Search Transcript" +msgstr "Søg i transskription" + +#: buzz/settings/shortcut.py +msgid "Go to Next Transcript Search Result" +msgstr "Gå til næste søgeresultat i transskription" + +#: buzz/settings/shortcut.py +msgid "Go to Previous Transcript Search Result" +msgstr "Gå til forrige søgeresultat i transskription" + +#: buzz/settings/shortcut.py +msgid "Scroll to Current Text" +msgstr "Rul til aktuel tekst" + +#: buzz/settings/shortcut.py +msgid "Play/Pause Audio" +msgstr "Afspil/Pause lyd" + +#: buzz/settings/shortcut.py +msgid "Replay Current Segment" +msgstr "Afspil nuværende segment igen" + +#: buzz/settings/shortcut.py +msgid "Toggle Playback Controls" +msgstr "Skift afspilningskontroller" + +#: buzz/settings/shortcut.py +msgid "Decrease Segment Start Time" +msgstr "Reducer segmentets starttidspunkt" + +#: buzz/settings/shortcut.py +msgid "Increase Segment Start Time" +msgstr "Øg segmentets starttidspunkt" + +#: buzz/settings/shortcut.py +msgid "Decrease Segment End Time" +msgstr "Reducer segmentets sluttidspunkt" + +#: buzz/settings/shortcut.py +msgid "Increase Segment End Time" +msgstr "Øg segmentets sluttidspunkt" + +#: buzz/settings/recording_transcriber_mode.py +msgid "Append below" +msgstr "Tilføj herunder" + +#: buzz/settings/recording_transcriber_mode.py +msgid "Append above" +msgstr "Tilføj herover" + +#: buzz/settings/recording_transcriber_mode.py +msgid "Append and correct" +msgstr "Tilføj og ret" + +#: buzz/file_transcriber_queue_worker.py +msgid "" +"Speech extraction failed! Check your internet connection — a model may need " +"to be downloaded." +msgstr "Taleoprydning mislykkedes! Kontroller din internetforbindelse — en model skal muligvis hentes ned." diff --git a/buzz/locale/de_DE/LC_MESSAGES/buzz.po b/buzz/locale/de_DE/LC_MESSAGES/buzz.po index 751e01cd..bd2fce51 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: 2025-03-05 14:41+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -260,6 +260,10 @@ msgstr "" msgid "Enable folder watch" msgstr "Ordner überwachen aktivieren" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Verarbeitete Dateien löschen" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Eingabeordner" @@ -438,7 +442,8 @@ msgstr "KI-Modell:" #: buzz/widgets/transcriber/advanced_settings_dialog.py msgid "Please translate each text sent to you from English to Spanish." -msgstr "Bitte übersetzen Sie jeden an Sie gesendeten Text von Englisch nach Spanisch." +msgstr "" +"Bitte übersetzen Sie jeden an Sie gesendeten Text von Englisch nach Spanisch." #: buzz/widgets/transcriber/advanced_settings_dialog.py msgid "Instructions for AI:" @@ -615,7 +620,9 @@ msgstr "Neustart nicht möglich" #: buzz/widgets/transcription_tasks_table_widget.py msgid "Only failed or canceled transcriptions can be restarted." -msgstr "Nur fehlgeschlagene oder abgebrochene Transkriptionen können neu gestartet werden." +msgstr "" +"Nur fehlgeschlagene oder abgebrochene Transkriptionen können neu gestartet " +"werden." #: buzz/widgets/transcription_tasks_table_widget.py msgid "Failed to restart transcription: {}" @@ -631,7 +638,9 @@ msgstr "" #: buzz/widgets/transcription_tasks_table_widget.py msgid "Could not restart transcription: transcriber worker not found." -msgstr "Transkription konnte nicht neu gestartet werden: Transkriptions-Worker nicht gefunden." +msgstr "" +"Transkription konnte nicht neu gestartet werden: Transkriptions-Worker nicht " +"gefunden." #: buzz/widgets/recording_transcriber_widget.py msgid "Live Recording" @@ -824,7 +833,8 @@ msgstr "Segment wiederholen" #: buzz/widgets/transcription_viewer/transcription_viewer_widget.py msgid "Enable/disable looping when clicking on transcript segments" -msgstr "Wiederholen beim Klicken auf Transkript-Segmente aktivieren/deaktivieren" +msgstr "" +"Wiederholen beim Klicken auf Transkript-Segmente aktivieren/deaktivieren" #: buzz/widgets/transcription_viewer/transcription_viewer_widget.py msgid "Follow Audio" @@ -900,7 +910,9 @@ msgstr "Gewünschte Untertitellänge" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were disabled during transcription" -msgstr "Nur verfügbar, wenn Zeitangaben auf Wortebene bei der Transkription deaktiviert waren" +msgstr "" +"Nur verfügbar, wenn Zeitangaben auf Wortebene bei der Transkription " +"deaktiviert waren" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Merge Options" @@ -924,7 +936,9 @@ msgstr "Vereinigen" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were enabled during transcription" -msgstr "Nur verfügbar, wenn Zeitangaben auf Wortebene bei der Transkription aktiviert waren" +msgstr "" +"Nur verfügbar, wenn Zeitangaben auf Wortebene bei der Transkription " +"aktiviert waren" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" @@ -1089,7 +1103,9 @@ msgstr "" #: buzz/transcriber/local_whisper_cpp_server_transcriber.py #: buzz/transcriber/recording_transcriber.py msgid "Whisper server failed to start. Check logs for details." -msgstr "Whisper-Server konnte nicht gestartet werden. Details in den Protokollen prüfen." +msgstr "" +"Whisper-Server konnte nicht gestartet werden. Details in den Protokollen " +"prüfen." #: buzz/transcriber/local_whisper_cpp_server_transcriber.py #: buzz/transcriber/recording_transcriber.py @@ -1559,10 +1575,6 @@ msgstr "Oben anhängen" msgid "Append and correct" msgstr "Anhängen und korrigieren" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "Übersetzungsfehler, Protokolle prüfen!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " @@ -1571,6 +1583,9 @@ msgstr "" "Sprachextraktion fehlgeschlagen! Bitte Internetverbindung prüfen — ein " "Modell muss möglicherweise heruntergeladen werden." +#~ msgid "Translation error, see logs!" +#~ msgstr "Übersetzungsfehler, Protokolle prüfen!" + #~ msgid "Snap permission notice" #~ msgstr "Snap-Berechtigungsmitteilung" diff --git a/buzz/locale/en_US/LC_MESSAGES/buzz.po b/buzz/locale/en_US/LC_MESSAGES/buzz.po index 5eca4cc7..82e7802c 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: 2026-02-22 15:20+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -246,6 +246,10 @@ msgstr "" msgid "Enable folder watch" msgstr "" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "" @@ -1521,10 +1525,6 @@ msgstr "" msgid "Append and correct" msgstr "" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " diff --git a/buzz/locale/es_ES/LC_MESSAGES/buzz.po b/buzz/locale/es_ES/LC_MESSAGES/buzz.po index e29d164d..2cac032f 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: 2025-09-08 12:43+0200\n" "Last-Translator: Éric Duarte \n" "Language-Team: \n" @@ -264,6 +264,10 @@ msgstr "" msgid "Enable folder watch" msgstr "Habilitar la inspección de carpetas" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Eliminar archivos procesados" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Carpeta de entrada" @@ -654,11 +658,15 @@ msgstr "No se pudo reiniciar la transcripción: {}" msgid "" "Could not restart transcription: model not available and could not be " "downloaded." -msgstr "No se pudo reiniciar la transcripción: modelo no disponible y no se pudo descargar." +msgstr "" +"No se pudo reiniciar la transcripción: modelo no disponible y no se pudo " +"descargar." #: buzz/widgets/transcription_tasks_table_widget.py msgid "Could not restart transcription: transcriber worker not found." -msgstr "No se pudo reiniciar la transcripción: no se encontró el trabajador del transcriptor." +msgstr "" +"No se pudo reiniciar la transcripción: no se encontró el trabajador del " +"transcriptor." # automatic translation #: buzz/widgets/recording_transcriber_widget.py @@ -938,7 +946,9 @@ msgstr "Longitud deseada de los subtítulos" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were disabled during transcription" -msgstr "Disponible solo si los tiempos a nivel de palabra estaban desactivados durante la transcripción" +msgstr "" +"Disponible solo si los tiempos a nivel de palabra estaban desactivados " +"durante la transcripción" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Merge Options" @@ -962,12 +972,16 @@ msgstr "Fusión" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were enabled during transcription" -msgstr "Disponible solo si los tiempos a nivel de palabra estaban activados durante la transcripción" +msgstr "" +"Disponible solo si los tiempos a nivel de palabra estaban activados durante " +"la transcripción" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" "Speaker identification is not available: failed to load required libraries." -msgstr "La identificación de hablantes no está disponible: no se pudieron cargar las bibliotecas requeridas." +msgstr "" +"La identificación de hablantes no está disponible: no se pudieron cargar las " +"bibliotecas requeridas." #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "1/8 Collecting transcripts" @@ -989,7 +1003,9 @@ msgstr "3/8 Cargando modelo de alineación (reintentando con caché...)" msgid "" "Failed to load alignment model. Please check your internet connection and " "try again." -msgstr "No se pudo cargar el modelo de alineación. Por favor, compruebe su conexión a internet e inténtelo de nuevo." +msgstr "" +"No se pudo cargar el modelo de alineación. Por favor, compruebe su conexión " +"a internet e inténtelo de nuevo." #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "4/8 Processing audio" @@ -1610,15 +1626,16 @@ msgstr "Añadir arriba" msgid "Append and correct" msgstr "Añadir y corregir" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "¡Error de traducción, consulte los registros!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " "to be downloaded." -msgstr "¡Extracción de voz fallida! Compruebe su conexión a internet — es posible que sea necesario descargar un modelo." +msgstr "" +"¡Extracción de voz fallida! Compruebe su conexión a internet — es posible " +"que sea necesario descargar un modelo." + +#~ msgid "Translation error, see logs!" +#~ msgstr "¡Error de traducción, consulte los registros!" #~ msgid "Snap permission notice" #~ msgstr "Aviso de permiso Snap" diff --git a/buzz/locale/it_IT/LC_MESSAGES/buzz.po b/buzz/locale/it_IT/LC_MESSAGES/buzz.po index efad3328..4520d331 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: 2026-01-25 21:42+0200\n" "Language-Team: (Italiano) Albano Battistella \n" "Language: it_IT\n" @@ -260,6 +260,10 @@ msgstr "" msgid "Enable folder watch" msgstr "Abilita controllo cartelle" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Elimina file elaborati" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Cartella di input" @@ -438,7 +442,9 @@ msgstr "Modello AI:" #: buzz/widgets/transcriber/advanced_settings_dialog.py msgid "Please translate each text sent to you from English to Spanish." -msgstr "Per favore, traduci ogni testo che ti viene inviato dall'inglese allo spagnolo." +msgstr "" +"Per favore, traduci ogni testo che ti viene inviato dall'inglese allo " +"spagnolo." #: buzz/widgets/transcriber/advanced_settings_dialog.py msgid "Instructions for AI:" @@ -1565,10 +1571,6 @@ msgstr "Aggiungere sopra" msgid "Append and correct" msgstr "Aggiungere e correggere" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "Errore di traduzione, controlla i log!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " @@ -1577,6 +1579,9 @@ msgstr "" "Estrazione del parlato non riuscita! Controlla la tua connessione Internet — " "potrebbe essere necessario scaricare un modello." +#~ msgid "Translation error, see logs!" +#~ msgstr "Errore di traduzione, controlla i log!" + #~ msgid "Snap permission notice" #~ msgstr "Avviso di autorizzazione Snap" diff --git a/buzz/locale/ja_JP/LC_MESSAGES/buzz.po b/buzz/locale/ja_JP/LC_MESSAGES/buzz.po index 4c7b6342..366ff76d 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: \n" "Last-Translator: nunawa <71294849+nunawa@users.noreply.github.com>\n" "Language-Team: \n" @@ -178,8 +178,8 @@ msgid "" "Note: Live recording export settings will be moved to the Advanced Settings " "in the Live Recording screen in a future version." msgstr "" -"注意:ライブ録音の出力設定は、将来のバージョンでライブ録音画面の詳細設定に移動" -"されます。" +"注意:ライブ録音の出力設定は、将来のバージョンでライブ録音画面の詳細設定に移" +"動されます。" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Use 8-bit quantization to reduce memory usage" @@ -190,8 +190,8 @@ msgid "" "Applies to Huggingface and Faster Whisper models. Reduces GPU memory usage " "but may slightly decrease transcription quality." msgstr "" -"HuggingfaceおよびFaster Whisperモデルに適用されます。GPUメモリ使用量を削減しま" -"すが、文字起こしの品質がわずかに低下する場合があります。" +"HuggingfaceおよびFaster Whisperモデルに適用されます。GPUメモリ使用量を削減し" +"ますが、文字起こしの品質がわずかに低下する場合があります。" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Reduce GPU RAM" @@ -203,7 +203,8 @@ msgstr "CPUのみを使用してGPUアクセラレーションを無効にする #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Set this if larger models do not fit your GPU memory and Buzz crashes" -msgstr "大きなモデルがGPUメモリに収まらずBuzzがクラッシュする場合に設定してください" +msgstr "" +"大きなモデルがGPUメモリに収まらずBuzzがクラッシュする場合に設定してください" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Disable GPU" @@ -252,6 +253,10 @@ msgstr "" msgid "Enable folder watch" msgstr "フォルダ監視を有効にする" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "処理済みファイルを削除" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "入力フォルダ" @@ -616,8 +621,8 @@ msgid "" "Could not restart transcription: model not available and could not be " "downloaded." msgstr "" -"文字起こしを再開できませんでした: モデルが利用できず、ダウンロードもできません" -"でした。" +"文字起こしを再開できませんでした: モデルが利用できず、ダウンロードもできませ" +"んでした。" #: buzz/widgets/transcription_tasks_table_widget.py msgid "Could not restart transcription: transcriber worker not found." @@ -919,8 +924,7 @@ msgstr "文字起こし時に単語レベルのタイミングが有効だった #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" "Speaker identification is not available: failed to load required libraries." -msgstr "" -"話者識別は利用できません: 必要なライブラリの読み込みに失敗しました。" +msgstr "話者識別は利用できません: 必要なライブラリの読み込みに失敗しました。" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "1/8 Collecting transcripts" @@ -1085,8 +1089,8 @@ msgid "" "variable." msgstr "" "メモリ不足のためWhisperサーバーの起動に失敗しました。より小さいモデルで再試行" -"してください。CPUモードを強制するには環境変数BUZZ_FORCE_CPU=TRUEを使用してくだ" -"さい。" +"してください。CPUモードを強制するには環境変数BUZZ_FORCE_CPU=TRUEを使用してく" +"ださい。" #: buzz/transcriber/transcriber.py msgid "Translate to English" @@ -1544,10 +1548,6 @@ msgstr "上に追加" msgid "Append and correct" msgstr "追加して修正" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "翻訳エラーが発生しました。ログを確認してください!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " @@ -1556,6 +1556,9 @@ msgstr "" "音声抽出に失敗しました!インターネット接続を確認してください。モデルのダウン" "ロードが必要な場合があります。" +#~ msgid "Translation error, see logs!" +#~ msgstr "翻訳エラーが発生しました。ログを確認してください!" + #~ msgid "Snap permission notice" #~ msgstr "Snap権限通知" diff --git a/buzz/locale/lv_LV/LC_MESSAGES/buzz.po b/buzz/locale/lv_LV/LC_MESSAGES/buzz.po index 08a04e84..ad5dd01c 100644 --- a/buzz/locale/lv_LV/LC_MESSAGES/buzz.po +++ b/buzz/locale/lv_LV/LC_MESSAGES/buzz.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-27 09:07+0200\n" -"PO-Revision-Date: 2026-02-27 09:11+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" +"PO-Revision-Date: 2026-02-27 16:47+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: lv_LV\n" @@ -261,6 +261,10 @@ msgstr "" msgid "Enable folder watch" msgstr "Ieslēgt mapes vērošanu" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Dzēst apstrādātos failus" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Vērojamā mape" @@ -1561,10 +1565,6 @@ msgstr "Jaunie teikumi augšā" msgid "Append and correct" msgstr "Papildināt un labot esošo" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "Kļūda tulkojot, skatiet sistēmas žurnālu!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " @@ -1573,6 +1573,9 @@ msgstr "" "Runas atdalīšana neizdevās! Pārbaudiet interneta savienojumu, iespējams " "jālejupielādē modelis." +#~ msgid "Translation error, see logs!" +#~ msgstr "Kļūda tulkojot, skatiet sistēmas žurnālu!" + #~ msgid "Snap permission notice" #~ msgstr "Snap atļauju piezīme" diff --git a/buzz/locale/nl/LC_MESSAGES/buzz.po b/buzz/locale/nl/LC_MESSAGES/buzz.po index 2f4c2d9b..de2e2699 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: 2025-03-20 18:30+0100\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: none\n" @@ -186,7 +186,8 @@ msgid "" "in the Live Recording screen in a future version." msgstr "" "Opmerking: de exportinstellingen voor live-opnames worden in een toekomstige " -"versie verplaatst naar de geavanceerde instellingen in het scherm Live-opname." +"versie verplaatst naar de geavanceerde instellingen in het scherm Live-" +"opname." #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Use 8-bit quantization to reduce memory usage" @@ -210,7 +211,9 @@ msgstr "Alleen CPU gebruiken en GPU-versnelling uitschakelen" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Set this if larger models do not fit your GPU memory and Buzz crashes" -msgstr "Gebruik dit als grotere modellen niet in het GPU-geheugen passen en Buzz crasht" +msgstr "" +"Gebruik dit als grotere modellen niet in het GPU-geheugen passen en Buzz " +"crasht" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Disable GPU" @@ -259,6 +262,10 @@ msgstr "" msgid "Enable folder watch" msgstr "Map bijhouden" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Verwerkte bestanden verwijderen" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Invoermap" @@ -437,7 +444,8 @@ msgstr "AI-model:" #: buzz/widgets/transcriber/advanced_settings_dialog.py msgid "Please translate each text sent to you from English to Spanish." -msgstr "Vertaal elke tekst die naar u wordt verzonden van het Engels naar het Spaans." +msgstr "" +"Vertaal elke tekst die naar u wordt verzonden van het Engels naar het Spaans." #: buzz/widgets/transcriber/advanced_settings_dialog.py msgid "Instructions for AI:" @@ -614,7 +622,8 @@ msgstr "Kan niet opnieuw starten" #: buzz/widgets/transcription_tasks_table_widget.py msgid "Only failed or canceled transcriptions can be restarted." -msgstr "Alleen mislukte of afgebroken transcripties kunnen opnieuw worden gestart." +msgstr "" +"Alleen mislukte of afgebroken transcripties kunnen opnieuw worden gestart." #: buzz/widgets/transcription_tasks_table_widget.py msgid "Failed to restart transcription: {}" @@ -630,7 +639,9 @@ msgstr "" #: buzz/widgets/transcription_tasks_table_widget.py msgid "Could not restart transcription: transcriber worker not found." -msgstr "Transcriptie kon niet opnieuw worden gestart: transcriptieproces niet gevonden." +msgstr "" +"Transcriptie kon niet opnieuw worden gestart: transcriptieproces niet " +"gevonden." #: buzz/widgets/recording_transcriber_widget.py msgid "Live Recording" @@ -897,7 +908,9 @@ msgstr "Voorkeurslengte van ondertiteling" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were disabled during transcription" -msgstr "Alleen beschikbaar als timings op woordniveau zijn uitgeschakeld tijdens transcriptie" +msgstr "" +"Alleen beschikbaar als timings op woordniveau zijn uitgeschakeld tijdens " +"transcriptie" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Merge Options" @@ -921,7 +934,9 @@ msgstr "Samenvoegen" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were enabled during transcription" -msgstr "Alleen beschikbaar als timings op woordniveau zijn ingeschakeld tijdens transcriptie" +msgstr "" +"Alleen beschikbaar als timings op woordniveau zijn ingeschakeld tijdens " +"transcriptie" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" @@ -951,8 +966,8 @@ msgid "" "Failed to load alignment model. Please check your internet connection and " "try again." msgstr "" -"Het laden van het uitlijningsmodel is mislukt. Controleer uw internetverbinding " -"en probeer het opnieuw." +"Het laden van het uitlijningsmodel is mislukt. Controleer uw " +"internetverbinding en probeer het opnieuw." #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "4/8 Processing audio" @@ -1085,7 +1100,9 @@ msgstr "De OpenAI-api-sleutel kan niet worden bewaard in de sleutelbos" #: buzz/transcriber/local_whisper_cpp_server_transcriber.py #: buzz/transcriber/recording_transcriber.py msgid "Whisper server failed to start. Check logs for details." -msgstr "De Whisper-server kon niet worden gestart. Raadpleeg de logboeken voor meer informatie." +msgstr "" +"De Whisper-server kon niet worden gestart. Raadpleeg de logboeken voor meer " +"informatie." #: buzz/transcriber/local_whisper_cpp_server_transcriber.py #: buzz/transcriber/recording_transcriber.py @@ -1094,8 +1111,8 @@ msgid "" "with a smaller model. To force CPU mode use BUZZ_FORCE_CPU=TRUE environment " "variable." msgstr "" -"De Whisper-server kon niet worden gestart wegens onvoldoende geheugen. Probeer " -"het opnieuw met een kleiner model. Gebruik de omgevingsvariabele " +"De Whisper-server kon niet worden gestart wegens onvoldoende geheugen. " +"Probeer het opnieuw met een kleiner model. Gebruik de omgevingsvariabele " "BUZZ_FORCE_CPU=TRUE om CPU-modus te forceren." #: buzz/transcriber/transcriber.py @@ -1554,10 +1571,6 @@ msgstr "Bovenaan toevoegen" msgid "Append and correct" msgstr "Toevoegen en corrigeren" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "Vertaalfout, raadpleeg de logboeken!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " @@ -1566,6 +1579,9 @@ msgstr "" "Spraakextractie mislukt! Controleer uw internetverbinding — mogelijk moet er " "een model worden gedownload." +#~ msgid "Translation error, see logs!" +#~ msgstr "Vertaalfout, raadpleeg de logboeken!" + #~ msgid "Snap permission notice" #~ msgstr "Snap-rechten" diff --git a/buzz/locale/pl_PL/LC_MESSAGES/buzz.po b/buzz/locale/pl_PL/LC_MESSAGES/buzz.po index d556fe63..bb74df3c 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: 2024-03-17 20:50+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -208,7 +208,9 @@ msgstr "Używaj tylko CPU i wyłącz akcelerację GPU" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Set this if larger models do not fit your GPU memory and Buzz crashes" -msgstr "Ustaw to, jeśli większe modele nie mieszczą się w pamięci GPU i Buzz się zawiesza" +msgstr "" +"Ustaw to, jeśli większe modele nie mieszczą się w pamięci GPU i Buzz się " +"zawiesza" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Disable GPU" @@ -250,13 +252,17 @@ msgid "" "validation." msgstr "" "OpenAI API zwróciło nieprawidłową odpowiedź. Sprawdź adres URL API lub swój " -"klucz. Transkrypcja i tłumaczenie mogą nadal działać, jeśli API nie obsługuje " -"weryfikacji klucza." +"klucz. Transkrypcja i tłumaczenie mogą nadal działać, jeśli API nie " +"obsługuje weryfikacji klucza." #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Enable folder watch" msgstr "Włącz obserwację folderu" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Usuń przetworzonych pliki" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Folder wejściowy" @@ -610,7 +616,8 @@ msgstr "Nie można ponownie uruchomić" #: buzz/widgets/transcription_tasks_table_widget.py msgid "Only failed or canceled transcriptions can be restarted." -msgstr "Tylko nieudane lub anulowane transkrypcje mogą być uruchomione ponownie." +msgstr "" +"Tylko nieudane lub anulowane transkrypcje mogą być uruchomione ponownie." #: buzz/widgets/transcription_tasks_table_widget.py msgid "Failed to restart transcription: {}" @@ -626,7 +633,9 @@ msgstr "" #: buzz/widgets/transcription_tasks_table_widget.py msgid "Could not restart transcription: transcriber worker not found." -msgstr "Nie można uruchomić ponownie transkrypcji: nie znaleziono procesu transkrypcji." +msgstr "" +"Nie można uruchomić ponownie transkrypcji: nie znaleziono procesu " +"transkrypcji." #: buzz/widgets/recording_transcriber_widget.py msgid "Live Recording" @@ -895,7 +904,8 @@ msgstr "Żądana długość napisów" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were disabled during transcription" -msgstr "Dostępne tylko jeśli znaczniki dla słów były wyłączone podczas transkrypcji" +msgstr "" +"Dostępne tylko jeśli znaczniki dla słów były wyłączone podczas transkrypcji" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Merge Options" @@ -919,13 +929,15 @@ msgstr "Scal" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were enabled during transcription" -msgstr "Dostępne tylko jeśli znaczniki dla słów były włączone podczas transkrypcji" +msgstr "" +"Dostępne tylko jeśli znaczniki dla słów były włączone podczas transkrypcji" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" "Speaker identification is not available: failed to load required libraries." msgstr "" -"Identyfikacja mówcy jest niedostępna: nie udało się załadować wymaganych bibliotek." +"Identyfikacja mówcy jest niedostępna: nie udało się załadować wymaganych " +"bibliotek." #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "1/8 Collecting transcripts" @@ -941,7 +953,8 @@ msgstr "3/8 Ładowanie modelu wyrównania" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "3/8 Loading alignment model (retrying with cache...)" -msgstr "3/8 Ładowanie modelu wyrównania (ponowna próba z pamięcią podręczną...)" +msgstr "" +"3/8 Ładowanie modelu wyrównania (ponowna próba z pamięcią podręczną...)" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" @@ -1092,8 +1105,8 @@ msgid "" "variable." msgstr "" "Serwer Whisper nie uruchomił się z powodu niewystarczającej pamięci. Spróbuj " -"ponownie z mniejszym modelem. Aby wymusić tryb CPU, użyj zmiennej środowiskowej " -"BUZZ_FORCE_CPU=TRUE." +"ponownie z mniejszym modelem. Aby wymusić tryb CPU, użyj zmiennej " +"środowiskowej BUZZ_FORCE_CPU=TRUE." #: buzz/transcriber/transcriber.py msgid "Translate to English" @@ -1551,17 +1564,16 @@ msgstr "Dodaj powyżej" msgid "Append and correct" msgstr "Dodaj i popraw" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "Błąd tłumaczenia, sprawdź logi!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " "to be downloaded." msgstr "" -"Wyodrębnianie mowy nie powiodło się! Sprawdź połączenie internetowe — " -"może być konieczne pobranie modelu." +"Wyodrębnianie mowy nie powiodło się! Sprawdź połączenie internetowe — może " +"być konieczne pobranie modelu." + +#~ msgid "Translation error, see logs!" +#~ msgstr "Błąd tłumaczenia, sprawdź logi!" #~ msgid "ID" #~ msgstr "ID" diff --git a/buzz/locale/pt_BR/LC_MESSAGES/buzz.po b/buzz/locale/pt_BR/LC_MESSAGES/buzz.po index 8d65e25e..f9b04add 100644 --- a/buzz/locale/pt_BR/LC_MESSAGES/buzz.po +++ b/buzz/locale/pt_BR/LC_MESSAGES/buzz.po @@ -258,6 +258,10 @@ msgstr "" msgid "Enable folder watch" msgstr "Habilitar monitoramento de pasta" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Excluir arquivos processados" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Pasta de entrada" diff --git a/buzz/locale/uk_UA/LC_MESSAGES/buzz.po b/buzz/locale/uk_UA/LC_MESSAGES/buzz.po index 263ccda1..920a2259 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: \n" "Last-Translator: Yevhen Popok \n" "Language-Team: \n" @@ -205,7 +205,8 @@ msgstr "Використовувати лише CPU та вимкнути при #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Set this if larger models do not fit your GPU memory and Buzz crashes" -msgstr "Увімкніть це, якщо великі моделі не поміщаються в пам'ять GPU і Buzz падає" +msgstr "" +"Увімкніть це, якщо великі моделі не поміщаються в пам'ять GPU і Buzz падає" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Disable GPU" @@ -232,8 +233,8 @@ msgid "" "API supports only base64 characters (A-Za-z0-9+/=_-). Other characters in " "API key may cause errors." msgstr "" -"API підтримує лише символи base64 (A-Za-z0-9+/=_-). Інші символи в " -"API-ключі можуть спричиняти помилки." +"API підтримує лише символи base64 (A-Za-z0-9+/=_-). Інші символи в API-ключі " +"можуть спричиняти помилки." #: buzz/widgets/preferences_dialog/general_preferences_widget.py #: buzz/widgets/transcriber/advanced_settings_dialog.py @@ -254,6 +255,10 @@ msgstr "" msgid "Enable folder watch" msgstr "Увімкнути стеження за текою" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "Видалити оброблені файли" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "Тека введення" @@ -430,7 +435,9 @@ msgstr "Модель ШІ" #: buzz/widgets/transcriber/advanced_settings_dialog.py msgid "Please translate each text sent to you from English to Spanish." -msgstr "Будь ласка, перекладайте кожен текст, надісланий вам, з англійської на іспанську." +msgstr "" +"Будь ласка, перекладайте кожен текст, надісланий вам, з англійської на " +"іспанську." #: buzz/widgets/transcriber/advanced_settings_dialog.py msgid "Instructions for AI:" @@ -623,7 +630,8 @@ msgstr "" #: buzz/widgets/transcription_tasks_table_widget.py msgid "Could not restart transcription: transcriber worker not found." -msgstr "Не вдалося перезапустити транскрипцію: обробник транскрипції не знайдено." +msgstr "" +"Не вдалося перезапустити транскрипцію: обробник транскрипції не знайдено." #: buzz/widgets/recording_transcriber_widget.py msgid "Live Recording" @@ -892,7 +900,9 @@ msgstr "Бажана довжина субтитрів" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were disabled during transcription" -msgstr "Доступно лише якщо хронометраж на рівні слів був вимкнений під час транскрипції" +msgstr "" +"Доступно лише якщо хронометраж на рівні слів був вимкнений під час " +"транскрипції" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Merge Options" @@ -916,7 +926,9 @@ msgstr "Об'єднати" #: buzz/widgets/transcription_viewer/transcription_resizer_widget.py msgid "Available only if word level timings were enabled during transcription" -msgstr "Доступно лише якщо хронометраж на рівні слів був увімкнений під час транскрипції" +msgstr "" +"Доступно лише якщо хронометраж на рівні слів був увімкнений під час " +"транскрипції" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" @@ -1078,7 +1090,8 @@ msgstr "Не вдається додати до звʼязки ключів API- #: buzz/transcriber/local_whisper_cpp_server_transcriber.py #: buzz/transcriber/recording_transcriber.py msgid "Whisper server failed to start. Check logs for details." -msgstr "Не вдалося запустити сервер Whisper. Перевірте журнали для отримання деталей." +msgstr "" +"Не вдалося запустити сервер Whisper. Перевірте журнали для отримання деталей." #: buzz/transcriber/local_whisper_cpp_server_transcriber.py #: buzz/transcriber/recording_transcriber.py @@ -1547,10 +1560,6 @@ msgstr "Додати зверху" msgid "Append and correct" msgstr "Додати та виправити" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "Помилка перекладу, перегляньте журнали!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " @@ -1559,6 +1568,9 @@ msgstr "" "Не вдалося витягти мовлення! Перевірте підключення до інтернету — можливо, " "потрібно завантажити модель." +#~ msgid "Translation error, see logs!" +#~ msgstr "Помилка перекладу, перегляньте журнали!" + #~ msgid "Snap permission notice" #~ msgstr "Попередження щодо дозволів Snap" diff --git a/buzz/locale/zh_CN/LC_MESSAGES/buzz.po b/buzz/locale/zh_CN/LC_MESSAGES/buzz.po index 9c003d51..f7c06a1b 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: 2023-05-01 15:45+0800\n" "Last-Translator: \n" "Language-Team: lamb \n" @@ -182,8 +182,7 @@ msgstr "实时录制模式" msgid "" "Note: Live recording export settings will be moved to the Advanced Settings " "in the Live Recording screen in a future version." -msgstr "" -"注意:实时录制导出设置将在未来版本中移至实时录制界面的高级设置中。" +msgstr "注意:实时录制导出设置将在未来版本中移至实时录制界面的高级设置中。" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Use 8-bit quantization to reduce memory usage" @@ -194,8 +193,8 @@ msgid "" "Applies to Huggingface and Faster Whisper models. Reduces GPU memory usage " "but may slightly decrease transcription quality." msgstr "" -"适用于 Huggingface 和 Faster Whisper 模型。可减少 GPU 内存占用,但可能略微" -"降低转录质量。" +"适用于 Huggingface 和 Faster Whisper 模型。可减少 GPU 内存占用,但可能略微降" +"低转录质量。" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Reduce GPU RAM" @@ -252,6 +251,10 @@ msgstr "" msgid "Enable folder watch" msgstr "开启文件夹监控" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "删除已处理的文件" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "输入文件夹" @@ -820,8 +823,7 @@ msgstr "跟随音频" msgid "" "Enable/disable following the current audio position in the transcript. When " "enabled, automatically scrolls to current text." -msgstr "" -"在识别文本中启用/禁用跟随当前音频位置。启用后,自动滚动到当前文本。" +msgstr "在识别文本中启用/禁用跟随当前音频位置。启用后,自动滚动到当前文本。" #: buzz/widgets/transcription_viewer/transcription_viewer_widget.py msgid "Scroll to Current" @@ -1076,8 +1078,8 @@ msgid "" "with a smaller model. To force CPU mode use BUZZ_FORCE_CPU=TRUE environment " "variable." msgstr "" -"Whisper 服务器因内存不足而启动失败。请尝试使用较小的模型。如需强制使用 CPU " -"模式,请设置环境变量 BUZZ_FORCE_CPU=TRUE。" +"Whisper 服务器因内存不足而启动失败。请尝试使用较小的模型。如需强制使用 CPU 模" +"式,请设置环境变量 BUZZ_FORCE_CPU=TRUE。" #: buzz/transcriber/transcriber.py msgid "Translate to English" @@ -1535,16 +1537,14 @@ msgstr "增加上方" msgid "Append and correct" msgstr "增加并纠正" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "翻译出错,请查看日志!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " "to be downloaded." -msgstr "" -"语音提取失败!请检查您的网络连接——可能需要下载模型。" +msgstr "语音提取失败!请检查您的网络连接——可能需要下载模型。" + +#~ msgid "Translation error, see logs!" +#~ msgstr "翻译出错,请查看日志!" #~ msgid "Snap permission notice" #~ msgstr "快照权限通知" diff --git a/buzz/locale/zh_TW/LC_MESSAGES/buzz.po b/buzz/locale/zh_TW/LC_MESSAGES/buzz.po index 27a25bd9..38535b47 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: 2026-02-27 09:07+0200\n" +"POT-Creation-Date: 2026-02-27 16:46+0200\n" "PO-Revision-Date: 2023-05-01 15:45+0800\n" "Last-Translator: \n" "Language-Team: Lamb\n" @@ -182,8 +182,7 @@ msgstr "即時錄製模式" msgid "" "Note: Live recording export settings will be moved to the Advanced Settings " "in the Live Recording screen in a future version." -msgstr "" -"注意:即時錄製匯出設定將在未來版本中移至即時錄製畫面的進階設定中。" +msgstr "注意:即時錄製匯出設定將在未來版本中移至即時錄製畫面的進階設定中。" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Use 8-bit quantization to reduce memory usage" @@ -194,8 +193,8 @@ msgid "" "Applies to Huggingface and Faster Whisper models. Reduces GPU memory usage " "but may slightly decrease transcription quality." msgstr "" -"適用於 Huggingface 和 Faster Whisper 模型。可降低 GPU 記憶體使用量,但可能" -"略微降低轉錄品質。" +"適用於 Huggingface 和 Faster Whisper 模型。可降低 GPU 記憶體使用量,但可能略" +"微降低轉錄品質。" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Reduce GPU RAM" @@ -221,8 +220,7 @@ msgstr "OpenAI API 金鑰測試" msgid "" "Your API key is valid. Buzz will use this key to perform Whisper API " "transcriptions and AI translations." -msgstr "" -"您的 API 金鑰有效。Buzz 將使用此金鑰執行 Whisper API 轉錄和 AI 翻譯。" +msgstr "您的 API 金鑰有效。Buzz 將使用此金鑰執行 Whisper API 轉錄和 AI 翻譯。" #: buzz/widgets/preferences_dialog/general_preferences_widget.py msgid "Invalid API key" @@ -233,7 +231,8 @@ msgid "" "API supports only base64 characters (A-Za-z0-9+/=_-). Other characters in " "API key may cause errors." msgstr "" -"API 僅支援 base64 字元(A-Za-z0-9+/=_-)。API 金鑰中的其他字元可能會導致錯誤。" +"API 僅支援 base64 字元(A-Za-z0-9+/=_-)。API 金鑰中的其他字元可能會導致錯" +"誤。" #: buzz/widgets/preferences_dialog/general_preferences_widget.py #: buzz/widgets/transcriber/advanced_settings_dialog.py @@ -246,13 +245,17 @@ msgid "" "Transcription and translation may still work if the API does not support key " "validation." msgstr "" -"OpenAI API 傳回無效回應。請檢查 API 網址或您的金鑰。若 API 不支援金鑰驗證," -"轉錄和翻譯仍可能正常運作。" +"OpenAI API 傳回無效回應。請檢查 API 網址或您的金鑰。若 API 不支援金鑰驗證,轉" +"錄和翻譯仍可能正常運作。" #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Enable folder watch" msgstr "啟用資料夾監視" +#: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +msgid "Delete processed files" +msgstr "刪除已處理的檔案" + #: buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py msgid "Input folder" msgstr "輸入資料夾" @@ -616,8 +619,7 @@ msgstr "重新開始轉錄失敗:{}" msgid "" "Could not restart transcription: model not available and could not be " "downloaded." -msgstr "" -"無法重新開始轉錄:模型不可用且無法下載。" +msgstr "無法重新開始轉錄:模型不可用且無法下載。" #: buzz/widgets/transcription_tasks_table_widget.py msgid "Could not restart transcription: transcriber worker not found." @@ -822,8 +824,7 @@ msgstr "跟隨音訊" msgid "" "Enable/disable following the current audio position in the transcript. When " "enabled, automatically scrolls to current text." -msgstr "" -"啟用/停用在轉錄稿中跟隨目前音訊位置。啟用後,自動捲動至目前文字。" +msgstr "啟用/停用在轉錄稿中跟隨目前音訊位置。啟用後,自動捲動至目前文字。" #: buzz/widgets/transcription_viewer/transcription_viewer_widget.py msgid "Scroll to Current" @@ -916,8 +917,7 @@ msgstr "僅在轉錄時啟用單字級別時間戳記時可用" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "" "Speaker identification is not available: failed to load required libraries." -msgstr "" -"說話者識別不可用:無法載入所需程式庫。" +msgstr "說話者識別不可用:無法載入所需程式庫。" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "1/8 Collecting transcripts" @@ -939,8 +939,7 @@ msgstr "3/8 載入對齊模型(正在使用快取重試...)" msgid "" "Failed to load alignment model. Please check your internet connection and " "try again." -msgstr "" -"無法載入對齊模型。請檢查您的網路連線並重試。" +msgstr "無法載入對齊模型。請檢查您的網路連線並重試。" #: buzz/widgets/transcription_viewer/speaker_identification_widget.py msgid "4/8 Processing audio" @@ -1080,8 +1079,8 @@ msgid "" "with a smaller model. To force CPU mode use BUZZ_FORCE_CPU=TRUE environment " "variable." msgstr "" -"Whisper 伺服器因記憶體不足而啟動失敗。請改用較小的模型重試。若要強制使用 " -"CPU 模式,請設定環境變數 BUZZ_FORCE_CPU=TRUE。" +"Whisper 伺服器因記憶體不足而啟動失敗。請改用較小的模型重試。若要強制使用 CPU " +"模式,請設定環境變數 BUZZ_FORCE_CPU=TRUE。" #: buzz/transcriber/transcriber.py msgid "Translate to English" @@ -1539,16 +1538,14 @@ msgstr "附加至上方" msgid "Append and correct" msgstr "附加並校正" -#: buzz/translator.py -msgid "Translation error, see logs!" -msgstr "翻譯錯誤,請查看日誌!" - #: buzz/file_transcriber_queue_worker.py msgid "" "Speech extraction failed! Check your internet connection — a model may need " "to be downloaded." -msgstr "" -"語音提取失敗!請檢查您的網路連線——可能需要下載模型。" +msgstr "語音提取失敗!請檢查您的網路連線——可能需要下載模型。" + +#~ msgid "Translation error, see logs!" +#~ msgstr "翻譯錯誤,請查看日誌!" #~ msgid "ID" #~ msgstr "ID" diff --git a/buzz/transcriber/file_transcriber.py b/buzz/transcriber/file_transcriber.py index 74892c84..c50d4af2 100755 --- a/buzz/transcriber/file_transcriber.py +++ b/buzz/transcriber/file_transcriber.py @@ -155,13 +155,16 @@ class FileTranscriber(QObject): or self.transcription_task.file_path ) if source_path and os.path.exists(source_path): - shutil.move( - source_path, - os.path.join( - self.transcription_task.output_directory, - os.path.basename(source_path), - ), - ) + if self.transcription_task.delete_source_file: + os.remove(source_path) + else: + shutil.move( + source_path, + os.path.join( + self.transcription_task.output_directory, + os.path.basename(source_path), + ), + ) def on_download_progress(self, data: dict): if data["status"] == "downloading": diff --git a/buzz/transcriber/transcriber.py b/buzz/transcriber/transcriber.py index 4ba82786..0a52b54f 100644 --- a/buzz/transcriber/transcriber.py +++ b/buzz/transcriber/transcriber.py @@ -202,6 +202,7 @@ class FileTranscriptionTask: source: Source = Source.FILE_IMPORT file_path: Optional[str] = None original_file_path: Optional[str] = None # Original path before speech extraction + delete_source_file: bool = False url: Optional[str] = None fraction_downloaded: float = 0.0 diff --git a/buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py b/buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py index abc8c371..e7a3c0c9 100644 --- a/buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py +++ b/buzz/widgets/preferences_dialog/folder_watch_preferences_widget.py @@ -44,11 +44,16 @@ class FolderWatchPreferencesWidget(QWidget): checkbox.setObjectName("EnableFolderWatchCheckbox") checkbox.stateChanged.connect(self.on_enable_changed) - input_folder_browse_button = QPushButton(_("Browse")) - input_folder_browse_button.clicked.connect(self.on_click_browse_input_folder) + delete_checkbox = QCheckBox(_("Delete processed files")) + delete_checkbox.setChecked(config.delete_processed_files) + delete_checkbox.setObjectName("DeleteProcessedFilesCheckbox") + delete_checkbox.stateChanged.connect(self.on_delete_processed_files_changed) - output_folder_browse_button = QPushButton(_("Browse")) - output_folder_browse_button.clicked.connect(self.on_click_browse_output_folder) + self.input_folder_browse_button = QPushButton(_("Browse")) + self.input_folder_browse_button.clicked.connect(self.on_click_browse_input_folder) + + self.output_folder_browse_button = QPushButton(_("Browse")) + self.output_folder_browse_button.clicked.connect(self.on_click_browse_output_folder) input_folder_row = QHBoxLayout() self.input_folder_line_edit = LineEdit(config.input_directory, self) @@ -57,7 +62,7 @@ class FolderWatchPreferencesWidget(QWidget): self.input_folder_line_edit.setObjectName("InputFolderLineEdit") input_folder_row.addWidget(self.input_folder_line_edit) - input_folder_row.addWidget(input_folder_browse_button) + input_folder_row.addWidget(self.input_folder_browse_button) output_folder_row = QHBoxLayout() self.output_folder_line_edit = LineEdit(config.output_directory, self) @@ -66,7 +71,7 @@ class FolderWatchPreferencesWidget(QWidget): self.output_folder_line_edit.setObjectName("OutputFolderLineEdit") output_folder_row.addWidget(self.output_folder_line_edit) - output_folder_row.addWidget(output_folder_browse_button) + output_folder_row.addWidget(self.output_folder_browse_button) openai_access_token = get_password(Key.OPENAI_API_KEY) ( @@ -77,15 +82,17 @@ class FolderWatchPreferencesWidget(QWidget): file_paths=[], ) - transcription_form_widget = FileTranscriptionFormWidget( + self.transcription_form_widget = FileTranscriptionFormWidget( transcription_options=transcription_options, file_transcription_options=file_transcription_options, parent=self, ) - transcription_form_widget.transcription_options_changed.connect( + self.transcription_form_widget.transcription_options_changed.connect( self.on_transcription_options_changed ) + self.delete_checkbox = delete_checkbox + layout = QVBoxLayout(self) folders_form_layout = QFormLayout() @@ -93,14 +100,17 @@ class FolderWatchPreferencesWidget(QWidget): folders_form_layout.addRow("", checkbox) folders_form_layout.addRow(_("Input folder"), input_folder_row) folders_form_layout.addRow(_("Output folder"), output_folder_row) - folders_form_layout.addWidget(transcription_form_widget) + folders_form_layout.addRow("", delete_checkbox) + folders_form_layout.addWidget(self.transcription_form_widget) layout.addLayout(folders_form_layout) - layout.addWidget(transcription_form_widget) + layout.addWidget(self.transcription_form_widget) layout.addStretch() self.setLayout(layout) + self._set_settings_enabled(config.enabled) + def on_click_browse_input_folder(self): folder = QFileDialog.getExistingDirectory(self, _("Select Input Folder")) self.input_folder_line_edit.setText(folder) @@ -119,8 +129,22 @@ class FolderWatchPreferencesWidget(QWidget): self.config.output_directory = folder self.config_changed.emit(self.config) + def _set_settings_enabled(self, enabled: bool): + self.input_folder_line_edit.setEnabled(enabled) + self.input_folder_browse_button.setEnabled(enabled) + self.output_folder_line_edit.setEnabled(enabled) + self.output_folder_browse_button.setEnabled(enabled) + self.delete_checkbox.setEnabled(enabled) + self.transcription_form_widget.setEnabled(enabled) + def on_enable_changed(self, state: int): - self.config.enabled = state == 2 + enabled = state == 2 + self.config.enabled = enabled + self._set_settings_enabled(enabled) + self.config_changed.emit(self.config) + + def on_delete_processed_files_changed(self, state: int): + self.config.delete_processed_files = state == 2 self.config_changed.emit(self.config) def on_transcription_options_changed( diff --git a/buzz/widgets/preferences_dialog/models/folder_watch_preferences.py b/buzz/widgets/preferences_dialog/models/folder_watch_preferences.py index f754a4ea..6dcea82a 100644 --- a/buzz/widgets/preferences_dialog/models/folder_watch_preferences.py +++ b/buzz/widgets/preferences_dialog/models/folder_watch_preferences.py @@ -13,11 +13,13 @@ class FolderWatchPreferences: input_directory: str output_directory: str file_transcription_options: FileTranscriptionPreferences + delete_processed_files: bool = False def save(self, settings: QSettings): settings.setValue("enabled", self.enabled) settings.setValue("input_folder", self.input_directory) settings.setValue("output_directory", self.output_directory) + settings.setValue("delete_processed_files", self.delete_processed_files) settings.beginGroup("file_transcription_options") self.file_transcription_options.save(settings) settings.endGroup() @@ -29,6 +31,8 @@ class FolderWatchPreferences: input_folder = settings.value("input_folder", defaultValue="", type=str) output_folder = settings.value("output_directory", defaultValue="", type=str) + delete_value = settings.value("delete_processed_files", False) + delete_processed_files = False if delete_value == "false" else bool(delete_value) settings.beginGroup("file_transcription_options") file_transcription_options = FileTranscriptionPreferences.load(settings) settings.endGroup() @@ -37,4 +41,5 @@ class FolderWatchPreferences: input_directory=input_folder, output_directory=output_folder, file_transcription_options=file_transcription_options, + delete_processed_files=delete_processed_files, ) diff --git a/buzz/widgets/transcription_task_folder_watcher.py b/buzz/widgets/transcription_task_folder_watcher.py index 6052993f..368c5d2e 100644 --- a/buzz/widgets/transcription_task_folder_watcher.py +++ b/buzz/widgets/transcription_task_folder_watcher.py @@ -111,6 +111,7 @@ class TranscriptionTaskFolderWatcher(QFileSystemWatcher): model_path=model_path, output_directory=output_directory, source=FileTranscriptionTask.Source.FOLDER_WATCH, + delete_source_file=self.preferences.delete_processed_files, ) self.task_found.emit(task) self.paths_emitted.add(file_path) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index ea1b5284..5e4c3a93 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -115,6 +115,12 @@ parts: # Clean caches uv cache clean + # Create launcher wrapper to ensure the snap's own libasound.so.2 is found + # before gnome content snap libraries (which desktop-launch prepends to LD_LIBRARY_PATH) + mkdir -p $CRAFT_PART_INSTALL/bin + printf '#!/bin/sh\nexport LD_LIBRARY_PATH="$SNAP/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"\nexec "$SNAP/bin/python" -m buzz "$@"\n' > $CRAFT_PART_INSTALL/bin/buzz-launcher + chmod +x $CRAFT_PART_INSTALL/bin/buzz-launcher + # Copy source files cp -r $CRAFT_PART_BUILD/buzz $CRAFT_PART_INSTALL/ cp -r $CRAFT_PART_BUILD/ctc_forced_aligner $CRAFT_PART_INSTALL/ @@ -148,7 +154,7 @@ apps: - gnome command-chain: - bin/gpu-2404-wrapper - command: snap/command-chain/desktop-launch $SNAP/bin/python -m buzz + command: snap/command-chain/desktop-launch $SNAP/bin/buzz-launcher desktop: usr/share/applications/buzz.desktop environment: PATH: $SNAP/usr/bin:$SNAP/bin:$PATH diff --git a/tests/transcriber/whisper_file_transcriber_test.py b/tests/transcriber/whisper_file_transcriber_test.py index 18a032b6..25dad30c 100644 --- a/tests/transcriber/whisper_file_transcriber_test.py +++ b/tests/transcriber/whisper_file_transcriber_test.py @@ -357,6 +357,42 @@ class TestWhisperFileTranscriber: transcriber.stop() time.sleep(3) + def test_transcribe_from_folder_watch_source_deletes_file(self, qtbot): + file_path = tempfile.mktemp(suffix=".mp3") + shutil.copy(test_audio_path, file_path) + + file_transcription_options = FileTranscriptionOptions( + file_paths=[file_path], + output_formats={OutputFormat.TXT}, + ) + transcription_options = TranscriptionOptions() + model_path = get_model_path(transcription_options.model) + + output_directory = tempfile.mkdtemp() + transcriber = WhisperFileTranscriber( + task=FileTranscriptionTask( + model_path=model_path, + transcription_options=transcription_options, + file_transcription_options=file_transcription_options, + file_path=file_path, + original_file_path=file_path, + output_directory=output_directory, + source=FileTranscriptionTask.Source.FOLDER_WATCH, + delete_source_file=True, + ) + ) + with qtbot.wait_signal(transcriber.completed, timeout=10 * 6000): + transcriber.run() + + assert not os.path.isfile(file_path) + assert not os.path.isfile( + os.path.join(output_directory, os.path.basename(file_path)) + ) + assert len(glob.glob("*.txt", root_dir=output_directory)) > 0 + + transcriber.stop() + time.sleep(3) + @pytest.mark.skip() def test_transcribe_stop(self): output_file_path = os.path.join(tempfile.gettempdir(), "whisper.txt") diff --git a/tests/widgets/preferences_dialog/folder_watch_preferences_widget_test.py b/tests/widgets/preferences_dialog/folder_watch_preferences_widget_test.py index 0c9f2082..86e0c656 100644 --- a/tests/widgets/preferences_dialog/folder_watch_preferences_widget_test.py +++ b/tests/widgets/preferences_dialog/folder_watch_preferences_widget_test.py @@ -48,8 +48,12 @@ class TestFolderWatchPreferencesWidget: assert not checkbox.isChecked() assert input_folder_line_edit.text() == "" assert output_folder_line_edit.text() == "" + assert not input_folder_line_edit.isEnabled() + assert not output_folder_line_edit.isEnabled() checkbox.setChecked(True) + assert input_folder_line_edit.isEnabled() + assert output_folder_line_edit.isEnabled() input_folder_line_edit.setText("test/input/folder") output_folder_line_edit.setText("test/output/folder") @@ -57,3 +61,42 @@ class TestFolderWatchPreferencesWidget: assert last_config_changed_call[0][0].enabled assert last_config_changed_call[0][0].input_directory == "test/input/folder" assert last_config_changed_call[0][0].output_directory == "test/output/folder" + + def test_delete_processed_files_checkbox(self, qtbot): + widget = FolderWatchPreferencesWidget( + config=FolderWatchPreferences( + enabled=False, + input_directory="", + output_directory="", + file_transcription_options=FileTranscriptionPreferences( + language=None, + task=Task.TRANSCRIBE, + model=TranscriptionModel.default(), + word_level_timings=False, + extract_speech=False, + temperature=DEFAULT_WHISPER_TEMPERATURE, + initial_prompt="", + enable_llm_translation=False, + llm_model="", + llm_prompt="", + output_formats=set(), + ), + ), + ) + mock_config_changed = Mock() + widget.config_changed.connect(mock_config_changed) + qtbot.add_widget(widget) + + delete_checkbox = widget.findChild(QCheckBox, "DeleteProcessedFilesCheckbox") + assert delete_checkbox is not None + assert not delete_checkbox.isChecked() + + delete_checkbox.setChecked(True) + + last_config = mock_config_changed.call_args_list[-1][0][0] + assert last_config.delete_processed_files is True + + delete_checkbox.setChecked(False) + + last_config = mock_config_changed.call_args_list[-1][0][0] + assert last_config.delete_processed_files is False diff --git a/tests/widgets/transcription_task_folder_watcher_test.py b/tests/widgets/transcription_task_folder_watcher_test.py index 44e4d461..62b2ef63 100644 --- a/tests/widgets/transcription_task_folder_watcher_test.py +++ b/tests/widgets/transcription_task_folder_watcher_test.py @@ -322,6 +322,76 @@ class TestTranscriptionTaskFolderWatcher: task: FileTranscriptionTask = blocker.args[0] assert task.file_path == os.path.join(input_directory, "whisper-french.mp3") + def test_should_set_delete_source_file_when_preference_enabled(self, qtbot: QtBot): + input_directory = mkdtemp() + output_directory = mkdtemp() + + watcher = TranscriptionTaskFolderWatcher( + tasks={}, + preferences=FolderWatchPreferences( + enabled=True, + input_directory=input_directory, + output_directory=output_directory, + delete_processed_files=True, + file_transcription_options=FileTranscriptionPreferences( + language=None, + task=Task.TRANSCRIBE, + model=self.default_model(), + word_level_timings=False, + extract_speech=False, + temperature=DEFAULT_WHISPER_TEMPERATURE, + initial_prompt="", + enable_llm_translation=False, + llm_model="", + llm_prompt="", + output_formats=set(), + ), + ), + ) + + shutil.copy(test_audio_path, input_directory) + + with qtbot.wait_signal(watcher.task_found, timeout=10_000) as blocker: + pass + + task: FileTranscriptionTask = blocker.args[0] + assert task.delete_source_file is True + + def test_should_not_set_delete_source_file_when_preference_disabled(self, qtbot: QtBot): + input_directory = mkdtemp() + output_directory = mkdtemp() + + watcher = TranscriptionTaskFolderWatcher( + tasks={}, + preferences=FolderWatchPreferences( + enabled=True, + input_directory=input_directory, + output_directory=output_directory, + delete_processed_files=False, + file_transcription_options=FileTranscriptionPreferences( + language=None, + task=Task.TRANSCRIBE, + model=self.default_model(), + word_level_timings=False, + extract_speech=False, + temperature=DEFAULT_WHISPER_TEMPERATURE, + initial_prompt="", + enable_llm_translation=False, + llm_model="", + llm_prompt="", + output_formats=set(), + ), + ), + ) + + shutil.copy(test_audio_path, input_directory) + + with qtbot.wait_signal(watcher.task_found, timeout=10_000) as blocker: + pass + + task: FileTranscriptionTask = blocker.args[0] + assert task.delete_source_file is False + def test_should_set_original_file_path(self, qtbot: QtBot): input_directory = mkdtemp() output_directory = mkdtemp()