需先安装 PortAudio 系统依赖,否则麦克风输入不可用;TensorRT 后端须先按 TensorRT_whisper 文档构建引擎,且推荐用 Docker;说话人分离需额外 pip install pyannote.audio,未装则自动跳过;默认端口 9090,客户端需与服务端端口一致。

WhisperLive
collaboraMIT活跃维护把 OpenAI Whisper 做成近实时的语音转文字服务,支持 TensorRT、OpenVINO、ROCm 等硬件加速,适合直播字幕和听写场景。
A nearly-live implementation of OpenAI's Whisper.
bash scripts/setup.sh
pip install whisper-live
python3 run_server.py --port 9090 --backend faster_whisperREADME 未给出具体显存要求;TensorRT 后端需 NVIDIA GPU 并预先构建引擎,OpenVINO 后端面向 Intel CPU、iGPU 和 dGPU,faster_whisper 支持 AMD ROCm。
基于 OpenAI Whisper 的准实时语音转写服务,支持麦克风、音频文件与流媒体输入
把 OpenAI Whisper 做成近实时的语音转文字服务,支持 TensorRT、OpenVINO、ROCm 等硬件加速,适合直播字幕和听写场景。
核心能力
- 服务端支持 faster_whisper、TensorRT、OpenVINO 三种后端
- 通过 WebSocket 服务端加客户端实现近实时转写
- 支持词级时间戳与置信度输出
- 支持热词提升专有名词识别率
- 可选 pyannote 说话人分离与批量推理
容易踩的坑
- v0.10.0最新正式版2026-09-07 · 2026-09-07 09:03 UTC
What's Changed
- fix: support uint8 websocket audio format by @nightcityblade in https://github.com/collabora/WhisperLive/pull/507
- Support known speaker hints in REST API by @boxerab in https://github.com/collabora/WhisperLive/pull/506
- chrome extension: point server to Modal service by @boxerab in https://github.com/collabora/WhisperLive/pull/509
- docs: clarify iOS project setup by @nightcityblade in https://github.com/collabora/WhisperLive/pull/515
- Fix batch inference by @makaveli10 in https://github.com/collabora/WhisperLive/pull/511
- docs: add macOS OpenMP workaround by @nightcityblade in https://github.com/collabora/WhisperLive/pull/510
- Make install instructions clearer by @SuperCowProducts in https://github.com/collabora/WhisperLive/pull/513
- Fix
setup.shon Fedora by @SuperCowProducts in https://github.com/collabora/WhisperLive/pull/512 - Make initial_prompt accessible from the client (flat params; supersedes #283) by @boxerab in https://github.com/collabora/WhisperLive/pull/518
- Fix idle-client busy-wait before first audio frame by @dmaier-ef in https://github.com/collabora/WhisperLive/pull/517
- fix: improve subtitle readability by @nightcityblade in https://github.com/collabora/WhisperLive/pull/516
- fix: allow NumPy 2 for pyannote audio by @nightcityblade in https://github.com/collabora/WhisperLive/pull/524
- Add AMD ROCm GPU support for faster_whisper backend by @Kaihui-AMD in https://github.com/collabora/WhisperLive/pull/523
- Add StreamingTranscriptionClient for streaming from any source by @Kokkini in https://github.com/collabora/WhisperLive/pull/480
- feat: return completed transcript from client by @nightcityblade in https://github.com/collabora/WhisperLive/pull/528
- fix: honor display_segments when printing the transcript by @Dhruv-kys in https://github.com/collabora/WhisperLive/pull/531
- fix: propagate WebSocket send errors by @nightcityblade in https://github.com/collabora/WhisperLive/pull/527
- fix: clear scrollback when refreshing transcript by @makaveli10 in https://github.com/collabora/WhisperLive/pull/530
- fix: correct WebSocket authentication callback by @nightcityblade in https://github.com/collabora/WhisperLive/pull/533
- rest health, model selection, language metadata, audio preprocessor hook by @boxerab in https://github.com/collabora/WhisperLive/pull/536
- Revert "rest health, model selection, language metadata, audio preprocessor hook" by @makaveli10 in https://github.com/collabora/WhisperLive/pull/539
- batch inference fixes and transcript_finalizer hook by @boxerab in https://github.com/collabora/WhisperLive/pull/535
- rest health, model selection, language metadata, audio preprocessor hook by @boxerab in https://github.com/collabora/WhisperLive/pull/540
- client reconnect, known_speakers, websocket auth by @boxerab in https://github.com/collabora/WhisperLive/pull/541
- Add Aavaaz section to README by @makaveli10 in https://github.com/collabora/WhisperLive/pull/538
- raise pip timeout in install smoke test by @boxerab in https://github.com/collabora/WhisperLive/pull/542
New Contributors
- @SuperCowProducts made their first contribution in https://github.com/collabora/WhisperLive/pull/513
- @dmaier-ef made their first contribution in https://github.com/collabora/WhisperLive/pull/517
- @Kaihui-AMD made their first contribution in https://github.com/collabora/WhisperLive/pull/523
- @Kokkini made their first contribution in https://github.com/collabora/WhisperLive/pull/480
- @Dhruv-kys made their first contribution in https://github.com/collabora/WhisperLive/pull/531
Full Changelog: https://github.com/collabora/WhisperLive/compare/v0.9.0...v0.10.0
- v0.9.02026-06-02 · 2026-06-02 06:25 UTC
查看更新说明
What's Changed
- fix: render transcript text safely in browser extensions by @nightcityblade in https://github.com/collabora/WhisperLive/pull/435
- CI: expand test suite coverage by @boxerab in https://github.com/collabora/WhisperLive/pull/436
- audio: add support for raw pcm input via server flag by @boxerab in https://github.com/collabora/WhisperLive/pull/437
- Add thread safety to client manager with threading lock by @boxerab in https://github.com/collabora/WhisperLive/pull/438
- Bound transcript memory and translation queue size by @boxerab in https://github.com/collabora/WhisperLive/pull/439
- Validate server parameters on startup by @boxerab in https://github.com/collabora/WhisperLive/pull/440
- Avoid clear screen shell injection by using ANSI escape codes by @boxerab in https://github.com/collabora/WhisperLive/pull/441
- Add custom vocabulary / hotwords support by @boxerab in https://github.com/collabora/WhisperLive/pull/489
- feat: add Prometheus metrics instrumentation by @boxerab in https://github.com/collabora/WhisperLive/pull/492
- Add real-time speaker diarization support by @boxerab in https://github.com/collabora/WhisperLive/pull/490
- Document all new features in README by @boxerab in https://github.com/collabora/WhisperLive/pull/491
- Add word-level timestamps and confidence scores by @boxerab in https://github.com/collabora/WhisperLive/pull/488
- feat: add segment_post_processor hook for external plugins by @boxerab in https://github.com/collabora/WhisperLive/pull/487
- feat: add SSE streaming for REST transcription endpoint by @boxerab in https://github.com/collabora/WhisperLive/pull/452
- docs: fix setup instructions reported in #405 by @nightcityblade in https://github.com/collabora/WhisperLive/pull/434
- Clarify --translate vs --enable_translation CLI flags by @boxerab in https://github.com/collabora/WhisperLive/pull/442
- Extract hardcoded buffer constants into class attributes by @boxerab in https://github.com/collabora/WhisperLive/pull/443
- Add reconnect logic to WebSocket client by @boxerab in https://github.com/collabora/WhisperLive/pull/444
- Improve REST API unsupported param warnings by @boxerab in https://github.com/collabora/WhisperLive/pull/445
- Add optional API key auth and rate limiting for REST API by @boxerab in https://github.com/collabora/WhisperLive/pull/446
- Add WebSocket authentication via api_key by @boxerab in https://github.com/collabora/WhisperLive/pull/449
- fix: add av to package requirements by @nightcityblade in https://github.com/collabora/WhisperLive/pull/497
- fix: make caption overlay line count configurable by @nightcityblade in https://github.com/collabora/WhisperLive/pull/494
- fix: support Python 3.13 server installs by @nightcityblade in https://github.com/collabora/WhisperLive/pull/484
- test: add clean virtualenv install smoke test by @nightcityblade in https://github.com/collabora/WhisperLive/pull/482
Full Changelog: https://github.com/collabora/WhisperLive/compare/v0.8.0...v0.9.0
- v0.8.02026-03-17 · 2026-03-17 09:38 UTC
查看更新说明
What's Changed
- make setup.sh to work on macos by @adamsz-lume in https://github.com/collabora/WhisperLive/pull/379
- Add hi transcription video; add blog post section by @makaveli10 in https://github.com/collabora/WhisperLive/pull/381
- Auto convert hf custom whisper to ct2(faster-whisper) by @makaveli10 in https://github.com/collabora/WhisperLive/pull/378
- Add iOS client for WhisperLive (Audio-Transcription-iOS) by @ParkMazorika in https://github.com/collabora/WhisperLive/pull/382
- Add srt download opt browser ext by @makaveli10 in https://github.com/collabora/WhisperLive/pull/385
- issue 371 by @klonikar in https://github.com/collabora/WhisperLive/pull/384
- Change max_clients max_connection_time from server only by @makaveli10 in https://github.com/collabora/WhisperLive/pull/387
- Integrate live translation by @makaveli10 in https://github.com/collabora/WhisperLive/pull/391
- fix(run_server.py): help text for max_connection_time argument by @locnnil in https://github.com/collabora/WhisperLive/pull/397
- feat: support HuggingFace model IDs for faster_whisper_custom_model_path by @makaveli10 in https://github.com/collabora/WhisperLive/pull/412
- Add support for new REST API matching OpenAI transcription API by @boxerab in https://github.com/collabora/WhisperLive/pull/414
- README.md: add instructions for running client by @JenySadadia in https://github.com/collabora/WhisperLive/pull/415
- Enable timestamps for transcripted text by @JenySadadia in https://github.com/collabora/WhisperLive/pull/418
- feat: update to support faster whisper 1.2.0 by @AlexStansfield in https://github.com/collabora/WhisperLive/pull/398
- Bump openai-whisper version to 20250625 by @makaveli10 in https://github.com/collabora/WhisperLive/pull/419
- Add cross-client GPU batch inference for faster_whisper backend by @ianwh02 in https://github.com/collabora/WhisperLive/pull/422
- Fix NoneType crash in _process_single when VAD filters all audio by @ianwh02 in https://github.com/collabora/WhisperLive/pull/427
- feat: make display_segments configurable in Client/TranscriptionClient by @nightcityblade in https://github.com/collabora/WhisperLive/pull/425
- Expose version in package root and update dependencies in setup.py by @makaveli10 in https://github.com/collabora/WhisperLive/pull/429
- Fix crash when no --files provided; use microphone input instead by @makaveli10 in https://github.com/collabora/WhisperLive/pull/430
New Contributors
- @adamsz-lume made their first contribution in https://github.com/collabora/WhisperLive/pull/379
- @ParkMazorika made their first contribution in https://github.com/collabora/WhisperLive/pull/382
- @klonikar made their first contribution in https://github.com/collabora/WhisperLive/pull/384
- @locnnil made their first contribution in https://github.com/collabora/WhisperLive/pull/397
- @boxerab made their first contribution in https://github.com/collabora/WhisperLive/pull/414
- @JenySadadia made their first contribution in https://github.com/collabora/WhisperLive/pull/415
- @AlexStansfield made their first contribution in https://github.com/collabora/WhisperLive/pull/398
- @ianwh02 made their first contribution in https://github.com/collabora/WhisperLive/pull/422
- @nightcityblade made their first contribution in https://github.com/collabora/WhisperLive/pull/425
Full Changelog: https://github.com/collabora/WhisperLive/compare/v0.7.1...v0.8.0
- v0.7.12025-05-15 · 2025-05-15 04:56 UTC
查看更新说明
What's Changed
- Integrate openvino by @makaveli10 in https://github.com/collabora/WhisperLive/pull/348
- Fix typo in setup.py by @Perseus14 in https://github.com/collabora/WhisperLive/pull/353
- Remove clip_audio from faster_whisper backend by @makaveli10 in https://github.com/collabora/WhisperLive/pull/354
- Remove blank segment feature by @makaveli10 in https://github.com/collabora/WhisperLive/pull/359
- Resolve daemon warnings for threading methods by @emmanuel-ferdman in https://github.com/collabora/WhisperLive/pull/366
- Upgrade tensorrt_llm to v0.18.2 by @makaveli10 in https://github.com/collabora/WhisperLive/pull/368
- Add possibility to configure more parameters by @giubots in https://github.com/collabora/WhisperLive/pull/367
- Add: support for secure WebSocket (WSS) connections by @rover0811 in https://github.com/collabora/WhisperLive/pull/373
- Add transcription callback to Client for handling transcription results by @xXLosKrachosXx in https://github.com/collabora/WhisperLive/pull/374
- Update tensorrt_llm docker setup by @makaveli10 in https://github.com/collabora/WhisperLive/pull/375
- Add transcription callback parameter to TranscriptionClient #361 by @xXLosKrachosXx in https://github.com/collabora/WhisperLive/pull/376
Full Changelog: https://github.com/collabora/WhisperLive/compare/v0.6.3...v0.7.1
- v0.6.32025-02-26 · 2025-02-26 14:12 UTC
查看更新说明
What's Changed
- Fix setup.py onnxruntime version for py312 pypi installation support by @makaveli10 in https://github.com/collabora/WhisperLive/pull/341
Full Changelog: https://github.com/collabora/WhisperLive/compare/v0.6.2...v0.6.3
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
WhisperLive
This project is a real-time transcription application that uses the OpenAI Whisper model to convert speech input into text output. It can be used to transcribe both live audio input from microphone and pre-recorded audio files.
- Installation
- Getting Started
- Running the Server
- Running the Client
- Advanced Features
- Streaming Client (Manual Audio Chunking)
- Browser Extensions
- Aavaaz
- Whisper Live Server in Docker
- Troubleshooting
- Future Work
- Blog Posts
- Contact
- Citations
Installation
- Install PortAudio (required system dependency for microphone input via PyAudio)
bash scripts/setup.sh
On Debian/Ubuntu this installs portaudio19-dev, on Fedora portaudio-devel, on macOS it uses Homebrew (portaudio).
- Install 3.12 venv (on Fedora
sudo dnf install -y python3.12 python3.12-pip)
python3.12 -m venv whisper_env
source whisper_env/bin/activate
- Install whisper-live from pip
pip install whisper-live
OpenAI REST interface
Server
python3 run_server.py --port 9090 --backend faster_whisper --max_clients 4 --max_connection_time 600 --enable_rest --cors-origins="http://localhost:8080,http://127.0.0.1:8080"
Client
python3 client_openai.py $AUDIO_FILE
Setting up NVIDIA/TensorRT-LLM for TensorRT backend
- Please follow TensorRT_whisper readme for setup of NVIDIA/TensorRT-LLM and for building Whisper-TensorRT engine.
Getting Started
The server supports 3 backends faster_whisper, tensorrt and openvino. If running tensorrt backend follow TensorRT_whisper readme
Running the Server
- Faster Whisper backend
python3 run_server.py --port 9090 \
--backend faster_whisper \
--max_clients 4 \
--max_connection_time 600
# running with custom model and cache_dir to save auto-converted ctranslate2 models
python3 run_server.py --port 9090 \
--backend faster_whisper \
--max_clients 4 \
--max_connection_time 600 \
-fw "/path/to/custom/faster/whisper/model" \
-c ~/.cache/whisper-live/
- TensorRT backend. Currently, we recommend to only use the docker setup for TensorRT. Follow TensorRT_whisper readme which works as expected. Make sure to build your TensorRT Engines before running the server with TensorRT backend.
# Run English only model
python3 run_server.py -p 9090 \
-b tensorrt \
-trt /home/TensorRT-LLM/examples/whisper/whisper_small_en \
--max_clients 4 \
--max_connection_time 600
# Run Multilingual model
python3 run_server.py -p 9090 \
-b tensorrt \
-trt /home/TensorRT-LLM/examples/whisper/whisper_small \
-m \
--max_clients 4 \
--max_connection_time 600
Note: The TensorRT backend uses a C++ session by default. If you experience issues (e.g. repeated
CrossAttentionMaskwarnings or crashes), add the--trt_py_sessionflag to use the Python session instead.
- Use
--max_clientsoption to restrict the number of clients the server should allow. Defaults to 4. - Use
--max_connection_timeoptions to limit connection time for a client in seconds. Defaults to 600. - WhisperLive now supports the OpenVINO backend for efficient inference on Intel CPUs, iGPU and dGPUs. Currently, we tested the models uploaded to huggingface by OpenVINO.
-
Docker Recommended: Running WhisperLive with OpenVINO inside Docker automatically enables GPU support (iGPU/dGPU) without requiring additional host setup.
-
Native (non-Docker) Use: If you prefer running outside Docker, ensure the Intel drivers and OpenVINO runtime are installed and properly configured on your system. Refer to the documentation for installing OpenVINO.
-
python3 run_server.py -p 9090 -b openvino
Setting up AMD ROCm for faster_whisper backend
- Please follow ROCm_whisper readme for setup of AMD ROCm GPU support with the CTranslate2 ROCm wheel.
Controlling OpenMP Threads
To control the number of threads used by OpenMP, you can set the OMP_NUM_THREADS environment variable. This is useful for managing CPU resources and ensuring consistent performance. If not specified, OMP_NUM_THREADS is set to 1 by default. You can change this by using the --omp_num_threads argument:
python3 run_server.py --port 9090 \
--backend faster_whisper \
--omp_num_threads 4
Single model mode
By default, when running the server without specifying a model, the server will instantiate a new whisper model for every client connection. This has the advantage, that the server can use different model sizes, based on the client's requested model size. On the other hand, it also means you have to wait for the model to be loaded upon client connection and you will have increased (V)RAM usage.
When serving a custom TensorRT model using the -trt or a custom faster_whisper model using the -fw option, the server will instead only instantiate the custom model once and then reuse it for all client connections.
If you don't want this, set --no_single_model.
Running the Client
Use the below command to run the client:
python3 run_client.py --files <audio-file-name>
This will connect to the localhost server running on port 9090 by default. Use flags --server and --port to use different configurations. The above command will transcribe audio file provided with --files flag.
Here are the details of client instance implemented in run_client.py script:
lang: Language of the input audio, applicable only if using a multilingual model.translate: If set toTruethen translate from any language toen.model: Whisper model size.use_vad: Whether to useVoice Activity Detectionon the server.save_output_recording: Set to True to save the microphone input as a.wavfile during live transcription. This option is helpful for recording sessions for later playback or analysis. Defaults toFalse.output_recording_filename: Specifies the.wavfile path where the microphone input will be saved ifsave_output_recordingis set toTrue.mute_audio_playback: Whether to mute audio playback when transcribing an audio file. Defaults to False.enable_translation: Start translation thread on the server (from any to any).target_language: Server translation thread's target translation language.
from whisper_live.client import TranscriptionClient
client = TranscriptionClient(
"localhost",
9090,
lang="en",
translate=False,
model="small", # also support hf_model => `Systran/faster-whisper-small`
use_vad=False,
save_output_recording=True, # Only used for microphone input, False by Default
output_recording_filename="./output_recording.wav", # Only used for microphone input
mute_audio_playback=False, # Only used for file input, False by Default
enable_translation=True,
target_language="hi",
initial_prompt=None, # Add context for the model, e.g. 'Jane Doe context'
)
It connects to the server running on localhost at port 9090. Using a multilingual model, language for the transcription will be automatically detected. You can also use the language option to specify the target language for the transcription, in this case, English ("en"). The translate option should be set to True if we want to translate from the source language to English and False if we want to transcribe in the source language.
- Transcribe an audio file:
client("tests/jfk.wav")
- To transcribe from microphone:
client()
- To transcribe from a RTSP stream:
client(rtsp_url="rtsp://admin:[email protected]/rtsp")
- To transcribe from a HLS stream:
client(hls_url="http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8")
Advanced Features
Word-Level Timestamps
Enable per-word timing and confidence scores in transcription segments:
client = TranscriptionClient(
"localhost", 9090,
word_timestamps=True,
)
When enabled, each segment in the WebSocket response includes a words array:
{
"segments": [{
"start": "0.000", "end": "2.500", "text": "Hello world",
"words": [
{"word": "Hello", "start": "0.000", "end": "0.800", "probability": 0.95},
{"word": " world", "start": "0.900", "end": "2.500", "probability": 0.88}
]
}]
}
Custom Vocabulary / Hotwords
Boost recognition of specific terms (product names, acronyms, domain jargon):
client = TranscriptionClient(
"localhost", 9090,
hotwords="WhisperLive,TensorRT,OpenVINO",
)
The hotwords parameter is a comma-separated string passed directly to faster-whisper's keyword boosting. Also available in the REST API via the hotwords form field.
Speaker Diarization
Real-time speaker identification using pyannote.audio embeddings (optional dependency):
pip install pyannote.audio
client = TranscriptionClient(
"localhost", 9090,
enable_diarization=True,
max_speakers=4,
)
When enabled, completed segments include a speaker field:
{"start": "0.000", "end": "2.500", "text": "Hello", "speaker": "SPEAKER_00", "completed": true}
Diarization uses online cosine-similarity clustering of speaker embeddings. If pyannote.audio is not installed, the server logs a warning and continues without diarization.
The OpenAI-compatible REST endpoint also accepts known_speaker_names and uploaded known_speaker_references multipart fields. When speaker fields are supplied with response_format="verbose_json", segments include a speaker field.
Batch Inference
Batch multiple client sessions into single GPU calls for higher throughput:
python3 run_server.py --port 9090 --backend faster_whisper \
--batch_inference --batch_max_size 8 --batch_window_ms 50
Raw PCM Input
Accept raw PCM int16 audio from clients (useful for embedded devices):
python3 run_server.py --port 9090 --backend faster_whisper --raw_pcm_input
Audio is automatically normalized to float32 range [-1.0, 1.0]. Clients can also set audio_format in the initial websocket options to float32 (default), int16, or uint8.
Streaming Client (manual audio streaming from any source)
StreamingTranscriptionClient lets you push raw PCM audio bytes from any source — a live microphone capture loop, a network stream, an audio pipeline — and receive transcripts via callbacks as speech is detected. Unlike TranscriptionClient, it does not manage audio capture internally; you control when and how audio is fed.
A runnable example that reads from an audio file and streams the chunks is at examples/manual_audio_chunking.py:
python examples/manual_audio_chunking.py --file assets/jfk.flac
Example usage:
from whisper_live.client import StreamingTranscriptionClient
client = StreamingTranscriptionClient(
"localhost", 9090,
lang="en",
model="small",
on_session_started=lambda: print("Server ready"),
on_partial_transcript=lambda text, segs: print(f"… {text}", end="\r"),
on_committed_transcript=lambda text, segs: print(f"✓ {text}"),
on_error=lambda e: print(f"Error: {e}"),
on_close=lambda: print("Closed"),
)
with client:
for chunk in my_audio_source: # any cadence, any chunk size
client.send(chunk, pcm_format="int16")
Audio must be mono, 16 kHz PCM. Two formats are accepted:
pcm_format | Description |
|---|---|
"int16" (default for raw microphone data) | 16-bit signed integers, normalized internally |
"float32" | 32-bit floats in [-1, 1], passed through directly |
NumPy arrays can be sent with send_array():
import numpy as np
samples = np.frombuffer(raw_bytes, dtype=np.int16)
client.send_array(samples)
Callbacks
| Callback | Signature | When fired |
|---|---|---|
on_session_started | () -> None | Server handshake complete, ready to receive audio |
on_partial_transcript | (text, segments) -> None | In-progress segment updated |
on_committed_transcript | (text, segments) -> None | Segment finalized |
on_translation | (text, segments) -> None | Translated segment ready (requires enable_translation=True) |
on_error | (error) -> None | WebSocket error |
on_close | () -> None | Connection closed |
Browser Extensions
- Run the server with your desired backend as shown here.
- Transcribe audio directly from your browser using our Chrome or Firefox extensions. Refer to Audio-Transcription-Chrome and https://github.com/collabora/WhisperLive/blob/main/TensorRT_whisper.md
Aavaaz
Aavaaz is a production-grade speech-to-text platform built on WhisperLive, adding speaker diarization, sentiment analysis, PII redaction, webhooks, and OpenAI-compatible REST APIs. It's free to try -- see the Aavaaz README to get started.
iOS Client
Use WhisperLive on iOS with our native iOS client.
Refer to ios-client and ios-client/README.md for setup and usage instructions.
Whisper Live Server in Docker
-
GPU
- Faster-Whisper
docker run -it --gpus all -p 9090:9090 ghcr.io/collabora/whisperlive-gpu:latest- TensorRT. Refer to TensorRT_whisper readme for setup and more tensorrt backend configurations.
docker build . -f docker/Dockerfile.tensorrt -t whisperlive-tensorrt docker run -p 9090:9090 --runtime=nvidia --gpus all --entrypoint /bin/bash -it whisperlive-tensorrt # Build small.en engine bash build_whisper_tensorrt.sh /app/TensorRT-LLM-examples small.en # float16 bash build_whisper_tensorrt.sh /app/TensorRT-LLM-examples small.en int8 # int8 weight only quantization bash build_whisper_tensorrt.sh /app/TensorRT-LLM-examples small.en int4 # int4 weight only quantization # Run server with small.en (pick one engine) python3 run_server.py --port 9090 \ --backend tensorrt \ --trt_model_path "/app/TensorRT-LLM-examples/whisper/whisper_small_en_float16" # or int8 / int4: # --trt_model_path "/app/TensorRT-LLM-examples/whisper/whisper_small_en_int8" # --trt_model_path "/app/TensorRT-LLM-examples/whisper/whisper_small_en_int4"- OpenVINO
docker run -it --device=/dev/dri -p 9090:9090 ghcr.io/collabora/whisperlive-openvino- AMD ROCm (faster-whisper on AMD GPU via CTranslate2 ROCm wheel)
docker build -f docker/Dockerfile.rocm -t whisperlive-rocm . docker run --rm -it --device=/dev/kfd --device=/dev/dri \ --group-add "$(getent group video | cut -d: -f3)" \ --group-add "$(getent group render | cut -d: -f3)" \ -p 9090:9090 whisperlive-rocm -
CPU
- Faster-whisper
docker run -it -p 9090:9090 ghcr.io/collabora/whisperlive-cpu:latest
Troubleshooting
macOS OpenMP runtime conflict
On macOS, especially on Intel Macs, faster_whisper/ctranslate2 can conflict with OpenMP runtimes loaded by other Python packages. If the server aborts with a duplicate OpenMP runtime error, run the server with KMP_DUPLICATE_LIB_OK=TRUE:
KMP_DUPLICATE_LIB_OK=TRUE python3 run_server.py --port 9090 \
--backend faster_whisper \
--max_clients 4 \
--max_connection_time 600 \
--no_single_model
This workaround is intended for local development and testing. For production deployments, prefer using a clean environment that loads only one OpenMP runtime.
Future Work
- Add translation to other languages on top of transcription.
Blog Posts
- Transforming speech technology with WhisperLive
- WhisperFusion: Ultra-low latency conversations with an AI chatbot powered by WhisperLive
- Breaking language barriers 2.0: Moving closer towards fully reliable, production-ready Hindi ASR which is used in WhisperLive for hindi.
Contact
We are available to help you with both Open Source and proprietary AI projects. You can reach us via the Collabora website or [email protected] and [email protected].
Citations
@article{Whisper
title = {Robust Speech Recognition via Large-Scale Weak Supervision},
url = {https://arxiv.org/abs/2212.04356},
author = {Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya},
publisher = {arXiv},
year = {2022},
}
@misc{Silero VAD,
author = {Silero Team},
title = {Silero VAD: pre-trained enterprise-grade Voice Activity Detector (VAD), Number Detector and Language Classifier},
year = {2021},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/snakers4/silero-vad}},
email = {[email protected]}
}