Whisper‑Small‑HI is a 200 MB open‑source speech‑to‑text model that runs on a single CPU core or a low‑end GPU, delivering near‑real‑time transcription quality that rivals paid cloud APIs. This guide walks through its lightweight architecture, benchmark results, deployment steps, and practical use‑cases for edge devices.
Use pip to install the Whisper‑Small‑HI library directly from PyPI or the Hugging Face repo.
pip install whisper-small-hi
Import the model and load the default 200 MB checkpoint. The API mirrors the original Whisper interface.
import whisper_small_hi as w
model = w.load("small-hi")
Provide a path to a WAV file; the model will output the transcription text and timestamps.
result = model.transcribe("speech.wav")
print(result['text'])
Measure inference time on your target hardware to confirm real‑time capability. Use time.perf_counter or the provided benchmark script.
import time
start=time.perf_counter()
model.transcribe("speech.wav")
print("Elapsed:",time.perf_counter()-start)
Copy the model files to a Raspberry Pi or similar device, ensure the Python runtime is installed, and run the transcription script. For continuous use, wrap the call in a lightweight Flask or FastAPI micro‑service.
from flask import Flask, request
app=Flask(__name__)
@app.route('/transcribe',methods=['POST'])
def transcribe():
audio=request.files['file']
text=model.transcribe(audio.read())['text']
return text
if __name__=='__main__':
app.run(host='0.0.0.0',port=5000)
It matches the quality of the small Whisper model on the same language set, with only a few word errors per minute, but may lag slightly on highly accented speech or low‑resource languages.
Yes, by packaging the Python runtime with the model or converting it to TensorFlow Lite/ONNX, you can run it on mobile devices, though performance depends on the device’s CPU/GPU.
The repository is released under the Apache‑2.0 license, allowing commercial use, modification, and redistribution.
A quad‑core CPU with 8 GB RAM for CPU‑only inference, or a 4 GB GPU (e.g., NVIDIA Jetson Nano) for >1× real‑time speed.
Fine‑tune the encoder‑decoder on a dataset of the target language using the provided training scripts, then save the checkpoint and load it with the same API.