Views
No views yet
whisper-large-v3 via
faster-whisper / CTranslate2 instead of the HF transformers pipeline. It is a
protocol drop-in for ../endpoint-whisper: same
POST {"inputs": <base64 audio>} → {"text": ...}, so src/transcribers/whisper.py
(device: api) needs no change — only the endpoint URL differs.endpoint-whisper/ serves both whisper-large-v3 and the monolingual WAXAL
whisper-small-waxal-* fine-tunes, which are in HF transformers format.
CTranslate2 needs its own converted format, so we can't swap the shared handler
without breaking the WAXAL endpoints. zh runs on its own endpoint (per-language
WHISPER_LANG, see whisper.py:_api_url_for), so it gets its own CT2 handler and
the WAXAL endpoints stay on the transformers handler + its tokenizer patch.transformers pipeline on the
same GPU, at no extra hourly cost — a bigger win than moving A10G→A100 (which
buys ~2× for 3–4× the cost). It also cuts VRAM enough that a T4 comfortably
serves it (the deploy default).| var | default | notes |
|---|---|---|
WHISPER_MODEL | Systran/faster-whisper-large-v3 | prebuilt CT2 build (no conversion) |
WHISPER_LANG | (unset = auto-detect) | force the language, e.g. zh |
CT2_COMPUTE_TYPE | float16 | int8_float16 = faster + ~½ VRAM (validate first) |
CT2_BEAM_SIZE | 5 | Whisper decode beam |
CT2_VAD | 1 (deploy default 0) | VAD drops non-speech before decode; off after it dropped real speech in the zh eval |
CT2_NO_SPEECH_THRESHOLD | (lib default) | none = never drop a segment as "no speech" |
CT2_LOG_PROB_THRESHOLD | (lib default) | none = keep low-confidence segments |
CT2_COMPRESSION_RATIO_THRESHOLD | (lib default) | float or none |
CT2_CONDITION_ON_PREVIOUS_TEXT | 1 | 0 = decode each window independently (drift/drop guard) |
CT2_DEVICE | cuda | falls back to CPU int8 if CUDA libs missing |
deploy_whisper_ct2_endpoint.py --drop-fix sets the
recommended combo (no_speech+log_prob disabled, condition_on_previous_text off)
in one recreate.
| ASR_MAX_DECODED_SAMPLES / ASR_MAX_ENCODED_BYTES | — | request bounds (_audio_io.py), raise for 2h shows |_audio_io.py is a byte-identical copy of the other endpoint*/ copies (CI
hash-diff guards it) — keep it in sync; don't edit only this one.python scripts/deploy_whisper_ct2_endpoint.py --repo <YOU>/whisper-ct2-zh-endpointchannels.taiwan.yaml whisper.api_urls.zh (replacing the
transformers endpoint) once status=running. Roll back by pasting the old URL —
nothing else changes.libcudnn* /
libcublas*, add the pip cuDNN wheels to requirements.txt:nvidia-cudnn-cu12
nvidia-cublas-cu12LD_LIBRARY_PATH variant if the wheels
alone don't resolve it.)zh→whisper:1# fill in whisper-ct2-zh-api.api_url in scripts/asr_eval.sources.yaml first
2python scripts/asr_eval.py generate --lang zh --sources whisper-large-api,whisper-ct2-zh-api
3python scripts/asr_eval.py judge --lang zh
4python scripts/asr_eval.py report --lang zh