WhisperLiveKit

QuentinFuxaApache-2.0活跃维护

本地跑实时语音转文字,带流式识别、说话人分离和翻译,还兼容 OpenAI/Deepgram 接口,适合自建低延迟转写服务。

Real-time, local speech-to-text with streaming ASR, speaker diarization, translation, and OpenAI/Deepgram-compatible APIs.

v0.2.27发布于 2026-11-07 18:36 UTC11,228star +7 / 7 天1,158fork同步于 2026-11-10 11:28 UTC

怎么上手

由 README 提炼,执行前请确认
pip install whisperlivekit
wlk --model base --language en
硬件要求按 README 说明

README 未给出具体显存要求;支持 CUDA、Apple Silicon(MLX/MPS)与 CPU 后端,可按需安装 cu129、cpu、mlx-whisper 等可选依赖。

纯 CPU 可运行支持 Apple Silicon需要 CUDA有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

自托管实时语音转写流水线,支持流式 ASR、说话人分离与翻译

本地跑实时语音转文字,带流式识别、说话人分离和翻译,还兼容 OpenAI/Deepgram 接口,适合自建低延迟转写服务。

核心能力

  • 用 AlignAtt 策略做流式增量转写,降低延迟
  • 支持实时说话人分离与 200 语种同传翻译
  • 提供 OpenAI 兼容 REST 与 Deepgram 兼容 WebSocket 接口
  • 内置 VAD 与多并发用户后端,空闲时降低开销
  • 命令行可转写文件并直接导出 SRT 字幕

容易踩的坑

