ydshieh HF staff commited on
Commit
ef8e371
1 Parent(s): f4a9497

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -74,7 +74,7 @@ The model can be evaluated as follows on the zh-CN test data of Common Voice.
74
  Original CER calculation refer to https://huggingface.co/ctl/wav2vec2-large-xlsr-cantonese
75
 
76
  ```python
77
- !pip install jiwer
78
 
79
  import torch
80
  import torchaudio
@@ -114,7 +114,7 @@ processor = Wav2Vec2Processor.from_pretrained("ydshieh/wav2vec2-large-xlsr-53-ch
114
  model = Wav2Vec2ForCTC.from_pretrained("ydshieh/wav2vec2-large-xlsr-53-chinese-zh-cn-gpt")
115
  model.to("cuda")
116
 
117
- chars_to_ignore_regex = '[\\\\,\\\\?\\\\.\\\\!\\\\-\\\\;\\\\:"\\\\“\\\\%\\\\‘\\\\”\\\\�\\\\.\\\\⋯\\\\!\\\\-\\\\:\\\\–\\\\。\\\\》\\\\,\\\\)\\\\,\\\\?\\\\;\\\\~\\\\~\\\\…\\\\︰\\\\,\\\\(\\\\」\\\\‧\\\\《\\\\﹔\\\\、\\\\—\\\\/\\\\,\\\\「\\\\﹖\\\\·\\\\×\\\\̃\\\\̌\\\\ε\\\\λ\\\\μ\\\\и\\\\т\\\\─\\\\□\\\\〈\\\\〉\\\\『\\\\』\\\\ア\\\\オ\\\\カ\\\\チ\\\\ド\\\\ベ\\\\ャ\\\\ヤ\\\\ン\\\\・\\\\丶\\\\a\\\\b\\\\f\\\\g\\\\i\\\\n\\\\p\\\\t' + "\\\\']"
118
 
119
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
120
 
 
74
  Original CER calculation refer to https://huggingface.co/ctl/wav2vec2-large-xlsr-cantonese
75
 
76
  ```python
77
+ # pip install jiwer
78
 
79
  import torch
80
  import torchaudio
 
114
  model = Wav2Vec2ForCTC.from_pretrained("ydshieh/wav2vec2-large-xlsr-53-chinese-zh-cn-gpt")
115
  model.to("cuda")
116
 
117
+ chars_to_ignore_regex = '[\\\\\\\\,\\\\\\\\?\\\\\\\\.\\\\\\\\!\\\\\\\\-\\\\\\\\;\\\\\\\\:"\\\\\\\\“\\\\\\\\%\\\\\\\\‘\\\\\\\\”\\\\\\\\�\\\\\\\\.\\\\\\\\⋯\\\\\\\\!\\\\\\\\-\\\\\\\\:\\\\\\\\–\\\\\\\\。\\\\\\\\》\\\\\\\\,\\\\\\\\)\\\\\\\\,\\\\\\\\?\\\\\\\\;\\\\\\\\~\\\\\\\\~\\\\\\\\…\\\\\\\\︰\\\\\\\\,\\\\\\\\(\\\\\\\\」\\\\\\\\‧\\\\\\\\《\\\\\\\\﹔\\\\\\\\、\\\\\\\\—\\\\\\\\/\\\\\\\\,\\\\\\\\「\\\\\\\\﹖\\\\\\\\·\\\\\\\\×\\\\\\\\̃\\\\\\\\̌\\\\\\\\ε\\\\\\\\λ\\\\\\\\μ\\\\\\\\и\\\\\\\\т\\\\\\\\─\\\\\\\\□\\\\\\\\〈\\\\\\\\〉\\\\\\\\『\\\\\\\\』\\\\\\\\ア\\\\\\\\オ\\\\\\\\カ\\\\\\\\チ\\\\\\\\ド\\\\\\\\ベ\\\\\\\\ャ\\\\\\\\ヤ\\\\\\\\ン\\\\\\\\・\\\\\\\\丶\\\\\\\\a\\\\\\\\b\\\\\\\\f\\\\\\\\g\\\\\\\\i\\\\\\\\n\\\\\\\\p\\\\\\\\t' + "\\\\\\\\']"
118
 
119
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
120