mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 22:55:46 +01:00
Switch whisper model cache to /models/ (#808)
This commit is contained in:
parent
4726d58af6
commit
9e6d722ca9
2 changed files with 4 additions and 5 deletions
|
|
@ -9,7 +9,7 @@ msgstr ""
|
|||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-06-20 23:14+0300\n"
|
||||
"PO-Revision-Date: 2024-06-20 23:15+0300\n"
|
||||
"PO-Revision-Date: 2024-06-21 14:22+0300\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: lv_LV\n"
|
||||
|
|
@ -451,7 +451,7 @@ msgstr "Lejupielādē modeli"
|
|||
|
||||
#: buzz/widgets/model_download_progress_dialog.py:37
|
||||
msgid "remaining"
|
||||
msgstr "atlicis"
|
||||
msgstr "!"
|
||||
|
||||
#: buzz/widgets/menu_bar.py:38
|
||||
msgid "Import File..."
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ os.makedirs(model_root_dir, exist_ok=True)
|
|||
|
||||
logging.debug("Model root directory: %s", model_root_dir)
|
||||
|
||||
|
||||
class WhisperModelSize(str, enum.Enum):
|
||||
TINY = "tiny"
|
||||
BASE = "base"
|
||||
|
|
@ -215,9 +216,7 @@ def get_whisper_cpp_file_path(size: WhisperModelSize) -> str:
|
|||
|
||||
|
||||
def get_whisper_file_path(size: WhisperModelSize) -> str:
|
||||
root_dir = os.getenv(
|
||||
"XDG_CACHE_HOME", os.path.join(os.path.expanduser("~"), ".cache", "whisper")
|
||||
)
|
||||
root_dir = os.path.join(model_root_dir, "whisper")
|
||||
url = whisper._MODELS[size.value]
|
||||
return os.path.join(root_dir, os.path.basename(url))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue