asadfgglie
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -12,4 +12,31 @@ library_name: ctranslate2
|
|
12 |
|
13 |
# asadfgglie/faster-whisper-large-v3-zh-TW
|
14 |
|
15 |
-
此模型是將[JacobLinCool/whisper-large-v3-turbo-common_voice_19_0-zh-TW](https://huggingface.co/JacobLinCool/whisper-large-v3-turbo-common_voice_19_0-zh-TW)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# asadfgglie/faster-whisper-large-v3-zh-TW
|
14 |
|
15 |
+
此模型是將[JacobLinCool/whisper-large-v3-turbo-common_voice_19_0-zh-TW](https://huggingface.co/JacobLinCool/whisper-large-v3-turbo-common_voice_19_0-zh-TW)
|
16 |
+
轉換成`CTranslate2`格式的模型,可以在[faster-whisper](https://github.com/systran/faster-whisper)中使用。
|
17 |
+
|
18 |
+
## Example
|
19 |
+
|
20 |
+
```python
|
21 |
+
from faster_whisper import WhisperModel
|
22 |
+
|
23 |
+
model = WhisperModel("asadfgglie/faster-whisper-large-v3-zh-TW")
|
24 |
+
|
25 |
+
segments, info = model.transcribe("audio.mp3")
|
26 |
+
for segment in segments:
|
27 |
+
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
28 |
+
```
|
29 |
+
|
30 |
+
## Conversion details
|
31 |
+
|
32 |
+
原始模型是根據以下指令轉換:
|
33 |
+
|
34 |
+
```
|
35 |
+
ct2-transformers-converter --model JacobLinCool/whisper-large-v3-turbo-common_voice_19_0-zh-TW \
|
36 |
+
--output_dir whisper_model/faster-whisper-large-v3-zh-TW --copy_files preprocessor_config.json
|
37 |
+
```
|
38 |
+
|
39 |
+
在轉換完成後,請記得自行到原始模型的[model card](https://huggingface.co/openai/whisper-large-v3)中下載`tokenizer.json`。
|
40 |
+
(因為`JacobLinCool/whisper-large-v3-turbo-common_voice_19_0-zh-TW`的repo中沒有,而`faster_whishper`又需要這個酷東東來做tokenizer)
|
41 |
+
|
42 |
+
如果有需要,你可以在轉換指令中添加`--quantization float16`來指定量化精度。不過在推理時你依舊可以使用[`compute_type`](https://opennmt.net/CTranslate2/quantization.html)參數來進一步量化/去除量化。
|