ASR API based on Whisper models. Supports offline and real-time transcription.
See the main README for API docs, Docker options, and serving modes. See ENV.md for all environment variables.
Approximate GPU VRAM peak usage by model size and backend:
| Model size | ct2/faster_whisper int8 | ct2/faster_whisper float16 | ct2/faster_whisper float32 | torch/whisper_timestamped float32 |
|---|---|---|---|---|
| tiny | 1.5G | 1.5G | 1.5G | 1.5G |
| distil-whisper/distil-large-v2 | 2.2G | 3.2G | 4.8G | 4.4G |
| large (large-v3, ...) | 2.8G | 4.8G | 8.2G | 10.4G |
| large-v3-turbo | 1.3G | 2.0G | 4.0G | 6.0G |
# CPU
docker pull lintoai/linto-stt-whisper
# GPU (includes CUDA runtime: cuBLAS + cuDNN for ctranslate2)
docker pull lintoai/linto-stt-whisper-gpu
or
# CPU
docker build -t linto-stt-whisper:latest --build-arg STT_ENGINE=whisper .
# GPU (~1.3GB larger, adds cuBLAS + cuDNN)
docker build -t linto-stt-whisper-gpu:latest --build-arg STT_ENGINE=whisper --build-arg GPU=1 .
HTTP file transcription:
docker run -p 8080:80 --rm \
-e SERVICE_MODE=http \
-e MODEL=large-v3 \
--env-file .env \
lintoai/linto-stt-whisper
WebSocket streaming:
docker run -p 8080:80 --rm \
-e SERVICE_MODE=websocket \
-e MODEL=large-v3-turbo \
--env-file .env \
lintoai/linto-stt-whisper
For GPU, use the GPU image with --gpus all -e DEVICE=cuda:
docker run -p 8080:80 --rm \
-e SERVICE_MODE=http \
-e MODEL=large-v3 \
-e DEVICE=cuda \
--gpus all \
--env-file .env \
lintoai/linto-stt-whisper-gpu
Mount cache with -v ~/.cache:/root/.cache to avoid re-downloads.
The model is downloaded on first transcription and cached. You can specify a model by size name, HuggingFace identifier, or local path.
Multi-lingual: tiny | base | small | medium | large-v1 | large-v2 | large-v3 | large-v3-turbo
English-only: tiny.en | base.en | small.en | medium.en
HuggingFace models like distil-whisper/distil-large-v2 are also supported (use the identifier directly or download locally).
If you used Whisper locally before, models are in ~/.cache/whisper.
The ALIGNMENT_MODEL variable for wav2vec word alignment is deprecated and no longer tested. We advise not to use it.
The LANGUAGE variable sets the default recognition language (can be overridden per request).
Values:
* — automatic language detectionfr, en, yue, ...fr-FR, en-US, yue-HK, ...French, English, Cantonese, ...Supported languages:
af(afrikaans), am(amharic), ar(arabic), as(assamese), az(azerbaijani),
ba(bashkir), be(belarusian), bg(bulgarian), bn(bengali), bo(tibetan), br(breton), bs(bosnian),
ca(catalan), cs(czech), cy(welsh), da(danish), de(german), el(greek), en(english), es(spanish),
et(estonian), eu(basque), fa(persian), fi(finnish), fo(faroese), fr(french), gl(galician),
gu(gujarati), ha(hausa), haw(hawaiian), he(hebrew), hi(hindi), hr(croatian), ht(haitian creole),
hu(hungarian), hy(armenian), id(indonesian), is(icelandic), it(italian), ja(japanese),
jw(javanese), ka(georgian), kk(kazakh), km(khmer), kn(kannada), ko(korean), la(latin),
lb(luxembourgish), ln(lingala), lo(lao), lt(lithuanian), lv(latvian), mg(malagasy), mi(maori),
mk(macedonian), ml(malayalam), mn(mongolian), mr(marathi), ms(malay), mt(maltese), my(myanmar),
ne(nepali), nl(dutch), nn(nynorsk), no(norwegian), oc(occitan), pa(punjabi), pl(polish),
ps(pashto), pt(portuguese), ro(romanian), ru(russian), sa(sanskrit), sd(sindhi), si(sinhala),
sk(slovak), sl(slovenian), sn(shona), so(somali), sq(albanian), sr(serbian), su(sundanese),
sv(swedish), sw(swahili), ta(tamil), te(telugu), tg(tajik), th(thai), tk(turkmen), tl(tagalog),
tr(turkish), tt(tatar), uk(ukrainian), ur(urdu), uz(uzbek), vi(vietnamese), yi(yiddish),
yo(yoruba), zh(chinese).
Model large-v3 and derivatives also support yue(cantonese).
We recommend running streaming on GPU with large-v3-turbo or smaller models (avoid large-v3 as it is very expensive). Using a VAD on the server side (e.g. silero) is recommended.
How to choose STREAMING_MIN_CHUNK_SIZE and STREAMING_BUFFER_TRIMMING_SEC:
STREAMING_MIN_CHUNK_SIZE=0.5 and STREAMING_BUFFER_TRIMMING_SEC around 10 (compromise between latency and accuracy). Range: 6 to 15 depending on hardware/model.STREAMING_MIN_CHUNK_SIZE=26. STREAMING_BUFFER_TRIMMING_SEC must be lower (6-12). Lower values reduce GPU usage but may degrade accuracy.AGPLv3 (see LICENSE).
Content type
Image
Digest
sha256:022c17e1e…
Size
1.5 GB
Last updated
27 days ago
docker pull lintoai/linto-stt-whisperPulls:
2,728
Last week