nguyenvulebinh
commited on
Commit
·
5d70e26
1
Parent(s):
053341b
Upload wav2vec2-base-vi-vlsp2020
Browse files- .gitattributes +2 -0
- added_tokens.json +4 -0
- alphabet.json +1 -0
- config.json +108 -0
- language_model/attrs.json +1 -0
- language_model/unigrams.txt +0 -0
- language_model/vi_lm_5grams.bin +3 -0
- model_handling.py +163 -0
- preprocessor_config.json +10 -0
- pytorch_model.bin +3 -0
- quangnam.wav +3 -0
- special_tokens_map.json +134 -0
- t2_0000006682.wav +3 -0
- tokenizer_config.json +14 -0
- vocab.json +98 -0
.gitattributes
CHANGED
@@ -32,3 +32,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
35 |
+
quangnam.wav filter=lfs diff=lfs merge=lfs -text
|
36 |
+
t2_0000006682.wav filter=lfs diff=lfs merge=lfs -text
|
added_tokens.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"</s>": 97,
|
3 |
+
"<s>": 96
|
4 |
+
}
|
alphabet.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"labels": [" ", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "\u00e0", "\u00e1", "\u00e2", "\u00e3", "\u00e8", "\u00e9", "\u00ea", "\u00ec", "\u00ed", "\u00f2", "\u00f3", "\u00f4", "\u00f5", "\u00f9", "\u00fa", "\u00fd", "\u0103", "\u0111", "\u0129", "\u0169", "\u01a1", "\u01b0", "\u1ea1", "\u1ea3", "\u1ea5", "\u1ea7", "\u1ea9", "\u1eab", "\u1ead", "\u1eaf", "\u1eb1", "\u1eb3", "\u1eb5", "\u1eb7", "\u1eb9", "\u1ebb", "\u1ebd", "\u1ebf", "\u1ec1", "\u1ec3", "\u1ec5", "\u1ec7", "\u1ec9", "\u1ecb", "\u1ecd", "\u1ecf", "\u1ed1", "\u1ed3", "\u1ed5", "\u1ed7", "\u1ed9", "\u1edb", "\u1edd", "\u1edf", "\u1ee1", "\u1ee3", "\u1ee5", "\u1ee7", "\u1ee9", "\u1eeb", "\u1eed", "\u1eef", "\u1ef1", "\u1ef3", "\u1ef5", "\u1ef7", "\u1ef9", "\u2047", "", "<s>", "</s>"], "is_bpe": false}
|
config.json
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "./wav2vec2-base-vlsp2020/checkpoint-90000",
|
3 |
+
"activation_dropout": 0.0,
|
4 |
+
"adapter_kernel_size": 3,
|
5 |
+
"adapter_stride": 2,
|
6 |
+
"add_adapter": false,
|
7 |
+
"apply_spec_augment": true,
|
8 |
+
"architectures": [
|
9 |
+
"Wav2Vec2ForCTC"
|
10 |
+
],
|
11 |
+
"attention_dropout": 0.0,
|
12 |
+
"bos_token_id": 1,
|
13 |
+
"classifier_proj_size": 256,
|
14 |
+
"codevector_dim": 256,
|
15 |
+
"contrastive_logits_temperature": 0.1,
|
16 |
+
"conv_bias": false,
|
17 |
+
"conv_dim": [
|
18 |
+
512,
|
19 |
+
512,
|
20 |
+
512,
|
21 |
+
512,
|
22 |
+
512,
|
23 |
+
512,
|
24 |
+
512
|
25 |
+
],
|
26 |
+
"conv_kernel": [
|
27 |
+
10,
|
28 |
+
3,
|
29 |
+
3,
|
30 |
+
3,
|
31 |
+
3,
|
32 |
+
2,
|
33 |
+
2
|
34 |
+
],
|
35 |
+
"conv_stride": [
|
36 |
+
5,
|
37 |
+
2,
|
38 |
+
2,
|
39 |
+
2,
|
40 |
+
2,
|
41 |
+
2,
|
42 |
+
2
|
43 |
+
],
|
44 |
+
"ctc_loss_reduction": "mean",
|
45 |
+
"ctc_zero_infinity": false,
|
46 |
+
"diversity_loss_weight": 0.1,
|
47 |
+
"do_stable_layer_norm": false,
|
48 |
+
"eos_token_id": 2,
|
49 |
+
"feat_extract_activation": "gelu",
|
50 |
+
"feat_extract_dropout": 0.0,
|
51 |
+
"feat_extract_norm": "group",
|
52 |
+
"feat_proj_dropout": 0.0,
|
53 |
+
"feat_quantizer_dropout": 0.0,
|
54 |
+
"final_dropout": 0.0,
|
55 |
+
"hidden_act": "gelu",
|
56 |
+
"hidden_dropout": 0.3,
|
57 |
+
"hidden_dropout_prob": 0.1,
|
58 |
+
"hidden_size": 768,
|
59 |
+
"initializer_range": 0.02,
|
60 |
+
"intermediate_size": 3072,
|
61 |
+
"layer_norm_eps": 1e-05,
|
62 |
+
"layerdrop": 0.1,
|
63 |
+
"mask_feature_length": 10,
|
64 |
+
"mask_feature_min_masks": 0,
|
65 |
+
"mask_feature_prob": 0.0,
|
66 |
+
"mask_time_length": 10,
|
67 |
+
"mask_time_min_masks": 2,
|
68 |
+
"mask_time_prob": 0.05,
|
69 |
+
"model_type": "wav2vec2",
|
70 |
+
"num_adapter_layers": 3,
|
71 |
+
"num_attention_heads": 12,
|
72 |
+
"num_codevector_groups": 2,
|
73 |
+
"num_codevectors_per_group": 320,
|
74 |
+
"num_conv_pos_embedding_groups": 16,
|
75 |
+
"num_conv_pos_embeddings": 128,
|
76 |
+
"num_feat_extract_layers": 7,
|
77 |
+
"num_hidden_layers": 12,
|
78 |
+
"num_negatives": 100,
|
79 |
+
"output_hidden_size": 768,
|
80 |
+
"pad_token_id": 95,
|
81 |
+
"proj_codevector_dim": 256,
|
82 |
+
"tdnn_dilation": [
|
83 |
+
1,
|
84 |
+
2,
|
85 |
+
3,
|
86 |
+
1,
|
87 |
+
1
|
88 |
+
],
|
89 |
+
"tdnn_dim": [
|
90 |
+
512,
|
91 |
+
512,
|
92 |
+
512,
|
93 |
+
512,
|
94 |
+
1500
|
95 |
+
],
|
96 |
+
"tdnn_kernel": [
|
97 |
+
5,
|
98 |
+
3,
|
99 |
+
3,
|
100 |
+
1,
|
101 |
+
1
|
102 |
+
],
|
103 |
+
"torch_dtype": "float32",
|
104 |
+
"transformers_version": "4.23.1",
|
105 |
+
"use_weighted_layer_sum": false,
|
106 |
+
"vocab_size": 98,
|
107 |
+
"xvector_output_dim": 512
|
108 |
+
}
|
language_model/attrs.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"alpha": 0.5, "beta": 1.5, "unk_score_offset": -10.0, "score_boundary": true}
|
language_model/unigrams.txt
ADDED
File without changes
|
language_model/vi_lm_5grams.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a2e3e3264950427d249876ac3dd24c0f506b06f1cca3e2c4095e0f95e50b3133
|
3 |
+
size 2471072676
|
model_handling.py
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import Wav2Vec2PreTrainedModel, Wav2Vec2Model
|
2 |
+
from torch import nn
|
3 |
+
import warnings
|
4 |
+
import torch
|
5 |
+
from transformers.modeling_outputs import CausalLMOutput
|
6 |
+
from collections import OrderedDict
|
7 |
+
|
8 |
+
_HIDDEN_STATES_START_POSITION = 2
|
9 |
+
|
10 |
+
|
11 |
+
class Wav2Vec2ForCTC(Wav2Vec2PreTrainedModel):
|
12 |
+
def __init__(self, config):
|
13 |
+
super().__init__(config)
|
14 |
+
|
15 |
+
self.wav2vec2 = Wav2Vec2Model(config)
|
16 |
+
self.dropout = nn.Dropout(config.final_dropout)
|
17 |
+
|
18 |
+
self.feature_transform = nn.Sequential(OrderedDict([
|
19 |
+
('linear1', nn.Linear(config.hidden_size, config.hidden_size)),
|
20 |
+
('bn1', nn.BatchNorm1d(config.hidden_size)),
|
21 |
+
('activation1', nn.LeakyReLU()),
|
22 |
+
('drop1', nn.Dropout(config.final_dropout)),
|
23 |
+
('linear2', nn.Linear(config.hidden_size, config.hidden_size)),
|
24 |
+
('bn2', nn.BatchNorm1d(config.hidden_size)),
|
25 |
+
('activation2', nn.LeakyReLU()),
|
26 |
+
('drop2', nn.Dropout(config.final_dropout)),
|
27 |
+
('linear3', nn.Linear(config.hidden_size, config.hidden_size)),
|
28 |
+
('bn3', nn.BatchNorm1d(config.hidden_size)),
|
29 |
+
('activation3', nn.LeakyReLU()),
|
30 |
+
('drop3', nn.Dropout(config.final_dropout))
|
31 |
+
]))
|
32 |
+
|
33 |
+
if config.vocab_size is None:
|
34 |
+
raise ValueError(
|
35 |
+
f"You are trying to instantiate {self.__class__} with a configuration that "
|
36 |
+
"does not define the vocabulary size of the language model head. Please "
|
37 |
+
"instantiate the model as follows: `Wav2Vec2ForCTC.from_pretrained(..., vocab_size=vocab_size)`. "
|
38 |
+
"or define `vocab_size` of your model's configuration."
|
39 |
+
)
|
40 |
+
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size)
|
41 |
+
|
42 |
+
self.is_wav2vec_freeze = False
|
43 |
+
|
44 |
+
# Initialize weights and apply final processing
|
45 |
+
self.post_init()
|
46 |
+
|
47 |
+
def freeze_feature_extractor(self):
|
48 |
+
"""
|
49 |
+
Calling this function will disable the gradient computation for the feature encoder so that its parameter will
|
50 |
+
not be updated during training.
|
51 |
+
"""
|
52 |
+
warnings.warn(
|
53 |
+
"The method `freeze_feature_extractor` is deprecated and will be removed in Transformers v5."
|
54 |
+
"Please use the equivalent `freeze_feature_encoder` method instead.",
|
55 |
+
FutureWarning,
|
56 |
+
)
|
57 |
+
self.freeze_feature_encoder()
|
58 |
+
|
59 |
+
def freeze_feature_encoder(self):
|
60 |
+
"""
|
61 |
+
Calling this function will disable the gradient computation for the feature encoder so that its parameter will
|
62 |
+
not be updated during training.
|
63 |
+
"""
|
64 |
+
self.wav2vec2.feature_extractor._freeze_parameters()
|
65 |
+
|
66 |
+
def freeze_wav2vec(self, is_freeze=True):
|
67 |
+
"""
|
68 |
+
Calling this function will disable the gradient computation for the feature extractor so that its parameter
|
69 |
+
will not be updated during training.
|
70 |
+
"""
|
71 |
+
if is_freeze:
|
72 |
+
self.is_wav2vec_freeze = True
|
73 |
+
for param in self.wav2vec2.parameters():
|
74 |
+
param.requires_grad = False
|
75 |
+
else:
|
76 |
+
self.is_wav2vec_freeze = False
|
77 |
+
for param in self.wav2vec2.parameters():
|
78 |
+
param.requires_grad = True
|
79 |
+
self.freeze_feature_encoder()
|
80 |
+
|
81 |
+
model_total_params = sum(p.numel() for p in self.parameters())
|
82 |
+
model_total_params_trainable = sum(p.numel() for p in self.parameters() if p.requires_grad)
|
83 |
+
print("model_total_params: {}\nmodel_total_params_trainable: {}".format(model_total_params,
|
84 |
+
model_total_params_trainable))
|
85 |
+
|
86 |
+
def forward(
|
87 |
+
self,
|
88 |
+
input_values,
|
89 |
+
attention_mask=None,
|
90 |
+
output_attentions=None,
|
91 |
+
output_hidden_states=None,
|
92 |
+
return_dict=None,
|
93 |
+
labels=None,
|
94 |
+
):
|
95 |
+
r"""
|
96 |
+
labels (`torch.LongTensor` of shape `(batch_size, target_length)`, *optional*):
|
97 |
+
Labels for connectionist temporal classification. Note that `target_length` has to be smaller or equal to
|
98 |
+
the sequence length of the output logits. Indices are selected in `[-100, 0, ..., config.vocab_size - 1]`.
|
99 |
+
All labels set to `-100` are ignored (masked), the loss is only computed for labels in `[0, ...,
|
100 |
+
config.vocab_size - 1]`.
|
101 |
+
"""
|
102 |
+
|
103 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
104 |
+
|
105 |
+
outputs = self.wav2vec2(
|
106 |
+
input_values,
|
107 |
+
attention_mask=attention_mask,
|
108 |
+
output_attentions=output_attentions,
|
109 |
+
output_hidden_states=output_hidden_states,
|
110 |
+
return_dict=return_dict,
|
111 |
+
)
|
112 |
+
|
113 |
+
hidden_states = outputs[0]
|
114 |
+
hidden_states = self.dropout(hidden_states)
|
115 |
+
|
116 |
+
B, T, F = hidden_states.size()
|
117 |
+
hidden_states = hidden_states.view(B * T, F)
|
118 |
+
|
119 |
+
hidden_states = self.feature_transform(hidden_states)
|
120 |
+
|
121 |
+
hidden_states = hidden_states.view(B, T, F)
|
122 |
+
|
123 |
+
logits = self.lm_head(hidden_states)
|
124 |
+
|
125 |
+
loss = None
|
126 |
+
if labels is not None:
|
127 |
+
|
128 |
+
if labels.max() >= self.config.vocab_size:
|
129 |
+
raise ValueError(f"Label values must be <= vocab_size: {self.config.vocab_size}")
|
130 |
+
|
131 |
+
# retrieve loss input_lengths from attention_mask
|
132 |
+
attention_mask = (
|
133 |
+
attention_mask if attention_mask is not None else torch.ones_like(input_values, dtype=torch.long)
|
134 |
+
)
|
135 |
+
input_lengths = self._get_feat_extract_output_lengths(attention_mask.sum(-1)).to(torch.long)
|
136 |
+
|
137 |
+
# assuming that padded tokens are filled with -100
|
138 |
+
# when not being attended to
|
139 |
+
labels_mask = labels >= 0
|
140 |
+
target_lengths = labels_mask.sum(-1)
|
141 |
+
flattened_targets = labels.masked_select(labels_mask)
|
142 |
+
|
143 |
+
# ctc_loss doesn't support fp16
|
144 |
+
log_probs = nn.functional.log_softmax(logits, dim=-1, dtype=torch.float32).transpose(0, 1)
|
145 |
+
|
146 |
+
with torch.backends.cudnn.flags(enabled=False):
|
147 |
+
loss = nn.functional.ctc_loss(
|
148 |
+
log_probs,
|
149 |
+
flattened_targets,
|
150 |
+
input_lengths,
|
151 |
+
target_lengths,
|
152 |
+
blank=self.config.pad_token_id,
|
153 |
+
reduction=self.config.ctc_loss_reduction,
|
154 |
+
zero_infinity=self.config.ctc_zero_infinity,
|
155 |
+
)
|
156 |
+
|
157 |
+
if not return_dict:
|
158 |
+
output = (logits,) + outputs[_HIDDEN_STATES_START_POSITION:]
|
159 |
+
return ((loss,) + output) if loss is not None else output
|
160 |
+
|
161 |
+
return CausalLMOutput(
|
162 |
+
loss=loss, logits=logits, hidden_states=outputs.hidden_states, attentions=outputs.attentions
|
163 |
+
)
|
preprocessor_config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"feature_extractor_type": "Wav2Vec2FeatureExtractor",
|
4 |
+
"feature_size": 1,
|
5 |
+
"padding_side": "right",
|
6 |
+
"padding_value": 0.0,
|
7 |
+
"processor_class": "Wav2Vec2ProcessorWithLM",
|
8 |
+
"return_attention_mask": false,
|
9 |
+
"sampling_rate": 16000
|
10 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0e85ff35346e235b16fbe3821091323c377113828e8fdffd1c151c928035530b
|
3 |
+
size 384987309
|
quangnam.wav
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:06a65d90eaef5d174751693b4ae0383c472ff95267713fb01c08802c56b143e2
|
3 |
+
size 159404
|
special_tokens_map.json
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
{
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": true,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false
|
9 |
+
},
|
10 |
+
{
|
11 |
+
"content": "</s>",
|
12 |
+
"lstrip": false,
|
13 |
+
"normalized": true,
|
14 |
+
"rstrip": false,
|
15 |
+
"single_word": false
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"content": "<s>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": true,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
},
|
24 |
+
{
|
25 |
+
"content": "</s>",
|
26 |
+
"lstrip": false,
|
27 |
+
"normalized": true,
|
28 |
+
"rstrip": false,
|
29 |
+
"single_word": false
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"content": "<s>",
|
33 |
+
"lstrip": false,
|
34 |
+
"normalized": true,
|
35 |
+
"rstrip": false,
|
36 |
+
"single_word": false
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"content": "</s>",
|
40 |
+
"lstrip": false,
|
41 |
+
"normalized": true,
|
42 |
+
"rstrip": false,
|
43 |
+
"single_word": false
|
44 |
+
},
|
45 |
+
{
|
46 |
+
"content": "<s>",
|
47 |
+
"lstrip": false,
|
48 |
+
"normalized": true,
|
49 |
+
"rstrip": false,
|
50 |
+
"single_word": false
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"content": "</s>",
|
54 |
+
"lstrip": false,
|
55 |
+
"normalized": true,
|
56 |
+
"rstrip": false,
|
57 |
+
"single_word": false
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"content": "<s>",
|
61 |
+
"lstrip": false,
|
62 |
+
"normalized": true,
|
63 |
+
"rstrip": false,
|
64 |
+
"single_word": false
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"content": "</s>",
|
68 |
+
"lstrip": false,
|
69 |
+
"normalized": true,
|
70 |
+
"rstrip": false,
|
71 |
+
"single_word": false
|
72 |
+
},
|
73 |
+
{
|
74 |
+
"content": "<s>",
|
75 |
+
"lstrip": false,
|
76 |
+
"normalized": true,
|
77 |
+
"rstrip": false,
|
78 |
+
"single_word": false
|
79 |
+
},
|
80 |
+
{
|
81 |
+
"content": "</s>",
|
82 |
+
"lstrip": false,
|
83 |
+
"normalized": true,
|
84 |
+
"rstrip": false,
|
85 |
+
"single_word": false
|
86 |
+
},
|
87 |
+
{
|
88 |
+
"content": "<s>",
|
89 |
+
"lstrip": false,
|
90 |
+
"normalized": true,
|
91 |
+
"rstrip": false,
|
92 |
+
"single_word": false
|
93 |
+
},
|
94 |
+
{
|
95 |
+
"content": "</s>",
|
96 |
+
"lstrip": false,
|
97 |
+
"normalized": true,
|
98 |
+
"rstrip": false,
|
99 |
+
"single_word": false
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"content": "<s>",
|
103 |
+
"lstrip": false,
|
104 |
+
"normalized": true,
|
105 |
+
"rstrip": false,
|
106 |
+
"single_word": false
|
107 |
+
},
|
108 |
+
{
|
109 |
+
"content": "</s>",
|
110 |
+
"lstrip": false,
|
111 |
+
"normalized": true,
|
112 |
+
"rstrip": false,
|
113 |
+
"single_word": false
|
114 |
+
},
|
115 |
+
{
|
116 |
+
"content": "<s>",
|
117 |
+
"lstrip": false,
|
118 |
+
"normalized": true,
|
119 |
+
"rstrip": false,
|
120 |
+
"single_word": false
|
121 |
+
},
|
122 |
+
{
|
123 |
+
"content": "</s>",
|
124 |
+
"lstrip": false,
|
125 |
+
"normalized": true,
|
126 |
+
"rstrip": false,
|
127 |
+
"single_word": false
|
128 |
+
}
|
129 |
+
],
|
130 |
+
"bos_token": "<s>",
|
131 |
+
"eos_token": "</s>",
|
132 |
+
"pad_token": "<pad>",
|
133 |
+
"unk_token": "<unk>"
|
134 |
+
}
|
t2_0000006682.wav
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8e6821f71b608ec9fa947571af7f631cad1f9d45b22287e22e70e7411c62b802
|
3 |
+
size 49644
|
tokenizer_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"do_lower_case": false,
|
4 |
+
"eos_token": "</s>",
|
5 |
+
"name_or_path": "../lyric_alignment/model-bin/",
|
6 |
+
"pad_token": "<pad>",
|
7 |
+
"processor_class": "Wav2Vec2ProcessorWithLM",
|
8 |
+
"replace_word_delimiter_char": " ",
|
9 |
+
"special_tokens_map_file": null,
|
10 |
+
"tokenizer_class": "Wav2Vec2CTCTokenizer",
|
11 |
+
"tokenizer_file": null,
|
12 |
+
"unk_token": "<unk>",
|
13 |
+
"word_delimiter_token": "|"
|
14 |
+
}
|
vocab.json
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<pad>": 95,
|
3 |
+
"<unk>": 94,
|
4 |
+
"a": 1,
|
5 |
+
"b": 2,
|
6 |
+
"c": 3,
|
7 |
+
"d": 4,
|
8 |
+
"e": 5,
|
9 |
+
"f": 6,
|
10 |
+
"g": 7,
|
11 |
+
"h": 8,
|
12 |
+
"i": 9,
|
13 |
+
"j": 10,
|
14 |
+
"k": 11,
|
15 |
+
"l": 12,
|
16 |
+
"m": 13,
|
17 |
+
"n": 14,
|
18 |
+
"o": 15,
|
19 |
+
"p": 16,
|
20 |
+
"q": 17,
|
21 |
+
"r": 18,
|
22 |
+
"s": 19,
|
23 |
+
"t": 20,
|
24 |
+
"u": 21,
|
25 |
+
"v": 22,
|
26 |
+
"w": 23,
|
27 |
+
"x": 24,
|
28 |
+
"y": 25,
|
29 |
+
"z": 26,
|
30 |
+
"|": 0,
|
31 |
+
"à": 27,
|
32 |
+
"á": 28,
|
33 |
+
"â": 29,
|
34 |
+
"ã": 30,
|
35 |
+
"è": 31,
|
36 |
+
"é": 32,
|
37 |
+
"ê": 33,
|
38 |
+
"ì": 34,
|
39 |
+
"í": 35,
|
40 |
+
"ò": 36,
|
41 |
+
"ó": 37,
|
42 |
+
"ô": 38,
|
43 |
+
"õ": 39,
|
44 |
+
"ù": 40,
|
45 |
+
"ú": 41,
|
46 |
+
"ý": 42,
|
47 |
+
"ă": 43,
|
48 |
+
"đ": 44,
|
49 |
+
"ĩ": 45,
|
50 |
+
"ũ": 46,
|
51 |
+
"ơ": 47,
|
52 |
+
"ư": 48,
|
53 |
+
"ạ": 49,
|
54 |
+
"ả": 50,
|
55 |
+
"ấ": 51,
|
56 |
+
"ầ": 52,
|
57 |
+
"ẩ": 53,
|
58 |
+
"ẫ": 54,
|
59 |
+
"ậ": 55,
|
60 |
+
"ắ": 56,
|
61 |
+
"ằ": 57,
|
62 |
+
"ẳ": 58,
|
63 |
+
"ẵ": 59,
|
64 |
+
"ặ": 60,
|
65 |
+
"ẹ": 61,
|
66 |
+
"ẻ": 62,
|
67 |
+
"ẽ": 63,
|
68 |
+
"ế": 64,
|
69 |
+
"ề": 65,
|
70 |
+
"ể": 66,
|
71 |
+
"ễ": 67,
|
72 |
+
"ệ": 68,
|
73 |
+
"ỉ": 69,
|
74 |
+
"ị": 70,
|
75 |
+
"ọ": 71,
|
76 |
+
"ỏ": 72,
|
77 |
+
"ố": 73,
|
78 |
+
"ồ": 74,
|
79 |
+
"ổ": 75,
|
80 |
+
"ỗ": 76,
|
81 |
+
"ộ": 77,
|
82 |
+
"ớ": 78,
|
83 |
+
"ờ": 79,
|
84 |
+
"ở": 80,
|
85 |
+
"ỡ": 81,
|
86 |
+
"ợ": 82,
|
87 |
+
"ụ": 83,
|
88 |
+
"ủ": 84,
|
89 |
+
"ứ": 85,
|
90 |
+
"ừ": 86,
|
91 |
+
"ử": 87,
|
92 |
+
"ữ": 88,
|
93 |
+
"ự": 89,
|
94 |
+
"ỳ": 90,
|
95 |
+
"ỵ": 91,
|
96 |
+
"ỷ": 92,
|
97 |
+
"ỹ": 93
|
98 |
+
}
|