Rename corpora.py to datas.py
Browse files- corpora.py → datas.py +8 -0
corpora.py → datas.py
RENAMED
@@ -1,8 +1,16 @@
|
|
1 |
from datasets import load_dataset, Audio
|
|
|
2 |
|
3 |
|
|
|
|
|
|
|
4 |
ds_i = load_dataset("language-and-voice-lab/samromur_asr",split='train+validation+test')
|
5 |
ds_i = ds_i.cast_column("audio", Audio(sampling_rate=16_000))
|
|
|
|
|
6 |
|
7 |
ds_f = load_dataset("carlosdanielhernandezmena/ravnursson_asr",split='train+validation+test')
|
8 |
ds_f = ds_f.cast_column("audio", Audio(sampling_rate=16_000))
|
|
|
|
|
|
1 |
from datasets import load_dataset, Audio
|
2 |
+
import ctcalign
|
3 |
|
4 |
|
5 |
+
model_word_separator = '|'
|
6 |
+
model_blank_token = '[PAD]'
|
7 |
+
|
8 |
ds_i = load_dataset("language-and-voice-lab/samromur_asr",split='train+validation+test')
|
9 |
ds_i = ds_i.cast_column("audio", Audio(sampling_rate=16_000))
|
10 |
+
i_model_path="carlosdanielhernandezmena/wav2vec2-large-xlsr-53-icelandic-ep10-1000h"
|
11 |
+
a_i = ctcalign.aligner(i_model_path,model_word_separator,model_blank_token)
|
12 |
|
13 |
ds_f = load_dataset("carlosdanielhernandezmena/ravnursson_asr",split='train+validation+test')
|
14 |
ds_f = ds_f.cast_column("audio", Audio(sampling_rate=16_000))
|
15 |
+
f_model_path="carlosdanielhernandezmena/wav2vec2-large-xlsr-53-faroese-100h"
|
16 |
+
a_f = ctcalign.aligner(f_model_path,model_word_separator,model_blank_token)
|