You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-1Lines changed: 29 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,6 @@ segments, info = model.transcribe("audio.mp3", beam_size=5, language="en")
69
69
70
70
* Python 3.8 or greater
71
71
72
-
Unlike openai-whisper, FFmpeg does **not** need to be installed on the system. The audio is decoded with the Python library [PyAV](https://github.com/PyAV-Org/PyAV) which bundles the FFmpeg libraries in its package.
73
72
74
73
### GPU
75
74
@@ -166,6 +165,35 @@ for segment in segments:
166
165
segments, _ = model.transcribe("audio.mp3")
167
166
segments =list(segments) # The transcription will actually run here.
168
167
```
168
+
169
+
### multi-segment language detection
170
+
171
+
To directly use the model for improved language detection, the following code snippet can be used:
172
+
173
+
```python
174
+
from faster_whisper import WhisperModel
175
+
model = WhisperModel("medium", device="cuda", compute_type="float16")
The batched version of faster-whisper is inspired by [whisper-x](https://github.com/m-bain/whisperX) licensed under the BSD-2 Clause license and integrates its VAD model to this library. We modify this implementation and also replaced the feature extraction with a faster torch-based implementation. Batched version improves the speed upto 10-12x compared to openAI implementation and 3-4x compared to the sequential faster_whisper version. It works by transcribing semantically meaningful audio chunks as batches leading to faster inference.
183
+
184
+
The following code snippet illustrates how to run inference with batched version on an example audio file. Please also refer to the test scripts of batched faster whisper.
185
+
186
+
```python
187
+
from faster_whisper import WhisperModel, BatchedInferencePipeline
188
+
189
+
model = WhisperModel("medium", device="cuda", compute_type="float16")
The Distil-Whisper checkpoints are compatible with the Faster-Whisper package. In particular, the latest [distil-large-v3](https://huggingface.co/distil-whisper/distil-large-v3)
0 commit comments