Check that WhisperCpp executable is available.
()
| 138 | |
| 139 | |
| 140 | def 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 | |
| 160 | def validate_transcribe(config: dict) -> bool: |
no outgoing calls
no test coverage detected