chore/ 删除无用文件
This commit is contained in:
@@ -7,7 +7,14 @@ import tempfile
|
||||
logger = get_logger(__name__)
|
||||
|
||||
_DEFAULT_CACHE_DIR = os.path.normpath(
|
||||
os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "..", "models", "whisper")
|
||||
os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
"..",
|
||||
"..",
|
||||
"..",
|
||||
"models",
|
||||
"whisper",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -36,6 +43,7 @@ class WhisperASRProvider:
|
||||
if device == "auto":
|
||||
try:
|
||||
import torch # type: ignore[import-untyped]
|
||||
|
||||
device = "cuda" if torch.cuda.is_available() else "cpu"
|
||||
except ImportError:
|
||||
device = "cpu"
|
||||
|
||||
Reference in New Issue
Block a user