SkyOSFullCore / audio_core.py
sky-meilin's picture
Update audio_core.py
1fa7388 verified
Raw
History Blame Contribute Delete
378 Bytes
import os
import subprocess
import sys
from typing import Dict, Any
# Erzwingt die Installation der Pakete direkt im laufenden Container
try:
import whisper
except ImportError:
subprocess.check_call([sys.executable, "-m", "pip", "install", "openai-whisper", "torch"])
import whisper
try:
_model = whisper.load_model("base")
except Exception:
_model = None