avans06 commited on
Commit
d31577b
1 Parent(s): de70265

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +161 -1
README.md CHANGED
@@ -1,3 +1,163 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ tags:
103
+ - audio
104
+ - automatic-speech-recognition
105
+ license: mit
106
+ library_name: ctranslate2
107
  ---
108
+
109
+ **README.md file is based on "[guillaumekln/faster-whisper-large-v2](https://huggingface.co/guillaumekln/faster-whisper-large-v2)" and has been updated to version 3 content.**
110
+
111
+ # Whisper large-v3 model for CTranslate2
112
+
113
+ This repository contains the conversion of [openai/whisper-large-v3](https://huggingface.co/openai/whisper-large-v3) to the [CTranslate2](https://github.com/OpenNMT/CTranslate2) model format.
114
+
115
+ This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/guillaumekln/faster-whisper).
116
+
117
+ ## Example
118
+
119
+ ```python
120
+ from faster_whisper import WhisperModel
121
+
122
+ model = WhisperModel("large-v3")
123
+
124
+ segments, info = model.transcribe("audio.mp3")
125
+ for segment in segments:
126
+ print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
127
+ ```
128
+
129
+ ## Conversion details
130
+
131
+ The original model was converted with the following command:
132
+
133
+ ```
134
+ ct2-transformers-converter --model openai/whisper-large-v3 --output_dir faster-whisper-large-v3 \
135
+ --copy_files added_tokens.json special_tokens_map.json tokenizer_config.json vocab.json --quantization float16
136
+ ```
137
+
138
+ Note that the model weights are saved in FP16. This type can be changed when the model is loaded using the [`compute_type` option in CTranslate2](https://opennmt.net/CTranslate2/quantization.html).
139
+
140
+ Note that while "openai/whisper-large-v3" does not come with a "tokenizer.json" file, you can generate it using AutoTokenizer.
141
+
142
+ ```python
143
+ from transformers import AutoTokenizer
144
+ self.hf_tokenizer = AutoTokenizer.from_pretrained("openai/whisper-large-v3")
145
+ self.hf_tokenizer.save_pretrained("whisper-large-v3-test")
146
+ ```
147
+
148
+ ## How faster-whisper working with Whisper-large-v3
149
+
150
+ [Working with Whisper-large-v3 #547](https://github.com/guillaumekln/faster-whisper/issues/547) by. UmarRamzan
151
+
152
+ ```python
153
+ from faster_whisper import WhisperModel
154
+
155
+ model = WhisperModel(model_url)
156
+
157
+ if "large-v3" in model_url:
158
+ model.feature_extractor.mel_filters = model.feature_extractor.get_mel_filters(model.feature_extractor.sampling_rate, model.feature_extractor.n_fft, n_mels=128)
159
+ ```
160
+
161
+ ## More information
162
+
163
+ **For more information about the original model, see its [model card](https://huggingface.co/openai/whisper-large-v3).**