LinuxTypeless-ASR / download_models.py
yellow60852's picture
Upload download_models.py with huggingface_hub
c98619c verified
Raw
History Blame Contribute Delete
689 Bytes
import os
from huggingface_hub import snapshot_download
def main():
MODEL_CACHE_DIR = "/code/models"
os.makedirs(MODEL_CACHE_DIR, exist_ok=True)
print("Downloading SenseVoiceSmall model...")
snapshot_download(
repo_id="FunAudioLLM/SenseVoiceSmall",
local_dir=os.path.join(MODEL_CACHE_DIR, "SenseVoiceSmall"),
ignore_patterns=["*.onnx"]
)
print("Downloading FSMN-VAD model...")
snapshot_download(
repo_id="funasr/fsmn-vad",
local_dir=os.path.join(MODEL_CACHE_DIR, "fsmn-vad"),
ignore_patterns=["*.onnx"]
)
print("All models downloaded successfully.")
if __name__ == "__main__":
main()