翻译、MLX、FunASR、vLLM 等后端需额外安装对应 extra 依赖;首次运行需下载或拉取模型权重;默认服务端口为 8000,需与客户端地址一致。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.27
  1. v0.2.27最新正式版2026-11-07 · 2026-11-07 18:36 UTC

    Local MLX translation, bounded WebSocket sessions, and a security refresh of the locked dependencies.

    Added

    • Local sentence translation on Apple Silicon through mlx-lm (mlx-llm-mt extra: Hunyuan-MT, TranslateGemma), with shared model weights and per-session languages and buffers. (#422, thanks @clkao)
    • Simultaneous MLX translation with calibrated attention (AlignAtt commit policy), and the zh→en calibration for Hy-MT2 1.8B 8bit. (#423, #448, thanks @clkao)
    • Per-session decoder context: a context query option on the native and Deepgram-compatible WebSockets, and the OpenAI-compatible REST prompt field now conditions the decoder. (#424)
    • --max-concurrent-sessions (64 per worker by default) and --session-idle-timeout (60 s by default) for WebSocket sessions. Upgrades beyond the limit are refused with HTTP 403 before any decoder or FFmpeg process is created. (#465)

    Fixed

    • Sortformer inference no longer blocks the event loop. (#461, thanks @guhyun9454)
    • SimulStreaming reads the no-speech probability at the start-of-transcript token once the context buffer holds text. (#468, fixes #467 reported by @AuCourDe)
    • Closing a translation no longer waits behind the inference it needs to interrupt. (#445)
    • Final ASR output is no longer lost at the end of a stream, and decoder and diarization failures are reported to clients. (#440, #441)
    • Sessions requesting another language on non-Whisper backends no longer fail at construction. (#439)
    • Streaming queues are bounded, FFmpeg processes are reaped on disconnect, and failed requests no longer leave collector tasks running. (#432, #435)

    Maintenance and security

    • Locked dependencies refreshed with the October security fixes (certifi, urllib3, filelock, fsspec, msgpack, Pillow, PyJWT, aiohttp and others), plus AnyIO and HTTPX2. Remaining blocked upgrades are listed in docs/dependency-audit.md. (#466, #472)
    • Checkpoint loading is restricted to weights-only tensors. (#438)
    • The qwen3-vllm-metal extra no longer pins the vllm-metal GitHub wheel, which was blocking Dependabot. Install vllm-metal with its official installer, then install the extra into that environment. (#473)
    • Transport security documented for remote AlignAtt translation servers. (#469)
    • Audio input and translation are separated from session orchestration. (#436)
    • Benchmark reports are reproducible, keep failures, and pace audio without artificial EOF delays. (#437, #442, #443)
    • CI, Docker and dependency updates. (#429, #430, #433, #457, #458, #470, #471)

    New contributors

    • @clkao made their first contribution in #422.
    • @guhyun9454 made their first contribution in #461.

    Full changelog: https://github.com/QuentinFuxa/WhisperLiveKit/compare/v0.2.26...v0.2.27

  2. v0.2.262026-08-29 · 2026-08-29 16:00 UTC
    查看更新说明

    New ASR options, stronger diarization, and predictable Deepgram-compatible streaming.

    Added

    • NVIDIA Canary-1b-v2 backend (--backend canary) with native timestamps, 25 European languages, and optional automatic language detection. Install with the canary extra. (#387, thanks @wuxuedaifu)
    • Non-real-time transcription responses can now include diarization, duration, and real word timestamps. (#396, thanks @felixmr1)
    • Opt-in ASR call coalescing (--asr-coalesce-min-s) can trade update cadence for lower repeated encoder work. It remains disabled by default. (#391, thanks @Eoin-Houstoun)
    • Configurable pause segmentation and a tested maximum-speaker cap for Sortformer. (#414, #415)

    Fixed

    • Deepgram-compatible streams now preserve stable deltas, words, timestamps, speakers, punctuation, and causal event ordering; raw linear16, endpointing, UtteranceEnd, errors, and CloseStream are handled consistently. (#419)
    • Diarized transcripts are split at speaker turns instead of allowing a segment to straddle two speakers. (#407)
    • LocalAgreement consumes its pending buffer at end of input instead of losing the final deferred audio. (#411)

    Maintenance and security

    • Added manual PyPI Trusted Publishing with a protected GitHub environment and minimal OIDC permissions. (#417)
    • Hardened repository workflows and distribution builds, including a patched Setuptools floor. (#400, #416)
    • Refreshed Python dependency profiles and constrained Docker dependency updates. (#402, #406, #408, #420)
    • Added community governance and support templates. (#412)

    New contributors

    • @wuxuedaifu made their first contribution in #387.
    • @Eoin-Houstoun made their first contribution in #391.
    • @felixmr1 made their first contribution in #396.

    Full changelog: https://github.com/QuentinFuxa/WhisperLiveKit/compare/v0.2.25...v0.2.26

  3. v0.2.252026-08-01 · 2026-08-01 16:41 UTC
    查看更新说明

    A FunASR backend, and diarization unbroken for qwen3.

    Added

    • FunASR SenseVoiceSmall backend (--backend funasr): auto, Mandarin, Cantonese, English, Japanese and Korean on the LocalAgreement policy, with fail-closed timestamp validation and per-session language overrides. Install with the funasr extra. (#385, thanks @LauraGPT)
    • Published Docker images now carry SBOM attestations, and the provenance mode is pinned explicitly. (#390, thanks @kobihikri)

    Fixed

    • qwen3 backends with --diarization silently stopped emitting updates as soon as the first line was diarized: the qwen3 package's own token type lacked the helpers the alignment needs. Tokens are now normalized to WhisperLiveKit's ASRToken at the factory boundary. (#389, thanks @OookTheLibrarian)
    • Diarization span corruption in concatenate_diar_segments.
    • --language yue --buffer-trimming sentence crashed on a bare assert even though the sentence tokenizer supports Cantonese. (#392)
    • Invalid per-session parameters (such as an unsupported ?language=) now produce a structured error and close code 4400 on the WebSocket endpoints, and HTTP 400 on the REST endpoint, instead of an unexplained handshake failure. (#393)
    • wlk pull funasr and wlk rm funasr explain that funasr manages its own model cache instead of exiting 1 silently. (#394)
  4. v0.2.242026-07-11 · 2026-07-11 21:49 UTC
    查看更新说明

    Streaming LLM translation, refreshed benchmarks and loud failures.

    Added

    • AlignAtt translation backend (--translation-backend alignatt): streaming LLM translation through an Alignatt4LLM sidecar. The model drafts ahead over the unstable ASR tail and commits only target words whose attention lands on committed source words, so translations are append-only and released the instant the ASR commits. See docs/translation-alignatt.md.
    • Benchmark figures re-measured on an H100 with the current backends (the README scatter plots dated from March and misrepresented the qwen3 backends). Raw results in benchmarks/h100_scatter/.

    Fixed

    • mlx-whisper produced empty captions with torch >= 2.13 (#383, thanks @RobertBartelds-FleetEnergies).
    • The server now fails loudly when the ASR backend produces nothing: warmup errors abort startup with the cause, and a watchdog logs an explicit error if audio flows but no text is ever produced.
  5. v0.2.232026-07-09 · 2026-07-09 08:02 UTC
    查看更新说明

    Qwen3-ASR backends, latency work and bug fixes.

    Added

    • Qwen3-ASR backends: qwen3-streaming (PyTorch, CUDA/MPS/CPU), qwen3-vllm (CUDA), qwen3-vllm-metal (Apple Silicon), via the new qwen3-asr-causal package. The causal streaming mode uses 3x less compute, at constant cost per audio second (English only).
    • Prebuilt Docker images on GHCR: ghcr.io/quentinfuxa/whisperlivekit.
    • Optional API token auth (--api-token).
    • Per-session language and translation target via WebSocket query params.

    Fixed

    • mode=full sessions no longer lose early lines after 5 minutes (#372).
    • REST transcription of long files no longer times out silently (#374).
    • qwen3-vllm word timestamps and CJK spacing (#375, thanks @samx81).
    • Sortformer memory growth on long sessions (#349).
    • Local Sortformer weights: --sortformer-model-path (#378, thanks @felixmr1).

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Powered by Leading Research:

    Why not just run a simple Whisper model on every audio batch? Whisper is designed for complete utterances, not real-time chunks. Processing small segments loses context, cuts off words mid-syllable, and produces poor transcription. WhisperLiveKit uses state-of-the-art simultaneous speech research for intelligent buffering and incremental processing.

    Architecture

    The backend supports multiple concurrent users. Voice Activity Detection reduces overhead when no voice is detected.

    Installation & Quick Start

    pip install whisperlivekit
    
    Quick Start
    
    # Start the server — open http://localhost:8000 and start talking
    wlk --model base --language en
    
    
    # Auto-pull model and start server
    wlk run whisper:tiny
    
    # Transcribe a file (no server needed)
    wlk transcribe meeting.wav
    
    # Generate subtitles
    wlk transcribe --format srt podcast.mp3 -o podcast.srt
    
    # Manage models
    wlk models                             # See what's installed
    wlk pull large-v3                      # Download a model
    wlk rm large-v3                        # Delete a model
    
    # Benchmark speed and accuracy
    wlk bench
    
    API Compatibility

    WhisperLiveKit exposes compatibility-oriented subsets of popular APIs:

    # OpenAI-compatible REST API
    curl http://localhost:8000/v1/audio/transcriptions -F [email protected]
    
    # Works with the OpenAI Python SDK
    client = OpenAI(base_url="http://localhost:8000/v1", api_key="unused")
    
    # Deepgram-compatible WebSocket
    # See docs/API.md for supported options and current SDK setup
    
    # Native WebSocket for real-time streaming
    ws://localhost:8000/asr
    

    Per-session WebSocket query parameters:

    paramexampleeffect
    language?language=frtranscription language for this session (one shared engine serves mixed-language sessions)
    target_language?target_language=detranslation target for this session (server must run with --target-language)
    context?context=WhisperLiveKit%2C+Qwen3-ASRterminology, names, or phrase-list text used to condition this session; supported by Whisper-family and SimulStreaming backends
    mode?mode=diffincremental snapshot/diff protocol instead of resending the full state (experimental, for integrators building their own client, see diff_protocol.py); the bundled web UI uses full
    token?token=...API token when the server runs with --api-token (also accepted as an Authorization: Bearer header)

    See docs/API.md for the complete API reference. For a native SwiftUI macOS client, see macos/WhisperLiveKitMac.

    • See here for the list of all available languages.
    • Check the troubleshooting guide for step-by-step fixes collected from recent GPU setup/env issues.
    • For HTTPS requirements, see the Parameters section for SSL configuration options.
    Optional Dependencies
    Featureuv syncpip install -e
    Apple Silicon MLX Whisper backenduv sync --extra mlx-whisperpip install -e ".[mlx-whisper]"
    FunASR SenseVoiceSmalluv sync --extra funasrpip install -e ".[funasr]"
    Voxtral (MLX backend, Apple Silicon)uv sync --extra voxtral-mlxpip install -e ".[voxtral-mlx]"
    CPU PyTorch stackuv sync --extra cpupip install -e ".[cpu]"
    CUDA 12.9 PyTorch stackuv sync --extra cu129pip install -e ".[cu129]"
    Translationuv sync --extra translationpip install -e ".[translation]"
    Sentence tokenizeruv sync --extra sentence_tokenizerpip install -e ".[sentence_tokenizer]"
    Voxtral (HF backend)uv sync --extra voxtral-hfpip install -e ".[voxtral-hf]"
    Qwen3-ASR vLLM (CUDA)uv sync --extra qwen3-vllmpip install -e ".[qwen3-vllm]"
    Qwen3-ASR streaming (HF, CUDA/MPS/CPU)uv sync --extra qwen3-streamingpip install -e ".[qwen3-streaming]"
    Qwen3-ASR vLLM Metal (Apple Silicon)Install vllm-metal with its official installer, activate ~/.venv-vllm-metal, then uv pip install -e ".[qwen3-vllm-metal]"Install vllm-metal with its official installer, activate ~/.venv-vllm-metal, then pip install -e ".[qwen3-vllm-metal]"
    Speaker diarization (Sortformer / NeMo 3)uv sync --extra diarization-sortformerpip install -e ".[diarization-sortformer]"
    [Not recommended] Speaker diarization with Diart (Python 3.11 or 3.12)uv sync --extra diarization-diartpip install -e ".[diarization-diart]"
    Canary-1b-v2 (NeMo, CUDA/CPU)uv sync --extra canarypip install -e ".[canary]"

    The Diart profile is limited to Python 3.11 and 3.12 because Diart 0.9.2 requires NumPy below 2. Use Sortformer for diarization on Python 3.13.

    Supported GPU profiles:

    # Profile A: Sortformer diarization
    uv sync --extra cu129 --extra diarization-sortformer
    
    # Profile B: Voxtral HF + translation
    uv sync --extra cu129 --extra voxtral-hf --extra translation
    
    # Profile C: Qwen3-ASR vLLM
    uv sync --extra qwen3-vllm
    

    qwen3-vllm uses vLLM's CUDA wheel stack and must be installed in a separate environment from cu129. Several heavy extras (voxtral-hf, qwen3-vllm-metal, and the vLLM stacks) intentionally conflict with one another and must be installed in separate environments; the authoritative list is [tool.uv].conflicts in pyproject.toml. The canary extra conflicts with voxtral-hf and qwen3-vllm-metal, but is compatible with diarization-sortformer (both pull nemo-toolkit[asr]).

    See Parameters & Configuration below on how to use them.

    Benchmarks use 6 minutes of public LibriVox audiobook recordings per language (30s + 60s + 120s + 180s), with ground truth from Project Gutenberg. The figures above were measured on an NVIDIA H100 (CUDA); the qwen3 causal tower is English-only, so it only appears on the English chart. Fully reproducible with python scripts/run_scatter_benchmark.py (the script picks a matching combo set on Apple Silicon: mlx-whisper and voxtral-mlx instead of the CUDA-only backends). Raw results: benchmarks/h100_scatter/. We are actively looking for benchmark results on other hardware (different NVIDIA GPUs, Apple Silicon chips, cloud instances). If you run the benchmarks on your machine, please share your results via an issue or PR!

    Use it to capture audio from web pages.

    Go to chrome-extension for instructions.

    Voxtral Backend

    WhisperLiveKit supports Voxtral Mini, a 4B-parameter speech model from Mistral AI that natively handles 100+ languages with automatic language detection. Whisper also supports auto-detection (--language auto), but Voxtral's per-chunk detection is more reliable and does not bias towards English.

    # Apple Silicon (native MLX, recommended)
    pip install -e ".[voxtral-mlx]"
    wlk --backend voxtral-mlx
    
    # Linux/GPU (HuggingFace transformers)
    pip install transformers torch
    wlk --backend voxtral
    

    Voxtral uses its own streaming policy and does not use LocalAgreement or SimulStreaming. See BENCHMARK.md for performance numbers.

    FunASR / SenseVoiceSmall

    Install the optional backend and run SenseVoiceSmall through WLK's existing LocalAgreement and VAC/VAD pipeline:

    pip install "whisperlivekit[funasr]"
    wlk --backend funasr --language auto
    

    Use a verified local model snapshot without executing remote model code:

    wlk --backend funasr --model_dir /path/to/SenseVoiceSmall --language yue
    

    The initial integration supports SenseVoiceSmall transcription in Mandarin (zh), Cantonese (yue), English (en), Japanese (ja), Korean (ko), and automatic detection. FunASR uses LocalAgreement only; selecting it with the default policy switches that policy automatically. It does not support --direct-english-translation, and WLK remains responsible for voice activity control rather than enabling FunASR's internal VAD. This compatibility contract does not cover arbitrary FunASR models. SenseVoiceSmall is distributed under its model license.

    Qwen3-ASR streaming (HF Transformers)

    qwen3-streaming runs Qwen3-ASR through plain HF Transformers with a bounded-recompute audio cache: the pretrained audio tower only re-encodes a local window (default 12 s) per update, cached audio embeddings are append-only, and text is committed with a stable-prefix rule. Works on CUDA, Apple Silicon (MPS) and CPU, no vLLM required.

    pip install -e ".[qwen3-streaming]"
    wlk --backend qwen3-streaming --language en
    

    Notes:

    • An explicit --language is required (automatic detection switches language mid-stream on accented audio).
    • Word timestamps are interpolated estimates (~1 s precision): good enough for lines and diarization alignment. Use --backend qwen3-vllm (ForcedAligner) when exact word timing matters.
    • Decode pacing self-adjusts to the hardware; on GPUs slower than real time the update cadence grows instead of lagging. Plan one realtime session per GPU.
    • Defaults encode the validated operating point (12 s left context, ~15 s segments); see --help for the --qwen3-streaming-* knobs.

    Causal mode (minimum compute per chunk). The windowed default re-encodes up to 12 s of audio on every update. The causal mode runs an append-only causal-KV encoder instead: each ~2 s audio block is encoded exactly once, memory is bounded (15 s window + sentence-boundary segment resets), and per-chunk compute is constant in stream length:

    wlk --backend qwen3-streaming --language en \
        --qwen3-streaming-audio-backend causal \
        --qwen3-streaming-tower-checkpoint qfuxa/qwen3-asr-0.6b-streaming
    

    The fine-tuned tower (qfuxa/qwen3-asr-0.6b-streaming) downloads automatically. The Qwen runtime, tests, experiments, benchmarks and figures now live in Qwen3-ASR-causal, which is consumed here through third_party/qwen3-asr-causal. WhisperLiveKit keeps only the backend wiring and CLI flags.

    Use causal mode for many concurrent streams, energy-constrained serving or unbounded session lengths; keep the windowed default for best accuracy. English only for now. Detailed WER/RTF results are in the Qwen3-ASR-causal repository.

    Experimental vLLM Metal causal mode. On Apple Silicon, qwen3-vllm-metal can also load the same causal tower and keep a rolling MLX decoder KV over the [prompt + audio] prefix. New audio blocks are encoded once, and the decoder replays only the new audio embeddings, prompt tail, and previous-hypothesis draft:

    wlk --backend qwen3-vllm-metal --language en \
        --qwen3-vllm-metal-audio-backend causal \
        --qwen3-vllm-metal-tower-checkpoint qfuxa/qwen3-asr-0.6b-streaming
    

    This path has passed local short-form smoke tests and is useful for comparing the Metal decoder path against the HF/MPS causal backend. It is still experimental; use qwen3-streaming causal for the validated production stack.

    Experimental vLLM CUDA causal mode. On NVIDIA GPUs, qwen3-vllm can load the same causal tower, use vLLM for the text decoder, and keep vLLM ForcedAligner timestamps:

    WLK_QWEN3_VLLM_LIVE_MULTIPROCESSING=1 \
    wlk --backend qwen3-vllm --language en \
        --qwen3-vllm-audio-backend causal \
        --qwen3-vllm-causal-decoder-backend vllm-live \
        --qwen3-vllm-tower-checkpoint qfuxa/qwen3-asr-0.6b-streaming
    

    The vllm-text backend is the conservative fallback when you do not want the live request-local append path; it still uses vLLM prefix caching but starts one text-decoder request per chunk. The append-kv and rolling names remain as compatibility aliases for the HF decoder path. Keep standard qwen3-vllm for best current accuracy until the causal quality gate is fixed.

    Canary Backend

    WhisperLiveKit supports NVIDIA Canary-1b-v2 via NeMo, a 1B-parameter model covering 25 European languages with native word-level timestamps. Automatic language detection uses NeMo's AmberNet language-ID model when --language auto is set; the detected language is locked in once enough audio has accumulated. Canary streams through the LocalAgreement policy.

    pip install -e ".[canary]"
    wlk --backend canary --language auto
    

    Notes:

    • Runs on CUDA and CPU. A GPU is strongly recommended: CPU works (see scripts/smoke_canary.py) but is slow for a 1B-parameter model. On Apple Silicon, NeMo's current restore path uses CPU; this backend does not enable MPS device placement. NeMo is a heavy dependency (torch, Lightning, and friends).
    • Supports WhisperLiveKit's Python range, 3.11 through 3.13. The canary extra intentionally selects nemo-toolkit[asr]>=3.0,<4, the NeMo line validated with Canary timestamps and Python 3.13.
    • Explicit --language <code> skips language detection entirely. Tune detection with --canary-lid-min-sec (minimum audio before detecting) and --canary-lid-min-conf (confidence threshold to lock in the detected language).
    • Canary-1b-v2 is distributed under CC-BY-4.0. The separate AmberNet language-ID model is downloaded from NVIDIA NGC; review its model-card terms for your deployment.

    Usage Examples

    Command-line Interface: Start the transcription server with various options:

    # Large model and translate from french to danish
    wlk --model large-v3 --language fr --target-language da
    
    # Diarization and server listening on */80
    wlk --host 0.0.0.0 --port 80 --model medium --diarization --language fr
    
    # Voxtral multilingual (auto-detects language)
    wlk --backend voxtral-mlx
    

    Python API Integration: Check basic_server for a more complete example of how to use the functions and classes.

    import asyncio
    from contextlib import asynccontextmanager
    
    from fastapi import FastAPI, WebSocket, WebSocketDisconnect
    from fastapi.responses import HTMLResponse
    
    from whisperlivekit import AudioProcessor, TranscriptionEngine, parse_args
    
    transcription_engine = None
    
    @asynccontextmanager
    async def lifespan(app: FastAPI):
        global transcription_engine
        transcription_engine = TranscriptionEngine(model_size="medium", diarization=True, lan="en")
        yield
    
    app = FastAPI(lifespan=lifespan)
    
    async def handle_websocket_results(websocket: WebSocket, results_generator):
        async for response in results_generator:
            await websocket.send_json(response)
        await websocket.send_json({"type": "ready_to_stop"})
    
    @app.websocket("/asr")
    async def websocket_endpoint(websocket: WebSocket):
        global transcription_engine
    
        # Create a new AudioProcessor for each connection, passing the shared engine
        audio_processor = AudioProcessor(transcription_engine=transcription_engine)    
        results_generator = await audio_processor.create_tasks()
        results_task = asyncio.create_task(handle_websocket_results(websocket, results_generator))
        await websocket.accept()
        while True:
            message = await websocket.receive_bytes()
            await audio_processor.process_audio(message)        
    

    Frontend Implementation: The package includes an HTML/JavaScript implementation here. You can also import it using from whisperlivekit import get_inline_ui_html & page = get_inline_ui_html()

    Parameters & Configuration

    ParameterDescriptionDefault
    --modelWhisper model size. List and recommandations heresmall
    --model-pathLocal .pt file/directory or Hugging Face repo ID containing the Whisper model. Overrides --model. Recommandations hereNone
    --languageList here. If you use auto, the model attempts to detect the language automatically, but it tends to bias towards English.auto
    --target-languageIf sets, translates using NLLW. 200 languages available. If you want to translate to english, you can also use --direct-english-translation. The STT model will try to directly output the translation.None
    --translation-backendnllb (in-process, CPU-friendly) or alignatt: streaming LLM translation through an Alignatt4LLM sidecar, with attention-gated append-only commits. See docs/translation-alignatt.md.nllb
    --diarizationEnable speaker identificationFalse
    --backend-policyStreaming strategy: 1/simulstreaming uses AlignAtt SimulStreaming, 2/localagreement uses the LocalAgreement policysimulstreaming
    --backendASR backend selector. auto picks MLX on macOS (if installed), otherwise Faster-Whisper, otherwise vanilla Whisper. Options: mlx-whisper, faster-whisper, whisper, openai-api (LocalAgreement only), funasr (SenseVoiceSmall, LocalAgreement only), voxtral-mlx (Apple Silicon), voxtral (HuggingFace), qwen3-vllm, qwen3-vllm-metal (Apple Silicon), qwen3-streaming (HuggingFace, CUDA/MPS/CPU), canary (NeMo, CUDA/CPU, LocalAgreement only)auto
    --pause-segmentation-secondsCreate a stable transcript boundary when a VAD pause is longer than this many seconds. Use 0 to disable pause-based segmentation.5.0
    --asr-coalesce-min-sDefer an ASR call until this much new audio has accrued. Trades update cadence for fewer encoder passes; use 0 to disable.0
    --no-vacDisable Voice Activity Controller. NOT ADVISEDFalse
    --no-vadDisable Voice Activity Detection. NOT ADVISEDFalse
    --warmup-fileAudio file path for model warmupjfk.wav
    --hostServer host addresslocalhost
    --portServer port8000
    --ssl-certfilePath to the SSL certificate file (for HTTPS support)None
    --ssl-keyfilePath to the SSL private key file (for HTTPS support)None
    --forwarded-allow-ipsIp or Ips allowed to reverse proxy the whisperlivekit-server. Supported types are IP Addresses (e.g. 127.0.0.1), IP Networks (e.g. 10.100.0.0/16), or Literals (e.g. /path/to/socket.sock)None
    --cors-originsComma-separated list of allowed CORS origins. Empty disables CORS; use * to allow all origins.empty
    --pcm-inputraw PCM (s16le) data is expected as input and FFmpeg will be bypassed. Frontend will use AudioWorklet instead of MediaRecorderFalse
    --lora-pathPath or Hugging Face repo ID for LoRA adapter weights (e.g., qfuxa/whisper-base-french-lora). Only works with native Whisper backend (--backend whisper)None
    Translation optionsDescriptionDefault
    --nllb-backendtransformers or ctranslate2transformers
    --nllb-size600M or 1.3B600M
    Diarization optionsDescriptionDefault
    --diarization-backenddiart or sortformersortformer
    --sortformer-model-pathPath to a local Sortformer .nemo file, a directory containing exactly one .nemo file, or a NeMo/Hugging Face model ID.None
    --sortformer-max-speakersDeclare a known upper bound from 1 to 4 for a Sortformer session. The first N speaker channels are retained in arrival order.all checkpoint channels (4 for the default model)
    --disable-punctuation-split[NOT FUNCTIONAL IN 0.2.15 / 0.2.16] Disable punctuation based splits. See #214False
    --segmentation-modelHugging Face model ID for Diart segmentation model. Available modelspyannote/segmentation-3.0
    --embedding-modelHugging Face model ID for Diart embedding model. Available modelspyannote/embedding

    --sortformer-max-speakers is an assertion about the audio, not speaker-count estimation. Use it only when the session is known to contain at most N speakers. If more speakers are present, later arrival-ordered channels are excluded and those speakers can be attributed to a retained label. The default preserves the full checkpoint output. Sortformer produces independent activity probabilities, including overlapping activity, but WhisperLiveKit currently resolves each diarization frame and ASR token to one speaker. This option does not add simultaneous-speaker output.

    Canary backend options (only used with --backend canary)DescriptionDefault
    --canary-modelHuggingFace/NGC model id or local .nemo pathnvidia/canary-1b-v2
    --canary-default-langFallback language used until auto-detection locks in. An explicit --language bypasses it.en
    --canary-lid-modelNeMo language-ID model used for --language autolangid_ambernet
    --canary-lid-min-secNon-negative minimum seconds of audio before attempting language detection2.0
    --canary-lid-min-confConfidence threshold in [0, 1] to lock in the detected language0.5
    SimulStreaming backend optionsDescriptionDefault
    --disable-fast-encoderDisable Faster Whisper or MLX Whisper backends for the encoder (if installed). Inference can be slower but helpful when GPU memory is limitedFalse
    --custom-alignment-headsUse your own alignment heads, useful when --model-dir is used. Use scripts/determine_alignment_heads.py to extract them.
    None
    --frame-thresholdAlignAtt frame threshold (lower = faster, higher = more accurate)25
    --beamsNumber of beams for beam search (1 = greedy decoding)1
    --decoderForce decoder type (beam or greedy)auto
    --audio-max-lenMaximum audio buffer length (seconds)30.0
    --audio-min-lenMinimum audio length to process (seconds)0.0
    --cif-ckpt-pathPath to CIF model for word boundary detectionNone
    --never-fireNever truncate incomplete wordsFalse
    --init-promptInitial prompt for the modelNone
    --static-init-promptStatic prompt that doesn't scrollNone
    --max-context-tokensMaximum context tokensDepends on model used, but usually 448.
    WhisperStreaming backend optionsDescriptionDefault
    --confidence-validationUse confidence scores for faster validationFalse
    --buffer_trimmingBuffer trimming strategy (sentence or segment)segment

    For diarization using Diart, you need to accept user conditions here for the pyannote/segmentation model, here for the pyannote/segmentation-3.0 model and here for the pyannote/embedding model. Then, login to HuggingFace: huggingface-cli login

    🚀 Deployment Guide

    To deploy WhisperLiveKit in production:

    1. Server Setup: Install production ASGI server & launch with multiple workers

      pip install uvicorn gunicorn
      gunicorn -k uvicorn.workers.UvicornWorker -w 4 your_app:app
      
    2. Frontend: Host your customized version of the html example & ensure WebSocket connection points correctly

    3. Nginx Configuration (recommended for production):

      server {
         listen 80;
         server_name your-domain.com;
          location / {
              proxy_pass http://localhost:8000;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_set_header Host $host;
      }}
      
    4. HTTPS Support: For secure deployments, use "wss://" instead of "ws://" in WebSocket URL

    🐋 Docker

    Deploy the application easily using Docker with GPU or CPU support.

    Prerequisites

    • Docker installed on your system
    • For GPU support: NVIDIA Docker runtime installed

    Quick Start

    With GPU acceleration (recommended):

    docker build -t wlk .
    docker run --gpus all -p 8000:8000 --name wlk wlk
    

    CPU only:

    docker build -f Dockerfile.cpu -t wlk --build-arg EXTRAS="cpu" .
    docker run -p 8000:8000 --name wlk wlk
    

    Advanced Usage

    Custom configuration:

    # Example with custom model and language
    docker run --gpus all -p 8000:8000 --name wlk wlk --model large-v3 --language fr
    

    Compose (recommended for cache + token wiring):

    # GPU Sortformer profile
    docker compose up --build wlk-gpu-sortformer
    
    # GPU Voxtral profile
    docker compose up --build wlk-gpu-voxtral
    
    # CPU service
    docker compose up --build wlk-cpu
    

    Memory Requirements

    • Large models: Ensure your Docker runtime has sufficient memory allocated
    Customization
    • --build-arg Options:
      • EXTRAS="cu129,diarization-sortformer" - GPU Sortformer profile extras.
      • EXTRAS="cu129,voxtral-hf,translation" - GPU Voxtral profile extras.
      • EXTRAS="cpu,diarization-diart,translation" - CPU profile extras.
      • Hugging Face cache + token are configured in compose.yml using a named volume and HF_TKN_FILE (default: ./token).

    Testing & Benchmarks

    # Quick benchmark with the CLI
    wlk bench
    wlk bench --backend faster-whisper --model large-v3
    wlk bench --languages all --json results.json
    
    # Install test dependencies for full suite
    pip install -e ".[test]"
    
    # Run unit tests (no model download required)
    pytest tests/ -v
    
    # Speed vs Accuracy scatter plot (all backends, compute-aware + unaware)
    python scripts/create_long_samples.py        # generate ~90s test samples (cached)
    python scripts/run_scatter_benchmark.py      # English (both modes)
    python scripts/run_scatter_benchmark.py --lang fr  # French
    

    Use Cases

    Capture discussions in real-time for meeting transcription, help hearing-impaired users follow conversations through accessibility tools, transcribe podcasts or videos automatically for content creation, transcribe support calls with speaker identification for customer service...