qinyue commited on
Commit
14de29e
1 Parent(s): c012fe5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -5
README.md CHANGED
@@ -3,7 +3,7 @@ language: zh-CN
3
  datasets:
4
  - aishell1
5
  metrics:
6
- - cer
7
  tags:
8
  - audio
9
  - automatic-speech-recognition
@@ -21,8 +21,8 @@ model-index:
21
  type: aishell1
22
  args: zh-CN
23
  metrics:
24
- - name: Test CER
25
- type: cer
26
  value: 7.04
27
  ---
28
 
@@ -31,11 +31,44 @@ model-index:
31
  Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on Chinese using the [AISHELL-1](https://github.com/kaldi-asr/kaldi/tree/master/egs/aishell).
32
  When using this model, make sure that your speech input is sampled at 16kHz.
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  **Test Result**:
36
 
37
- In the table below I report the Character Error Rate (CER) of the model. I ran the evaluation script described above.
38
 
39
- | Model | CER | CER-with-LM |
40
  | ------------- | ------------- | ------------- |
41
  | qinyue/wav2vec2-large-xlsr-53-chinese-zn-cn-aishell1 | **7.04%** | **3.96%** |
 
3
  datasets:
4
  - aishell1
5
  metrics:
6
+ - wer
7
  tags:
8
  - audio
9
  - automatic-speech-recognition
 
21
  type: aishell1
22
  args: zh-CN
23
  metrics:
24
+ - name: Test WER
25
+ type: wer
26
  value: 7.04
27
  ---
28
 
 
31
  Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on Chinese using the [AISHELL-1](https://github.com/kaldi-asr/kaldi/tree/master/egs/aishell).
32
  When using this model, make sure that your speech input is sampled at 16kHz.
33
 
34
+ ## Evaluation
35
+
36
+ ```python
37
+ wer_metric = load_metric("wer")
38
+
39
+ def compute_metrics(pred):
40
+ pred_logits = pred.predictions
41
+ pred_ids = np.argmax(pred_logits, axis=-1)
42
+
43
+ pred.label_ids[pred.label_ids == -100] = processor.tokenizer.pad_token_id
44
+
45
+ pred_str = processor.batch_decode(pred_ids, spaces_between_special_tokens=True)
46
+ label_str = processor.batch_decode(pred.label_ids, group_tokens=False, spaces_between_special_tokens=True)
47
+
48
+ wer = wer_metric.compute(predictions=pred_str, references=label_str)
49
+
50
+ return {"wer": wer}
51
+ ```
52
+
53
+ ## Results
54
+
55
+ | Reference | Prediction |
56
+ | ------------- | ------------- |
57
+ | 据 伟 业 我 爱 我 家 市 场 研 究 院 测 算 | 据 北 业 我 爱 我 家 市 场 研 究 院 测 算 |
58
+ | 七 月 北 京 公 积 金 贷 款 成 交 量 提 升 了 百 分 之 五 | 七 月 北 京 公 积 金 贷 款 成 交 量 提 升 了 百 分 之 五 |
59
+ | 培 育 门 类 丰 富 层 次 齐 用 的 综 合 利 用 产 业 | 培 育 门 类 丰 富 层 资 集 业 的 综 合 利 用 产 业 |
60
+ | 我 们 迎 来 了 赶 超 发 达 国 家 的 难 得 机 遇 | 我 们 迎 来 了 赶 超 发 达 国 家 的 单 得 机 遇 |
61
+ | 坚 持 基 本 草 原 保 护 制 度 | 坚 持 基 本 草 员 保 护 制 度 |
62
+ | 强 化 水 生 生 态 修 复 和 建 设 | 强 化 水 生 生 态 修 复 和 建 设 |
63
+ | 温 州 两 男 子 为 争 女 人 驾 奔 驰 宝 马 街 头 四 次 对 撞 | 温 州 两 男 子 为 争 女 人 架 奔 驰 宝 马 接 头 四 次 对 重 |
64
+ | 她 表 示 应 该 是 吃 吃 饭 看 电 影 之 类 的 | 他 表 示 一 的 是 吃 吃 饭 看 电 影 之 理 |
65
+ | 加 强 畜 禽 遗 传 资 源 和 农 业 野 生 植 物 资 源 保 护 | 加 强 续 紧 遗 传 资 源 和 农 业 野 生 职 物 资 源 保 护 |
66
+ | 两 人 都 是 依 赖 电 话 沟 通 | 两 人 都 是 依 赖 电 话 沟 通 |
67
 
68
  **Test Result**:
69
 
70
+ In the table below I report the Word Error Rate (WER) of the model on the AISHELL-1 test dataset.
71
 
72
+ | Model | WER | WER-with-LM |
73
  | ------------- | ------------- | ------------- |
74
  | qinyue/wav2vec2-large-xlsr-53-chinese-zn-cn-aishell1 | **7.04%** | **3.96%** |