mrm8488 commited on
Commit
795b3d4
1 Parent(s): 5785c19

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -84,7 +84,7 @@ processor = Wav2Vec2Processor.from_pretrained("mrm8488/wav2vec2-large-xlsr-53-eu
84
  model = Wav2Vec2ForCTC.from_pretrained("mrm8488/wav2vec2-large-xlsr-53-euskera")
85
  model.to("cuda")
86
 
87
- chars_to_ignore_regex = '[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\?\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\-\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\“]'
88
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
89
 
90
  # Preprocessing the datasets.
@@ -105,7 +105,7 @@ def evaluate(batch):
105
  with torch.no_grad():
106
  logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
107
 
108
- pred_ids = torch.argmax(logits, dim=-1)
109
  batch["pred_strings"] = processor.batch_decode(pred_ids)
110
  return batch
111
 
 
84
  model = Wav2Vec2ForCTC.from_pretrained("mrm8488/wav2vec2-large-xlsr-53-euskera")
85
  model.to("cuda")
86
 
87
+ chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“\%\‘\”\�]'
88
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
89
 
90
  # Preprocessing the datasets.
 
105
  with torch.no_grad():
106
  logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
107
 
108
+ pred_ids = torch.argmax(logits, dim=-1)
109
  batch["pred_strings"] = processor.batch_decode(pred_ids)
110
  return batch
111