From 7d50d5f4cff18ac7364bbb3e881c4fffa2f7cc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristofer=20S=C3=B6derstr=C3=B6m?= Date: Mon, 6 Nov 2023 09:57:44 +0100 Subject: [PATCH] QOL improvements --- app.py | 8 ++++++-- sample_audio/transcriptions/Armstrong_Small_Step.txt | 4 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index 0cbc8ac..ee6a7ba 100644 --- a/app.py +++ b/app.py @@ -42,7 +42,8 @@ class App: language_frame.pack(fill=tk.BOTH, padx=10, pady=10) customtkinter.CTkLabel(language_frame, text="Language:", font=font).pack(side=tk.LEFT, padx=5) self.language_entry = customtkinter.CTkEntry(language_frame, width=50, font=('Roboto', 12, 'italic')) - self.language_entry.insert(0, 'Select language or clear to detect automatically') + self.default_language_text = "Enter language (or ignore to auto-detect)" + self.language_entry.insert(0, self.default_language_text) self.language_entry.bind('', on_entry_click) self.language_entry.pack(side=tk.LEFT, fill=tk.X, expand=True) # Model frame @@ -87,7 +88,10 @@ class App: def transcribe_thread(self): path = self.path_entry.get() model = self.model_combobox.get() - language = self.language_entry.get() or None + language = self.language_entry.get() + # Check if the language field has the default text or is empty + if language == self.default_language_text or not language.strip(): + language = None # This is the same as passing nothing verbose = self.verbose_var.get() # Show progress bar self.progress_bar.pack(fill=tk.X, padx=5, pady=5) diff --git a/sample_audio/transcriptions/Armstrong_Small_Step.txt b/sample_audio/transcriptions/Armstrong_Small_Step.txt index cbc4bed..d29bd78 100644 --- a/sample_audio/transcriptions/Armstrong_Small_Step.txt +++ b/sample_audio/transcriptions/Armstrong_Small_Step.txt @@ -1,4 +1,2 @@ Armstrong_Small_Step -[0:00:00 --> 0:00:07]: And they're still brought to land now. -[0:00:07 --> 0:00:18]: It's one small step for man. -[0:00:18 --> 0:00:23]: One by a fleet for man time. \ No newline at end of file +[0:00:00 --> 0:00:29.360000]: alumnfeldaguyrjarna om det nya skirprå kızım om det där föddarna hatt splittar, do nackrott, \ No newline at end of file