Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,118 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
library_name: ctranslate2
|
| 5 |
+
pipeline_tag: automatic-speech-recognition
|
| 6 |
+
tags:
|
| 7 |
+
- whisper
|
| 8 |
+
- ctranslate2
|
| 9 |
+
- speech-recognition
|
| 10 |
+
- transcription
|
| 11 |
+
- bfloat16
|
| 12 |
+
base_model: openai/whisper-tiny
|
| 13 |
---
|
| 14 |
+
|
| 15 |
+
# π£οΈ Whisper Tiny β CTranslate2 (`bfloat16`)
|
| 16 |
+
|
| 17 |
+
This is [OpenAI's whisper-tiny](https://huggingface.co/openai/whisper-tiny) converted to [CTranslate2](https://github.com/OpenNMT/CTranslate2) format with `bfloat16` precision.
|
| 18 |
+
|
| 19 |
+
> [!TIP]
|
| 20 |
+
> Also available in other precisions:
|
| 21 |
+
> [`float32`](https://huggingface.co/ctranslate2-4you/whisper-tiny-ct2-float32) Β· [`float16`](https://huggingface.co/ctranslate2-4you/whisper-tiny-ct2-float16)
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## π Details
|
| 26 |
+
|
| 27 |
+
| | |
|
| 28 |
+
|---|---|
|
| 29 |
+
| **Base model** | [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny) |
|
| 30 |
+
| **Format** | CTranslate2 |
|
| 31 |
+
| **Precision** | `bfloat16` |
|
| 32 |
+
| **Language** | Multilingual |
|
| 33 |
+
| **Task** | Automatic Speech Recognition |
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## β‘ Quick Start
|
| 38 |
+
|
| 39 |
+
Install the inference library:
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
pip install whisper-s2t-reborn
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
Transcribe an audio file:
|
| 46 |
+
|
| 47 |
+
```python
|
| 48 |
+
import whisper_s2t
|
| 49 |
+
|
| 50 |
+
model = whisper_s2t.load_model(
|
| 51 |
+
model_identifier="tiny",
|
| 52 |
+
compute_type="bfloat16",
|
| 53 |
+
device="cuda",
|
| 54 |
+
)
|
| 55 |
+
|
| 56 |
+
result = model.transcribe_with_vad(
|
| 57 |
+
["audio.wav"],
|
| 58 |
+
lang_codes=["en"],
|
| 59 |
+
tasks=["transcribe"],
|
| 60 |
+
initial_prompts=[None],
|
| 61 |
+
batch_size=1, # increase this to significantly improve throughput
|
| 62 |
+
)
|
| 63 |
+
|
| 64 |
+
for segment in result[0]:
|
| 65 |
+
print(segment["text"])
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
> [!NOTE]
|
| 69 |
+
> Models are **auto-downloaded** from this repo the first time you run inference. No manual download required.
|
| 70 |
+
|
| 71 |
+
*See the [whisper-s2t-reborn](https://github.com/BBC-Esq/WhisperS2T-reborn) repository for the full list of available parameters.*
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
## π¦ All Available CTranslate2 Whisper Models
|
| 76 |
+
|
| 77 |
+
Every model below is hosted at [huggingface.co/ctranslate2-4you](https://huggingface.co/ctranslate2-4you) and works with [whisper-s2t-reborn](https://github.com/BBC-Esq/WhisperS2T-reborn).
|
| 78 |
+
|
| 79 |
+
### π Standard Whisper (Multilingual)
|
| 80 |
+
|
| 81 |
+
| Model | `float32` | `float16` | `bfloat16` |
|
| 82 |
+
|---|:---:|:---:|:---:|
|
| 83 |
+
| **tiny** | [Link](https://huggingface.co/ctranslate2-4you/whisper-tiny-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-tiny-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-tiny-ct2-bfloat16) |
|
| 84 |
+
| **base** | [Link](https://huggingface.co/ctranslate2-4you/whisper-base-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-base-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-base-ct2-bfloat16) |
|
| 85 |
+
| **small** | [Link](https://huggingface.co/ctranslate2-4you/whisper-small-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-small-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-small-ct2-bfloat16) |
|
| 86 |
+
| **medium** | [Link](https://huggingface.co/ctranslate2-4you/whisper-medium-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-medium-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-medium-ct2-bfloat16) |
|
| 87 |
+
| **large-v3** | [Link](https://huggingface.co/ctranslate2-4you/whisper-large-v3-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-large-v3-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-large-v3-ct2-bfloat16) |
|
| 88 |
+
|
| 89 |
+
### πΊπΈ Whisper English-Only
|
| 90 |
+
|
| 91 |
+
| Model | `float32` | `float16` | `bfloat16` |
|
| 92 |
+
|---|:---:|:---:|:---:|
|
| 93 |
+
| **tiny.en** | [Link](https://huggingface.co/ctranslate2-4you/whisper-tiny.en-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-tiny.en-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-tiny.en-ct2-bfloat16) |
|
| 94 |
+
| **base.en** | [Link](https://huggingface.co/ctranslate2-4you/whisper-base.en-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-base.en-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-base.en-ct2-bfloat16) |
|
| 95 |
+
| **small.en** | [Link](https://huggingface.co/ctranslate2-4you/whisper-small.en-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-small.en-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-small.en-ct2-bfloat16) |
|
| 96 |
+
| **medium.en** | [Link](https://huggingface.co/ctranslate2-4you/whisper-medium.en-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-medium.en-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-medium.en-ct2-bfloat16) |
|
| 97 |
+
|
| 98 |
+
### β‘ Distilled Whisper
|
| 99 |
+
|
| 100 |
+
| Model | `float32` | `float16` | `bfloat16` |
|
| 101 |
+
|---|:---:|:---:|:---:|
|
| 102 |
+
| **distil-small.en** | [Link](https://huggingface.co/ctranslate2-4you/distil-whisper-small.en-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/distil-whisper-small.en-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/distil-whisper-small.en-ct2-bfloat16) |
|
| 103 |
+
| **distil-medium.en** | [Link](https://huggingface.co/ctranslate2-4you/distil-whisper-medium.en-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/distil-whisper-medium.en-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/distil-whisper-medium.en-ct2-bfloat16) |
|
| 104 |
+
| **distil-large-v3** | [Link](https://huggingface.co/ctranslate2-4you/distil-whisper-large-v3-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/distil-whisper-large-v3-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/distil-whisper-large-v3-ct2-bfloat16) |
|
| 105 |
+
|
| 106 |
+
### π Whisper Large-v3 Turbo
|
| 107 |
+
|
| 108 |
+
| Model | `float32` | `float16` | `bfloat16` |
|
| 109 |
+
|---|:---:|:---:|:---:|
|
| 110 |
+
| **large-v3-turbo** | [Link](https://huggingface.co/ctranslate2-4you/whisper-large-v3-turbo-ct2-float32) | [Link](https://huggingface.co/ctranslate2-4you/whisper-large-v3-turbo-ct2-float16) | [Link](https://huggingface.co/ctranslate2-4you/whisper-large-v3-turbo-ct2-bfloat16) |
|
| 111 |
+
|
| 112 |
+
---
|
| 113 |
+
|
| 114 |
+
## π Links
|
| 115 |
+
|
| 116 |
+
- π¦ **Inference library** β [whisper-s2t-reborn](https://github.com/BBC-Esq/WhisperS2T-reborn)
|
| 117 |
+
- ποΈ **CTranslate2** β [github.com/OpenNMT/CTranslate2](https://github.com/OpenNMT/CTranslate2)
|
| 118 |
+
- π§ **Original model** β [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny)
|