gorkemgoknar commited on
Commit
a8cb69e
·
1 Parent(s): 4d1fa17

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -7
README.md CHANGED
@@ -28,9 +28,10 @@ model-index:
28
  ---
29
  # Wav2Vec2-Large-XLSR-53-Turkish
30
 
31
- Note: Common voice Turkish data is no background noise voice only dataset
32
- In this model although Word Error rate for test is 50% it is agains Common Voice text
33
- Please try speech yourself and see it is converting pretty good
 
34
  I hope some news channels or movie producers lets use their data for test/training (I asked some no reply)
35
 
36
 
@@ -119,7 +120,7 @@ model.to("cuda")
119
 
120
  #Note: Not ignoring "'" on this one
121
  #Note: Not ignoring "'" on this one
122
- chars_to_ignore_regex = '[\\\\\\\\,\\\\\\\\?\\\\\\\\.\\\\\\\\!\\\\\\\\-\\\\\\\\;\\\\\\\\:\\\\\\\\"\\\\\\\\“\\\\\\\\%\\\\\\\\‘\\\\\\\\”\\\\\\\\�\\\\\\\\#\\\\\\\\>\\\\\\\\<\\\\\\\\_\\\\\\\\’\\\\\\\\[\\\\\\\\]\\\\\\\\{\\\\\\\\}]'
123
 
124
  #resampler = torchaudio.transforms.Resample(48_000, 16_000)
125
  #using custom load and transformer for audio -> see audio_resampler
@@ -154,13 +155,13 @@ def audio_resampler(batch, new_sample_rate = 16000):
154
  def remove_special_characters(batch):
155
 
156
  ##this one comes from subtitles if additional timestamps not processed -> 00:01:01 00:01:01,33
157
- batch["sentence"] = re.sub('\\\\\\\\b\\\\\\\\d{2}:\\\\\\\\d{2}:\\\\\\\\d{2}(,+\\\\\\\\d{2})?\\\\\\\\b', ' ', batch["sentence"])
158
 
159
  ##remove all caps in text [AÇIKLAMA] etc, do it before..
160
- batch["sentence"] = re.sub('\\\\\\\\[(\\\\\\\\b[A-Z]+\\\\\\\\])', '', batch["sentence"])
161
 
162
  ##replace three dots (that are inside string with single)
163
- batch["sentence"] = re.sub("([a-zA-Z]+)\\\\\\\\.\\\\\\\\.\\\\\\\\.", r"\\\\\\\\1.", batch["sentence"])
164
 
165
  #standart ignore list
166
  batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower() + " "
 
28
  ---
29
  # Wav2Vec2-Large-XLSR-53-Turkish
30
 
31
+ Note: Common voice Turkish data is no background noise voice only dataset.
32
+ In this model although Word Error rate for test is 50% it is agains Common Voice text.
33
+
34
+ Please try speech yourself and see it is converting pretty good .
35
  I hope some news channels or movie producers lets use their data for test/training (I asked some no reply)
36
 
37
 
 
120
 
121
  #Note: Not ignoring "'" on this one
122
  #Note: Not ignoring "'" on this one
123
+ chars_to_ignore_regex = """[\,\?\.\!\-\;\:\"\“\%\‘\”\�\#\>\<\_\’\[\]\{\}]"""
124
 
125
  #resampler = torchaudio.transforms.Resample(48_000, 16_000)
126
  #using custom load and transformer for audio -> see audio_resampler
 
155
  def remove_special_characters(batch):
156
 
157
  ##this one comes from subtitles if additional timestamps not processed -> 00:01:01 00:01:01,33
158
+ batch["sentence"] = re.sub('\\\\\\\\\\\\\\\\b\\\\\\\\\\\\\\\\d{2}:\\\\\\\\\\\\\\\\d{2}:\\\\\\\\\\\\\\\\d{2}(,+\\\\\\\\\\\\\\\\d{2})?\\\\\\\\\\\\\\\\b', ' ', batch["sentence"])
159
 
160
  ##remove all caps in text [AÇIKLAMA] etc, do it before..
161
+ batch["sentence"] = re.sub('\\\\\\\\\\\\\\\\[(\\\\\\\\\\\\\\\\b[A-Z]+\\\\\\\\\\\\\\\\])', '', batch["sentence"])
162
 
163
  ##replace three dots (that are inside string with single)
164
+ batch["sentence"] = re.sub("([a-zA-Z]+)\\\\\\\\\\\\\\\\.\\\\\\\\\\\\\\\\.\\\\\\\\\\\\\\\\.", r"\\\\\\\\\\\\\\\\1.", batch["sentence"])
165
 
166
  #standart ignore list
167
  batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower() + " "