collabora / WhisperLive

A nearly-live implementation of OpenAI's Whisper.
MIT License
2.1k stars 286 forks source link

faster_whisper_custom_model_path problem in windows #214

Closed wilsonlv closed 6 months ago

wilsonlv commented 6 months ago
from whisper_live.server import TranscriptionServer

application_path = None
if hasattr(sys, 'frozen'):
    application_path = os.path.dirname(sys.executable)
elif __file__:
    application_path = os.path.dirname(os.path.abspath(__file__))

faster_whisper_custom_model_path = os.path.join(application_path, "medium.bin")
# faster_whisper_custom_model_path = ’C:\\develop\\workspace\\ai\\hello-whisperlive\\src\\medium.bin‘

server = TranscriptionServer()
server.run("0.0.0.0", 9090,
           backend="faster_whisper",
           faster_whisper_custom_model_path=faster_whisper_custom_model_path)

Invalid model size 'C:\develop\workspace\ai\hello-whisperlive\src\medium.bin'


from whisper_live.server import TranscriptionServer

faster_whisper_custom_model_path = 'C:\develop\workspace\ai\hello-whisperlive\src\medium.bin'

server = TranscriptionServer()
server.run("0.0.0.0", 9090,
           backend="faster_whisper",
           faster_whisper_custom_model_path=faster_whisper_custom_model_path)

it will download from huggingface_hub, not use the custom path