Alikhan Urumov
commited on
Commit
•
863e370
1
Parent(s):
4257d77
Update README.md
Browse files
README.md
CHANGED
@@ -4,45 +4,39 @@ tags:
|
|
4 |
model-index:
|
5 |
- name: wav2vec2-russian
|
6 |
results: []
|
|
|
|
|
|
|
7 |
---
|
8 |
|
9 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
10 |
should probably proofread and complete it, then remove this comment. -->
|
11 |
|
12 |
# wav2vec2-russian
|
|
|
|
|
|
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
38 |
-
- lr_scheduler_type: linear
|
39 |
-
- lr_scheduler_warmup_steps: 1000
|
40 |
-
- num_epochs: 10
|
41 |
-
- mixed_precision_training: Native AMP
|
42 |
-
|
43 |
-
### Framework versions
|
44 |
-
|
45 |
-
- Transformers 4.18.0
|
46 |
-
- Pytorch 1.10.0+cu111
|
47 |
-
- Datasets 2.0.0
|
48 |
-
- Tokenizers 0.11.6
|
|
|
4 |
model-index:
|
5 |
- name: wav2vec2-russian
|
6 |
results: []
|
7 |
+
widget:
|
8 |
+
- src: https://cdn-media.huggingface.co/speech_samples/common_voice_ru_18849022.mp3
|
9 |
+
|
10 |
---
|
11 |
|
12 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
13 |
should probably proofread and complete it, then remove this comment. -->
|
14 |
|
15 |
# wav2vec2-russian
|
16 |
+
#
|
17 |
+
---
|
18 |
+
Загрузите аудиофайл в формате wav для распознования. Результат можно откорректировать в другой моей сети. которая исправляет ошибки, расставляет знаки припинания и исправляет цифры. https://huggingface.co/UrukHan/t5-russian-spell
|
19 |
|
20 |
+
#
|
21 |
+
---
|
22 |
+
# Запуск сети пример в колабе https://colab.research.google.com/drive/1dVZvccYJq02hmEsapWgmuJ-pLdezFnn1?usp=sharing
|
23 |
+
#
|
24 |
+
```python
|
25 |
+
from transformers import AutoModelForCTC, Wav2Vec2Processor
|
26 |
+
model = AutoModelForCTC.from_pretrained("wav2vec2-russian-colab")
|
27 |
+
processor = Wav2Vec2Processor.from_pretrained("wav2vec2-russian-colab")
|
28 |
+
def map_to_result(batch):
|
29 |
+
with torch.no_grad():
|
30 |
+
input_values = torch.tensor(batch["input_values"]).unsqueeze(0) #, device="cuda"
|
31 |
+
logits = model(input_values).logits
|
32 |
+
pred_ids = torch.argmax(logits, dim=-1)
|
33 |
+
batch = processor.batch_decode(pred_ids)[0]
|
34 |
+
return batch
|
35 |
+
|
36 |
+
map_to_result()
|
37 |
+
```
|
38 |
+
|
39 |
+
#
|
40 |
+
---
|
41 |
+
# Тренировка модели с обработкой данных и созданием датасета разобрать можете в колабе:
|
42 |
+
# https://colab.research.google.com/drive/1zkCA2PtKxD2acqLr55USh35OomoOwOhm?usp=sharing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|