lionellee commited on
Commit
d09c088
·
verified ·
1 Parent(s): 20c38dc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +529 -3
README.md CHANGED
@@ -1,3 +1,529 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - zh
5
+ - de
6
+ - es
7
+ - ru
8
+ - ko
9
+ - fr
10
+ - ja
11
+ - pt
12
+ - tr
13
+ - pl
14
+ - ca
15
+ - nl
16
+ - ar
17
+ - sv
18
+ - it
19
+ - id
20
+ - hi
21
+ - fi
22
+ - vi
23
+ - he
24
+ - uk
25
+ - el
26
+ - ms
27
+ - cs
28
+ - ro
29
+ - da
30
+ - hu
31
+ - ta
32
+ - 'no'
33
+ - th
34
+ - ur
35
+ - hr
36
+ - bg
37
+ - lt
38
+ - la
39
+ - mi
40
+ - ml
41
+ - cy
42
+ - sk
43
+ - te
44
+ - fa
45
+ - lv
46
+ - bn
47
+ - sr
48
+ - az
49
+ - sl
50
+ - kn
51
+ - et
52
+ - mk
53
+ - br
54
+ - eu
55
+ - is
56
+ - hy
57
+ - ne
58
+ - mn
59
+ - bs
60
+ - kk
61
+ - sq
62
+ - sw
63
+ - gl
64
+ - mr
65
+ - pa
66
+ - si
67
+ - km
68
+ - sn
69
+ - yo
70
+ - so
71
+ - af
72
+ - oc
73
+ - ka
74
+ - be
75
+ - tg
76
+ - sd
77
+ - gu
78
+ - am
79
+ - yi
80
+ - lo
81
+ - uz
82
+ - fo
83
+ - ht
84
+ - ps
85
+ - tk
86
+ - nn
87
+ - mt
88
+ - sa
89
+ - lb
90
+ - my
91
+ - bo
92
+ - tl
93
+ - mg
94
+ - as
95
+ - tt
96
+ - haw
97
+ - ln
98
+ - ha
99
+ - ba
100
+ - jw
101
+ - su
102
+ license: mit
103
+ base_model:
104
+ - openai/whisper-large-v3-turbo
105
+ tags:
106
+ - audio
107
+ - automatic-speech-recognition
108
+ - ctranslate2
109
+ widget:
110
+ - example_title: Librispeech sample 1
111
+ src: https://cdn-media.huggingface.co/speech_samples/sample1.flac
112
+ - example_title: Librispeech sample 2
113
+ src: https://cdn-media.huggingface.co/speech_samples/sample2.flac
114
+ pipeline_tag: automatic-speech-recognition
115
+ ---
116
+
117
+ # Whisper
118
+
119
+ Whisper is a state-of-the-art model for automatic speech recognition (ASR) and speech translation, proposed in the paper
120
+ [Robust Speech Recognition via Large-Scale Weak Supervision](https://huggingface.co/papers/2212.04356) by Alec Radford
121
+ et al. from OpenAI. Trained on >5M hours of labeled data, Whisper demonstrates a strong ability to generalise to many
122
+ datasets and domains in a zero-shot setting.
123
+
124
+ Whisper large-v3-turbo is a finetuned version of a pruned [Whisper large-v3](https://huggingface.co/openai/whisper-large-v3). In other words, it's the exact same model, except that the number of decoding layers have reduced from 32 to 4.
125
+ As a result, the model is way faster, at the expense of a minor quality degradation. You can find more details about it [in this GitHub discussion](https://github.com/openai/whisper/discussions/2363).
126
+
127
+ **Disclaimer**: Content for this model card has partly been written by the 🤗 Hugging Face team, and partly copied and
128
+ pasted from the original model card.
129
+
130
+ ## Usage
131
+
132
+ Whisper large-v3-turbo is supported in Hugging Face 🤗 Transformers. To run the model, first install the Transformers
133
+ library. For this example, we'll also install 🤗 Datasets to load toy audio dataset from the Hugging Face Hub, and
134
+ 🤗 Accelerate to reduce the model loading time:
135
+
136
+ ```bash
137
+ pip install --upgrade pip
138
+ pip install --upgrade transformers datasets[audio] accelerate
139
+ ```
140
+
141
+ The model can be used with the [`pipeline`](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline)
142
+ class to transcribe audios of arbitrary length:
143
+
144
+ ```python
145
+ import torch
146
+ from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
147
+ from datasets import load_dataset
148
+
149
+
150
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
151
+ torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
152
+
153
+ model_id = "openai/whisper-large-v3-turbo"
154
+
155
+ model = AutoModelForSpeechSeq2Seq.from_pretrained(
156
+ model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
157
+ )
158
+ model.to(device)
159
+
160
+ processor = AutoProcessor.from_pretrained(model_id)
161
+
162
+ pipe = pipeline(
163
+ "automatic-speech-recognition",
164
+ model=model,
165
+ tokenizer=processor.tokenizer,
166
+ feature_extractor=processor.feature_extractor,
167
+ torch_dtype=torch_dtype,
168
+ device=device,
169
+ )
170
+
171
+ dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
172
+ sample = dataset[0]["audio"]
173
+
174
+ result = pipe(sample)
175
+ print(result["text"])
176
+ ```
177
+
178
+ To transcribe a local audio file, simply pass the path to your audio file when you call the pipeline:
179
+
180
+ ```python
181
+ result = pipe("audio.mp3")
182
+ ```
183
+
184
+ Multiple audio files can be transcribed in parallel by specifying them as a list and setting the `batch_size` parameter:
185
+
186
+ ```python
187
+ result = pipe(["audio_1.mp3", "audio_2.mp3"], batch_size=2)
188
+ ```
189
+
190
+ Transformers is compatible with all Whisper decoding strategies, such as temperature fallback and condition on previous
191
+ tokens. The following example demonstrates how to enable these heuristics:
192
+
193
+ ```python
194
+ generate_kwargs = {
195
+ "max_new_tokens": 448,
196
+ "num_beams": 1,
197
+ "condition_on_prev_tokens": False,
198
+ "compression_ratio_threshold": 1.35, # zlib compression ratio threshold (in token space)
199
+ "temperature": (0.0, 0.2, 0.4, 0.6, 0.8, 1.0),
200
+ "logprob_threshold": -1.0,
201
+ "no_speech_threshold": 0.6,
202
+ "return_timestamps": True,
203
+ }
204
+
205
+ result = pipe(sample, generate_kwargs=generate_kwargs)
206
+ ```
207
+
208
+ Whisper predicts the language of the source audio automatically. If the source audio language is known *a-priori*, it
209
+ can be passed as an argument to the pipeline:
210
+
211
+ ```python
212
+ result = pipe(sample, generate_kwargs={"language": "english"})
213
+ ```
214
+
215
+ By default, Whisper performs the task of *speech transcription*, where the source audio language is the same as the target
216
+ text language. To perform *speech translation*, where the target text is in English, set the task to `"translate"`:
217
+
218
+ ```python
219
+ result = pipe(sample, generate_kwargs={"task": "translate"})
220
+ ```
221
+
222
+ Finally, the model can be made to predict timestamps. For sentence-level timestamps, pass the `return_timestamps` argument:
223
+
224
+ ```python
225
+ result = pipe(sample, return_timestamps=True)
226
+ print(result["chunks"])
227
+ ```
228
+
229
+ And for word-level timestamps:
230
+
231
+ ```python
232
+ result = pipe(sample, return_timestamps="word")
233
+ print(result["chunks"])
234
+ ```
235
+
236
+ The above arguments can be used in isolation or in combination. For example, to perform the task of speech transcription
237
+ where the source audio is in French, and we want to return sentence-level timestamps, the following can be used:
238
+
239
+ ```python
240
+ result = pipe(sample, return_timestamps=True, generate_kwargs={"language": "french", "task": "translate"})
241
+ print(result["chunks"])
242
+ ```
243
+
244
+ <details>
245
+
246
+ <summary> For more control over the generation parameters, use the model + processor API directly: </summary>
247
+
248
+ ```python
249
+ import torch
250
+ from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor
251
+ from datasets import Audio, load_dataset
252
+
253
+
254
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
255
+ torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
256
+
257
+ model_id = "openai/whisper-large-v3-turbo"
258
+
259
+ model = AutoModelForSpeechSeq2Seq.from_pretrained(
260
+ model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True
261
+ )
262
+ model.to(device)
263
+
264
+ processor = AutoProcessor.from_pretrained(model_id)
265
+
266
+ dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
267
+ dataset = dataset.cast_column("audio", Audio(processor.feature_extractor.sampling_rate))
268
+ sample = dataset[0]["audio"]
269
+
270
+ inputs = processor(
271
+ sample["array"],
272
+ sampling_rate=sample["sampling_rate"],
273
+ return_tensors="pt",
274
+ truncation=False,
275
+ padding="longest",
276
+ return_attention_mask=True,
277
+ )
278
+ inputs = inputs.to(device, dtype=torch_dtype)
279
+
280
+ gen_kwargs = {
281
+ "max_new_tokens": 448,
282
+ "num_beams": 1,
283
+ "condition_on_prev_tokens": False,
284
+ "compression_ratio_threshold": 1.35, # zlib compression ratio threshold (in token space)
285
+ "temperature": (0.0, 0.2, 0.4, 0.6, 0.8, 1.0),
286
+ "logprob_threshold": -1.0,
287
+ "no_speech_threshold": 0.6,
288
+ "return_timestamps": True,
289
+ }
290
+
291
+ pred_ids = model.generate(**inputs, **gen_kwargs)
292
+ pred_text = processor.batch_decode(pred_ids, skip_special_tokens=True, decode_with_timestamps=False)
293
+
294
+ print(pred_text)
295
+ ```
296
+
297
+ </details>
298
+
299
+ ## Additional Speed & Memory Improvements
300
+
301
+ You can apply additional speed and memory improvements to Whisper to further reduce the inference speed and VRAM
302
+ requirements.
303
+
304
+ ### Chunked Long-Form
305
+
306
+ Whisper has a receptive field of 30-seconds. To transcribe audios longer than this, one of two long-form algorithms are
307
+ required:
308
+ 1. **Sequential:** uses a "sliding window" for buffered inference, transcribing 30-second slices one after the other
309
+ 2. **Chunked:** splits long audio files into shorter ones (with a small overlap between segments), transcribes each segment independently, and stitches the resulting transcriptions at the boundaries
310
+
311
+ The sequential long-form algorithm should be used in either of the following scenarios:
312
+ 1. Transcription accuracy is the most important factor, and speed is less of a consideration
313
+ 2. You are transcribing **batches** of long audio files, in which case the latency of sequential is comparable to chunked, while being up to 0.5% WER more accurate
314
+
315
+ Conversely, the chunked algorithm should be used when:
316
+ 1. Transcription speed is the most important factor
317
+ 2. You are transcribing a **single** long audio file
318
+
319
+ By default, Transformers uses the sequential algorithm. To enable the chunked algorithm, pass the `chunk_length_s`
320
+ parameter to the `pipeline`. For large-v3, a chunk length of 30-seconds is optimal. To activate batching over long
321
+ audio files, pass the argument `batch_size`:
322
+
323
+ ```python
324
+ import torch
325
+ from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
326
+ from datasets import load_dataset
327
+
328
+
329
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
330
+ torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
331
+
332
+ model_id = "openai/whisper-large-v3-turbo"
333
+
334
+ model = AutoModelForSpeechSeq2Seq.from_pretrained(
335
+ model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True
336
+ )
337
+ model.to(device)
338
+
339
+ processor = AutoProcessor.from_pretrained(model_id)
340
+
341
+ pipe = pipeline(
342
+ "automatic-speech-recognition",
343
+ model=model,
344
+ tokenizer=processor.tokenizer,
345
+ feature_extractor=processor.feature_extractor,
346
+ chunk_length_s=30,
347
+ batch_size=16, # batch size for inference - set based on your device
348
+ torch_dtype=torch_dtype,
349
+ device=device,
350
+ )
351
+
352
+ dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
353
+ sample = dataset[0]["audio"]
354
+
355
+ result = pipe(sample)
356
+ print(result["text"])
357
+ ```
358
+
359
+ #### Torch compile
360
+
361
+ The Whisper forward pass is compatible with [`torch.compile`](https://pytorch.org/docs/stable/generated/torch.compile.html)
362
+ for 4.5x speed-ups.
363
+
364
+ **Note:** `torch.compile` is currently not compatible with the Chunked long-form algorithm or Flash Attention 2 ⚠️
365
+
366
+ ```python
367
+ import torch
368
+ from torch.nn.attention import SDPBackend, sdpa_kernel
369
+ from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
370
+ from datasets import load_dataset
371
+ from tqdm import tqdm
372
+
373
+ torch.set_float32_matmul_precision("high")
374
+
375
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
376
+ torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
377
+
378
+ model_id = "openai/whisper-large-v3-turbo"
379
+
380
+ model = AutoModelForSpeechSeq2Seq.from_pretrained(
381
+ model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True
382
+ ).to(device)
383
+
384
+ # Enable static cache and compile the forward pass
385
+ model.generation_config.cache_implementation = "static"
386
+ model.generation_config.max_new_tokens = 256
387
+ model.forward = torch.compile(model.forward, mode="reduce-overhead", fullgraph=True)
388
+
389
+ processor = AutoProcessor.from_pretrained(model_id)
390
+
391
+ pipe = pipeline(
392
+ "automatic-speech-recognition",
393
+ model=model,
394
+ tokenizer=processor.tokenizer,
395
+ feature_extractor=processor.feature_extractor,
396
+ torch_dtype=torch_dtype,
397
+ device=device,
398
+ )
399
+
400
+ dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
401
+ sample = dataset[0]["audio"]
402
+
403
+ # 2 warmup steps
404
+ for _ in tqdm(range(2), desc="Warm-up step"):
405
+ with sdpa_kernel(SDPBackend.MATH):
406
+ result = pipe(sample.copy(), generate_kwargs={"min_new_tokens": 256, "max_new_tokens": 256})
407
+
408
+ # fast run
409
+ with sdpa_kernel(SDPBackend.MATH):
410
+ result = pipe(sample.copy())
411
+
412
+ print(result["text"])
413
+ ```
414
+
415
+ #### Flash Attention 2
416
+
417
+ We recommend using [Flash-Attention 2](https://huggingface.co/docs/transformers/main/en/perf_infer_gpu_one#flashattention-2) if your GPU supports it and you are not using [torch.compile](#torch-compile).
418
+ To do so, first install [Flash Attention](https://github.com/Dao-AILab/flash-attention):
419
+
420
+ ```
421
+ pip install flash-attn --no-build-isolation
422
+ ```
423
+
424
+ Then pass `attn_implementation="flash_attention_2"` to `from_pretrained`:
425
+
426
+ ```python
427
+ model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, attn_implementation="flash_attention_2")
428
+ ```
429
+
430
+ #### Torch Scale-Product-Attention (SDPA)
431
+
432
+ If your GPU does not support Flash Attention, we recommend making use of PyTorch [scaled dot-product attention (SDPA)](https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html).
433
+ This attention implementation is activated **by default** for PyTorch versions 2.1.1 or greater. To check
434
+ whether you have a compatible PyTorch version, run the following Python code snippet:
435
+
436
+ ```python
437
+ from transformers.utils import is_torch_sdpa_available
438
+
439
+ print(is_torch_sdpa_available())
440
+ ```
441
+
442
+ If the above returns `True`, you have a valid version of PyTorch installed and SDPA is activated by default. If it
443
+ returns `False`, you need to upgrade your PyTorch version according to the [official instructions](https://pytorch.org/get-started/locally/)
444
+
445
+ Once a valid PyTorch version is installed, SDPA is activated by default. It can also be set explicitly by specifying
446
+ `attn_implementation="sdpa"` as follows:
447
+
448
+ ```python
449
+ model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, attn_implementation="sdpa")
450
+ ```
451
+
452
+ For more information about how to use the SDPA refer to the [Transformers SDPA documentation](https://huggingface.co/docs/transformers/en/perf_infer_gpu_one#pytorch-scaled-dot-product-attention).
453
+
454
+
455
+ ## Model details
456
+
457
+ Whisper is a Transformer based encoder-decoder model, also referred to as a _sequence-to-sequence_ model. There are two
458
+ flavours of Whisper model: English-only and multilingual. The English-only models were trained on the task of English
459
+ speech recognition. The multilingual models were trained simultaneously on multilingual speech recognition and speech
460
+ translation. For speech recognition, the model predicts transcriptions in the *same* language as the audio. For speech
461
+ translation, the model predicts transcriptions to a *different* language to the audio.
462
+
463
+ Whisper checkpoints come in five configurations of varying model sizes. The smallest four are available as English-only
464
+ and multilingual. The largest checkpoints are multilingual only. All ten of the pre-trained checkpoints
465
+ are available on the [Hugging Face Hub](https://huggingface.co/models?search=openai/whisper). The
466
+ checkpoints are summarised in the following table with links to the models on the Hub:
467
+
468
+ | Size | Parameters | English-only | Multilingual |
469
+ |----------|------------|------------------------------------------------------|-----------------------------------------------------|
470
+ | tiny | 39 M | [✓](https://huggingface.co/openai/whisper-tiny.en) | [✓](https://huggingface.co/openai/whisper-tiny) |
471
+ | base | 74 M | [✓](https://huggingface.co/openai/whisper-base.en) | [✓](https://huggingface.co/openai/whisper-base) |
472
+ | small | 244 M | [✓](https://huggingface.co/openai/whisper-small.en) | [✓](https://huggingface.co/openai/whisper-small) |
473
+ | medium | 769 M | [✓](https://huggingface.co/openai/whisper-medium.en) | [✓](https://huggingface.co/openai/whisper-medium) |
474
+ | large | 1550 M | x | [✓](https://huggingface.co/openai/whisper-large) |
475
+ | large-v2 | 1550 M | x | [✓](https://huggingface.co/openai/whisper-large-v2) |
476
+ | large-v3 | 1550 M | x | [✓](https://huggingface.co/openai/whisper-large-v3) |
477
+ | large-v3-turbo | 809 M | x | [✓](https://huggingface.co/openai/whisper-large-v3-turbo) |
478
+
479
+
480
+ ## Fine-Tuning
481
+
482
+ The pre-trained Whisper model demonstrates a strong ability to generalise to different datasets and domains. However,
483
+ its predictive capabilities can be improved further for certain languages and tasks through *fine-tuning*. The blog
484
+ post [Fine-Tune Whisper with 🤗 Transformers](https://huggingface.co/blog/fine-tune-whisper) provides a step-by-step
485
+ guide to fine-tuning the Whisper model with as little as 5 hours of labelled data.
486
+
487
+ ### Evaluated Use
488
+
489
+ The primary intended users of these models are AI researchers studying robustness, generalization, capabilities, biases, and constraints of the current model. However, Whisper is also potentially quite useful as an ASR solution for developers, especially for English speech recognition. We recognize that once models are released, it is impossible to restrict access to only “intended” uses or to draw reasonable guidelines around what is or is not research.
490
+
491
+ The models are primarily trained and evaluated on ASR and speech translation to English tasks. They show strong ASR results in ~10 languages. They may exhibit additional capabilities, particularly if fine-tuned on certain tasks like voice activity detection, speaker classification, or speaker diarization but have not been robustly evaluated in these areas. We strongly recommend that users perform robust evaluations of the models in a particular context and domain before deploying them.
492
+
493
+ In particular, we caution against using Whisper models to transcribe recordings of individuals taken without their consent or purporting to use these models for any kind of subjective classification. We recommend against use in high-risk domains like decision-making contexts, where flaws in accuracy can lead to pronounced flaws in outcomes. The models are intended to transcribe and translate speech, use of the model for classification is not only not evaluated but also not appropriate, particularly to infer human attributes.
494
+
495
+
496
+ ## Training Data
497
+
498
+ No information provided.
499
+
500
+ ## Performance and Limitations
501
+
502
+ Our studies show that, over many existing ASR systems, the models exhibit improved robustness to accents, background noise, technical language, as well as zero shot translation from multiple languages into English; and that accuracy on speech recognition and translation is near the state-of-the-art level.
503
+
504
+ However, because the models are trained in a weakly supervised manner using large-scale noisy data, the predictions may include texts that are not actually spoken in the audio input (i.e. hallucination). We hypothesize that this happens because, given their general knowledge of language, the models combine trying to predict the next word in audio with trying to transcribe the audio itself.
505
+
506
+ Our models perform unevenly across languages, and we observe lower accuracy on low-resource and/or low-discoverability languages or languages where we have less training data. The models also exhibit disparate performance on different accents and dialects of particular languages, which may include higher word error rate across speakers of different genders, races, ages, or other demographic criteria. Our full evaluation results are presented in [the paper accompanying this release](https://cdn.openai.com/papers/whisper.pdf).
507
+
508
+ In addition, the sequence-to-sequence architecture of the model makes it prone to generating repetitive texts, which can be mitigated to some degree by beam search and temperature scheduling but not perfectly. Further analysis on these limitations are provided in [the paper](https://cdn.openai.com/papers/whisper.pdf). It is likely that this behavior and hallucinations may be worse on lower-resource and/or lower-discoverability languages.
509
+
510
+
511
+ ## Broader Implications
512
+
513
+ We anticipate that Whisper models’ transcription capabilities may be used for improving accessibility tools. While Whisper models cannot be used for real-time transcription out of the box – their speed and size suggest that others may be able to build applications on top of them that allow for near-real-time speech recognition and translation. The real value of beneficial applications built on top of Whisper models suggests that the disparate performance of these models may have real economic implications.
514
+
515
+ There are also potential dual use concerns that come with releasing Whisper. While we hope the technology will be used primarily for beneficial purposes, making ASR technology more accessible could enable more actors to build capable surveillance technologies or scale up existing surveillance efforts, as the speed and accuracy allow for affordable automatic transcription and translation of large volumes of audio communication. Moreover, these models may have some capabilities to recognize specific individuals out of the box, which in turn presents safety concerns related both to dual use and disparate performance. In practice, we expect that the cost of transcription is not the limiting factor of scaling up surveillance projects.
516
+
517
+
518
+ ### BibTeX entry and citation info
519
+ ```bibtex
520
+ @misc{radford2022whisper,
521
+ doi = {10.48550/ARXIV.2212.04356},
522
+ url = {https://arxiv.org/abs/2212.04356},
523
+ author = {Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya},
524
+ title = {Robust Speech Recognition via Large-Scale Weak Supervision},
525
+ publisher = {arXiv},
526
+ year = {2022},
527
+ copyright = {arXiv.org perpetual, non-exclusive license}
528
+ }
529
+ ```