Commit
·
f83abf2
1
Parent(s):
256685f
fix escaped tab
Browse files
README.md
CHANGED
@@ -59,7 +59,7 @@ test_dataset = test_dataset.map(speech_file_to_array_fn)
|
|
59 |
inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
|
60 |
|
61 |
with torch.no_grad():
|
62 |
-
|
63 |
|
64 |
predicted_ids = torch.argmax(logits, dim=-1)
|
65 |
|
@@ -95,7 +95,7 @@ processor = Wav2Vec2Processor.from_pretrained("anton-l/wav2vec2-large-xlsr-53-ru
|
|
95 |
model = Wav2Vec2ForCTC.from_pretrained("anton-l/wav2vec2-large-xlsr-53-russian")
|
96 |
model.to("cuda")
|
97 |
|
98 |
-
cv_test = pd.read_csv("cv-corpus-6.1-2020-12-11/ru/test.tsv", sep='
|
99 |
clips_path = "cv-corpus-6.1-2020-12-11/ru/clips/"
|
100 |
|
101 |
def clean_sentence(sent):
|
|
|
59 |
inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
|
60 |
|
61 |
with torch.no_grad():
|
62 |
+
\\\\\\\\tlogits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
|
63 |
|
64 |
predicted_ids = torch.argmax(logits, dim=-1)
|
65 |
|
|
|
95 |
model = Wav2Vec2ForCTC.from_pretrained("anton-l/wav2vec2-large-xlsr-53-russian")
|
96 |
model.to("cuda")
|
97 |
|
98 |
+
cv_test = pd.read_csv("cv-corpus-6.1-2020-12-11/ru/test.tsv", sep='\t')
|
99 |
clips_path = "cv-corpus-6.1-2020-12-11/ru/clips/"
|
100 |
|
101 |
def clean_sentence(sent):
|