{"id":28116,"library":"pywhispercpp","title":"pywhispercpp","description":"Python bindings for whisper.cpp, providing fast and easy-to-use speech-to-text with support for various backends (CPU, CUDA, Vulkan, OpenVINO, CoreML). Current version 1.4.1, active development with monthly releases.","status":"active","version":"1.4.1","language":"python","source_language":"en","source_url":"https://github.com/absadiki/pywhispercpp","tags":["whisper","speech-to-text","cpp","bindings"],"install":[{"cmd":"pip install pywhispercpp","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"Model","correct":"from pywhispercpp import Model"},{"note":"","wrong":"","symbol":"Segment","correct":"from pywhispercpp import Segment"}],"quickstart":{"code":"from pywhispercpp import Model\n\nmodel = Model('ggml-base.en.bin', n_threads=4)\nsegments = model.transcribe('audio.wav')\nfor segment in segments:\n    print(f\"[{segment.t0/100:.2f}s -> {segment.t1/100:.2f}s] {segment.text}\")","lang":"python","description":"Basic transcription example."},"warnings":[{"fix":"Ensure model_path is a str in newer versions.","message":"In v1.1.3, the model path must be a string (not bytes) to avoid segmentation faults.","severity":"breaking","affected_versions":"<=1.1.2"},{"fix":"Use locks if calling from multiple threads.","message":"GIL is released during inference; do not call model methods from multiple threads without proper synchronization.","severity":"gotcha","affected_versions":">=1.3.2"},{"fix":"Use `from pywhispercpp import Model` instead.","message":"The old import path `import whispercpp` is deprecated and may be removed in future versions.","severity":"deprecated","affected_versions":">=1.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use a string path: Model('ggml-base.en.bin'). Ensure the model file exists and is the correct format.","cause":"model_path was passed as bytes in older versions, or model file is missing/corrupt.","error":"Segmentation fault (core dumped) when creating Model"},{"fix":"Install pywhispercpp and use: from pywhispercpp import Model","cause":"Trying to import from the wrong module name.","error":"ImportError: cannot import name 'Model' from 'whispercpp'"},{"fix":"Download the model first (e.g., from Hugging Face) and provide the correct path.","cause":"Model file path incorrect or model not found.","error":"RuntimeError: whisper.cpp: failed to load model"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}