issue 371

model name is of form namespace/repo_name and not os path.
This commit is contained in:
Kiran Lonikar
2025-07-06 16:10:49 +05:30
committed by GitHub
parent 0f21c80ed8
commit 9954548075
+4 -3
View File
@@ -216,7 +216,8 @@ class TranscriptionServer:
try: try:
if self.backend.is_faster_whisper(): if self.backend.is_faster_whisper():
from whisper_live.backend.faster_whisper_backend import ServeClientFasterWhisper from whisper_live.backend.faster_whisper_backend import ServeClientFasterWhisper
if faster_whisper_custom_model_path is not None and os.path.exists(faster_whisper_custom_model_path): # model is of the form namespace/repo_name and not a filesystem path
if faster_whisper_custom_model_path is not None: # and os.path.exists(faster_whisper_custom_model_path):
logging.info(f"Using custom model {faster_whisper_custom_model_path}") logging.info(f"Using custom model {faster_whisper_custom_model_path}")
options["model"] = faster_whisper_custom_model_path options["model"] = faster_whisper_custom_model_path
client = ServeClientFasterWhisper( client = ServeClientFasterWhisper(
@@ -380,8 +381,8 @@ class TranscriptionServer:
port (int): The port number to bind the server. port (int): The port number to bind the server.
""" """
self.cache_path = cache_path self.cache_path = cache_path
if faster_whisper_custom_model_path is not None and not os.path.exists(faster_whisper_custom_model_path): #if faster_whisper_custom_model_path is not None and not os.path.exists(faster_whisper_custom_model_path):
raise ValueError(f"Custom faster_whisper model '{faster_whisper_custom_model_path}' is not a valid path.") # raise ValueError(f"Custom faster_whisper model '{faster_whisper_custom_model_path}' is not a valid path.")
if whisper_tensorrt_path is not None and not os.path.exists(whisper_tensorrt_path): if whisper_tensorrt_path is not None and not os.path.exists(whisper_tensorrt_path):
raise ValueError(f"TensorRT model '{whisper_tensorrt_path}' is not a valid path.") raise ValueError(f"TensorRT model '{whisper_tensorrt_path}' is not a valid path.")
if single_model: if single_model: