Open BBC-Esq opened 3 months ago
The goal is to be able to specify the base directory in which all files downloaded from huggingface are downloaded instead of the default cache directory.
Some sample code might look like this:
from pathlib import Path current_directory = Path(__file__).parent CACHE_DIR = current_directory / "models" / "tts" CACHE_DIR.mkdir(parents=True, exist_ok=True) class BaseAudio: . . . class WhisperSpeechAudio(BaseAudio): def __init__(self): super().__init__() self.initialize_model() def initialize_model(self): self.pipe = Pipeline( s2a_ref='collabora/whisperspeech:s2a-q4-base-en+pl.model', t2s_ref='collabora/whisperspeech:t2s-base-en+pl.model', cache_dir=CACHE_DIR ) . . .
The goal is to be able to specify the base directory in which all files downloaded from huggingface are downloaded instead of the default cache directory.
Some sample code might look like this: