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()