MCPcopy
hub / github.com/WEIFENG2333/VideoCaptioner / validate_whisper_cpp

Function validate_whisper_cpp

videocaptioner/cli/validators.py:140–157  ·  view source on GitHub ↗

Check that WhisperCpp executable is available.

()

Source from the content-addressed store, hash-verified

138
139
140def validate_whisper_cpp() -> bool:
141 """Check that WhisperCpp executable is available."""
142 # Check common names for whisper.cpp binary
143 names = ["whisper-cpp", "whisper", "whisper-cpp-main"]
144 if not any(shutil.which(n) for n in names):
145 # Also check project's bin directory
146 try:
147 from videocaptioner.config import BIN_PATH
148 if not any((BIN_PATH / n).exists() for n in names):
149 output.error("WhisperCpp not found")
150 output.hint("Download from the GUI (Settings > WhisperCpp), or install manually.")
151 output.hint("See: https://github.com/ggerganov/whisper.cpp")
152 return False
153 except ImportError:
154 output.error("WhisperCpp not found on PATH")
155 output.hint("See: https://github.com/ggerganov/whisper.cpp")
156 return False
157 return True
158
159
160def validate_transcribe(config: dict) -> bool:

Callers 1

validate_transcribeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected