summaryrefslogtreecommitdiffstats
path: root/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts')
-rw-r--r--Scripts/text_to_text_demo.py2
-rw-r--r--Scripts/transcribe_v2.py7
2 files changed, 4 insertions, 5 deletions
diff --git a/Scripts/text_to_text_demo.py b/Scripts/text_to_text_demo.py
index d5f0ada..4810361 100644
--- a/Scripts/text_to_text_demo.py
+++ b/Scripts/text_to_text_demo.py
@@ -7,8 +7,6 @@ from pythonosc import udp_client
import generate_utils
import osc_ctrl
-import paging
-import pythonosc
import time
class AppConfig:
diff --git a/Scripts/transcribe_v2.py b/Scripts/transcribe_v2.py
index 7655d4b..32652df 100644
--- a/Scripts/transcribe_v2.py
+++ b/Scripts/transcribe_v2.py
@@ -422,7 +422,7 @@ class Whisper:
if cfg["use_cpu"]:
model_device = "cpu"
- download_it = os.path.exists(model_root)
+ already_downloaded = os.path.exists(model_root)
if '/' in model_str:
hf_hub_download(repo_id=model_str, filename='model.bin',
local_dir=model_root)
@@ -430,14 +430,15 @@ class Whisper:
local_dir=model_root)
hf_hub_download(repo_id=model_str, filename='config.json',
local_dir=model_root)
- if download_it:
+ already_downloaded = True
+ if already_downloaded:
model_str = model_root
self.model = WhisperModel(model_str,
device = model_device,
device_index = cfg["gpu_idx"],
compute_type = cfg["compute_type"],
download_root = model_root,
- local_files_only = download_it)
+ local_files_only = already_downloaded)
def transcribe(self, frames: bytes = None) -> typing.List[Segment]:
if frames is None: