Update README.md
Browse files
README.md
CHANGED
@@ -1,199 +1,119 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
#
|
7 |
|
8 |
-
|
9 |
|
|
|
10 |
|
|
|
11 |
|
12 |
-
##
|
13 |
|
14 |
-
###
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
|
20 |
-
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
|
28 |
-
###
|
29 |
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
|
|
|
|
|
|
39 |
|
40 |
-
|
41 |
|
42 |
-
|
|
|
|
|
|
|
43 |
|
44 |
-
|
|
|
|
|
45 |
|
46 |
-
|
|
|
|
|
47 |
|
48 |
-
|
|
|
49 |
|
50 |
-
|
|
|
|
|
51 |
|
52 |
-
|
|
|
|
|
|
|
53 |
|
54 |
-
|
55 |
|
56 |
-
|
|
|
|
|
|
|
|
|
57 |
|
58 |
-
##
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
63 |
|
64 |
-
###
|
65 |
|
66 |
-
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
|
|
|
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
|
|
|
|
|
|
75 |
|
76 |
-
##
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
-
|
105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
-
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
-
|
109 |
-
#### Testing Data
|
110 |
-
|
111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
#### Factors
|
116 |
-
|
117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
#### Metrics
|
122 |
-
|
123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
### Results
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Summary
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
## Model Examination [optional]
|
136 |
-
|
137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
-
|
145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
-
|
169 |
-
[More Information Needed]
|
170 |
-
|
171 |
-
## Citation [optional]
|
172 |
-
|
173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
-
|
175 |
-
**BibTeX:**
|
176 |
-
|
177 |
-
[More Information Needed]
|
178 |
-
|
179 |
-
**APA:**
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## More Information [optional]
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
-
|
193 |
-
## Model Card Authors [optional]
|
194 |
-
|
195 |
-
[More Information Needed]
|
196 |
-
|
197 |
-
## Model Card Contact
|
198 |
-
|
199 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
datasets:
|
4 |
+
- hhim8826/japanese-anime-speech-v2-split
|
5 |
+
language:
|
6 |
+
- ja
|
7 |
+
base_model:
|
8 |
+
- openai/whisper-large-v3-turbo
|
9 |
+
pipeline_tag: automatic-speech-recognition
|
10 |
+
tags:
|
11 |
+
- audio
|
12 |
+
- automatic-speech-recognition
|
13 |
+
- asr
|
14 |
+
- whisper
|
15 |
+
- japanese
|
16 |
+
- anime
|
17 |
+
- finetuned
|
18 |
+
license: apache-2.0
|
19 |
---
|
20 |
|
21 |
+
# 以下文檔生成BY AI!!!
|
22 |
|
23 |
+
内容由 AI 生成,请仔细甄别
|
24 |
|
25 |
+
# Whisper Large V3 Turbo - Japanese Anime Speech
|
26 |
|
27 |
+
這個模型是基於 OpenAI 的 Whisper Large V3 Turbo,針對日本動漫語音進行微調的語音辨識模型。特別針對動漫中的日語對話和表達方式進行優化,提供更準確的日語動漫對話文字轉錄。
|
28 |
|
29 |
+
## 模型詳情
|
30 |
|
31 |
+
### 模型描述
|
32 |
|
33 |
+
這個模型是從 `openai/whisper-large-v3-turbo` 微調而來,專門用於辨識日本動漫中的語音內容。它經過 `hhim8826/japanese-anime-speech-v2-split` 資料集訓練,能夠更好地處理動漫語音的特點,包括特殊的語調、語氣和常見的動漫用語。
|
34 |
|
35 |
+
- **開發者:** hhim8826
|
36 |
+
- **模型類型:** 自動語音辨識 (ASR)
|
37 |
+
- **語言:** 日語
|
38 |
+
- **授權:** Apache 2.0
|
39 |
+
- **微調自模型:** openai/whisper-large-v3-turbo
|
40 |
|
41 |
+
## 使用方法
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
+
### 直接使用
|
44 |
|
45 |
+
您可以使用以下代碼直接使用此模型進行日語動漫語音轉錄:
|
46 |
|
47 |
+
```python
|
48 |
+
from transformers import pipeline
|
|
|
49 |
|
50 |
+
asr = pipeline("automatic-speech-recognition", model="hhim8826/whisper-large-v3-turbo-ja")
|
51 |
|
52 |
+
# 使用音訊檔案進行轉錄
|
53 |
+
result = asr("path/to/anime_audio.wav")
|
54 |
+
print(result["text"])
|
55 |
+
```
|
56 |
|
57 |
+
更詳細的用法示例:
|
58 |
|
59 |
+
```python
|
60 |
+
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
|
61 |
+
import torch
|
62 |
+
import librosa
|
63 |
|
64 |
+
# 載入模型和處理器
|
65 |
+
processor = AutoProcessor.from_pretrained("hhim8826/whisper-large-v3-turbo-ja")
|
66 |
+
model = AutoModelForSpeechSeq2Seq.from_pretrained("hhim8826/whisper-large-v3-turbo-ja").to("cuda")
|
67 |
|
68 |
+
# 載入音訊檔案
|
69 |
+
audio_file = 'anime_audio.wav'
|
70 |
+
audio_array, sampling_rate = librosa.load(audio_file, sr=16000)
|
71 |
|
72 |
+
# 處理音訊輸入
|
73 |
+
inputs = processor(audio_array, sampling_rate=16000, return_tensors="pt").to("cuda")
|
74 |
|
75 |
+
# 進行推論
|
76 |
+
with torch.no_grad():
|
77 |
+
generated_ids = model.generate(inputs=inputs.input_features)
|
78 |
|
79 |
+
# 解碼輸出
|
80 |
+
transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
81 |
+
print(transcription)
|
82 |
+
```
|
83 |
|
84 |
+
### 下游應用
|
85 |
|
86 |
+
此模型適用於:
|
87 |
+
- 動漫影片的自動字幕生成
|
88 |
+
- 動漫語音內容分析
|
89 |
+
- 日語動漫對話研究
|
90 |
+
- 日語動漫翻譯輔助工具
|
91 |
|
92 |
+
## 訓練詳情
|
93 |
|
94 |
+
### 訓練數據
|
95 |
|
96 |
+
此模型使用 `hhim8826/japanese-anime-speech-v2-split` 資料集進行訓練,該資料集包含來自各種日本動漫的語音片段及其對應的文字轉錄。
|
97 |
|
98 |
+
### 訓練過程
|
99 |
|
100 |
+
模型從 `openai/whisper-large-v3-turbo` 開始,經過微調以適應動漫語音的特點。訓練在適當的迭代次數後停止,避免過擬合。
|
101 |
|
102 |
+
#### 訓練超參數
|
103 |
|
104 |
+
- **學習率:** 1e-5
|
105 |
+
- **訓練批次大小:** 16
|
106 |
+
- **訓練步數:** 4000
|
107 |
|
108 |
+
## 評估結果
|
109 |
|
110 |
+
在動漫語音測試集上,此模型相較於原始 Whisper 模型在以下方面有所改進:
|
111 |
+
- 更好地處理動漫專有名詞和特殊用語
|
112 |
+
- 對背景音樂/音效干擾下的對話識別能力提升
|
113 |
+
- 更準確地處理動漫角色特有的語調和說話方式
|
114 |
|
115 |
+
## 局限性
|
116 |
|
117 |
+
- 主要針對日語動漫優化,對其他類型的日語內容可能效果不如專門模型
|
118 |
+
- 可能對某些非常小眾或特殊的動漫詞彙識別不足
|
119 |
+
- 對極端快速或含糊的對話可能仍有辨識困難
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|