Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer utilise l’IA pour améliorer la qualité des vidéos, restituer les détails, réduire le flou et agrandir
The Mandarin-wav2vec2.0 model is pre-trained on 1000 hours of AISHELL-2 dataset. The pre-training detail can be found at
https://github.com/kehanlu/mandarin-wav2vec2
. This model is fine-tuned on 178 hours of AISHELL-1 dataset and is the baseline model in the paper "A context-aware knowledge transferring strategy for CTC-based ASR
"(
preprint
).
Results on AISHELL-1
CER
dev
test
vanilla w2v2-CTC
4.85
5.13
Usage
Note:
the model is fine-tuned using ESPNET toolkit, then converted to huggingface model for simple usage.
import torch
import soundfile as sf
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
classExtendedWav2Vec2ForCTC(Wav2Vec2ForCTC):
""" In ESPNET there is a LayerNorm layer between encoder output and CTC classification head. """def__init__(self, config):
super().__init__(config)
self.lm_head = torch.nn.Sequential(
torch.nn.LayerNorm(config.hidden_size),
self.lm_head
)
model = ExtendedWav2Vec2ForCTC.from_pretrained("kehanlu/mandarin-wav2vec2-aishell1")
processor = Wav2Vec2Processor.from_pretrained("kehanlu/mandarin-wav2vec2-aishell1")
audio_input, sample_rate = sf.read("/path/to/data_aishell/wav/dev/S0724/BAC009S0724W0121.wav")
inputs = processor(audio_input, sampling_rate=sample_rate, return_tensors="pt")
with torch.no_grad():
model.eval()
logits = model(**inputs).logits
predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)
print(transcription[0])
# 广州市房地产中介协会分析
Licence
The pre-trained corpus, AISHELL-2, is supported by AISHELL fundation. The outcome model also follow the licence of AISHELL-2. It is free to use for academic purpose and should not be used on any commercial purpose without the permission from AISHELL fundation. (
https://www.aishelltech.com/aishell_2
)
@ARTICLE{aishell2,
author = {{Du}, J. and {Na}, X. and {Liu}, X. and {Bu}, H.},
title = "{AISHELL-2: Transforming Mandarin ASR Research Into Industrial Scale}",
journal = {ArXiv},
eprint = {1808.10583},
primaryClass = "cs.CL",
year = 2018,
month = Aug,
}
if you find this useful, please cite
@article{lu2022context,
title={A context-aware knowledge transferring strategy for CTC-based ASR},
author={Lu, Ke-Han and Chen, Kuan-Yu},
journal={arXiv preprint arXiv:2210.06244},
year={2022}
}
Runs of kehanlu mandarin-wav2vec2-aishell1 on huggingface.co
164
Total runs
12
24-hour runs
27
3-day runs
99
7-day runs
-59
30-day runs
More Information About mandarin-wav2vec2-aishell1 huggingface.co Model
mandarin-wav2vec2-aishell1 huggingface.co
mandarin-wav2vec2-aishell1 huggingface.co is an AI model on huggingface.co that provides mandarin-wav2vec2-aishell1's model effect (), which can be used instantly with this kehanlu mandarin-wav2vec2-aishell1 model. huggingface.co supports a free trial of the mandarin-wav2vec2-aishell1 model, and also provides paid use of the mandarin-wav2vec2-aishell1. Support call mandarin-wav2vec2-aishell1 model through api, including Node.js, Python, http.
mandarin-wav2vec2-aishell1 huggingface.co is an online trial and call api platform, which integrates mandarin-wav2vec2-aishell1's modeling effects, including api services, and provides a free online trial of mandarin-wav2vec2-aishell1, you can try mandarin-wav2vec2-aishell1 online for free by clicking the link below.
kehanlu mandarin-wav2vec2-aishell1 online free url in huggingface.co:
mandarin-wav2vec2-aishell1 is an open source model from GitHub that offers a free installation service, and any user can find mandarin-wav2vec2-aishell1 on GitHub to install. At the same time, huggingface.co provides the effect of mandarin-wav2vec2-aishell1 install, users can directly use mandarin-wav2vec2-aishell1 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
mandarin-wav2vec2-aishell1 install url in huggingface.co: