summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--GUI/GUI/GUI/Frame.cpp1
-rw-r--r--Scripts/transcribe_v2.py16
2 files changed, 8 insertions, 9 deletions
diff --git a/GUI/GUI/GUI/Frame.cpp b/GUI/GUI/GUI/Frame.cpp
index 0cdd99e..0c83742 100644
--- a/GUI/GUI/GUI/Frame.cpp
+++ b/GUI/GUI/GUI/Frame.cpp
@@ -463,6 +463,7 @@ namespace {
"medium",
"large-v1",
"large-v2",
+ "yumfood/whisper_distil_large_v2_ct2",
};
const size_t kNumModelChoices = sizeof(kModelChoices) / sizeof(kModelChoices[0]);
constexpr int kModelDefault = 2; // base.en
diff --git a/Scripts/transcribe_v2.py b/Scripts/transcribe_v2.py
index 4ae17d1..491bc35 100644
--- a/Scripts/transcribe_v2.py
+++ b/Scripts/transcribe_v2.py
@@ -421,16 +421,14 @@ class Whisper:
model_device = "cpu"
download_it = os.path.exists(model_root)
- model_str = model_str
+ if '/' in model_str:
+ hf_hub_download(repo_id=model_str, filename='model.bin',
+ local_dir=model_root)
+ hf_hub_download(repo_id=model_str, filename='vocabulary.json',
+ local_dir=model_root)
+ hf_hub_download(repo_id=model_str, filename='config.json',
+ local_dir=model_root)
if download_it:
- if '/' in model_str:
- hf_hub_download(repo_id=model_str, filename='model.bin',
- local_dir=model_root)
- hf_hub_download(repo_id=model_str, filename='vocabulary.json',
- local_dir=model_root)
- hf_hub_download(repo_id=model_str, filename='config.json',
- local_dir=model_root)
-
model_str = model_root
self.model = WhisperModel(model_str,
device = model_device,