Skip to content

Commit

Permalink
Fixed pyannote env var import, now can use PYANNOTE_CACHE
Browse files Browse the repository at this point in the history
  • Loading branch information
mahenning committed Sep 10, 2024
1 parent 0ddb52c commit 5b56b54
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scraibe/misc.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import os
import yaml
from pyannote.audio.core.model import CACHE_DIR as PYANNOTE_CACHE_DIR
from argparse import Action
from ast import literal_eval

CACHE_DIR = os.getenv(
"AUTOT_CACHE",
os.path.expanduser("~/.cache/torch/models"),
)

if CACHE_DIR != PYANNOTE_CACHE_DIR:
os.environ["PYANNOTE_CACHE"] = os.path.join(CACHE_DIR, "pyannote")
os.environ["PYANNOTE_CACHE"] = os.path.join(CACHE_DIR, "pyannote")

WHISPER_DEFAULT_PATH = os.path.join(CACHE_DIR, "whisper")
PYANNOTE_DEFAULT_PATH = os.path.join(CACHE_DIR, "pyannote")
Expand Down

0 comments on commit 5b56b54

Please sign in to comment.