Downloads · 30 days
9
6% of all-time downloads
espnet/shihlun-asr-commonvoice-zh-TW
shihlun-asr-commonvoice-zh-TW is a automatic speech recognition model from espnet. Use it when you need speech turned into text. It is set up for espnet. The card lists the license as cc-by-4.0.
This model was trained by Shih-Lun Wu using the commonvoice recipe in espnet.
Downloads · 30 days
9
6% of all-time downloads
All-time downloads
150
Public
Repo size
180 MB
Likes
0
Public
Click a slice to open those files.
.pth180 MB · 100%
From the Hugging Face model README
import librosa
from espnet2.bin.asr_inference import Speech2Text
speech2text = Speech2Text.from_pretrained(model_tag="espnet/shihlun-asr-commonvoice-zh-TW")
# librosa resamples and mixes to one channel, so any file works; 16000 is
# what nearly every espnet recogniser is trained on - check this model's
# config if its audio is not 16 kHz
speech, rate = librosa.load("audio.wav", sr=16000, mono=True)
text, *_ = speech2text(speech)[0]
print(text)
espnet/shihlun-asr-commonvoice-zh-TWThis model was trained by Shih-Lun Wu using the commonvoice recipe in espnet.
cd espnet
pip install -e .
cd egs2/commonvoice/asr1
./asr.sh \
--stage 1 \
--stop_stage 13 \
--nj 32 \
--inference_nj 32 \
--skip_train true \
--train_set "train_zh_TW" \
--valid_set "dev_zh_TW" \
--test_sets "dev_zh_TW test_zh_TW" \
--lang "zh_TW" \
--local_data_opts "--lang zh-TW" \
--speed_perturb_factors "0.9 1.0 1.1" \
--lm_train_text "data/train_zh_TW/text" \
--token_type bpe \
--nbpe 2542 \
--bpemode "unigram" \
--bpe_train_text "data/train_zh_TW/text" \
--use_lm false \
--inference_asr_model "valid.acc.best.pth" \
--download_model "espnet/shihlun-asr-commonvoice-zh-TW"
<!-- Generated by scripts/utils/show_asr_result.sh -->
Thu Sep 1 21:49:10 UTC 20223.9.12 (main, Jun 1 2022, 11:38:51) [GCC 7.5.0]espnet 202207pytorch 1.12.1+cu10213db69d3befc3c82a5ff5a11e28bf79d5030603f
Mon Aug 29 13:44:35 2022 +0000| dataset | Snt | Wrd | Corr | Sub | Del | Ins | Err | S.Err |
|---|---|---|---|---|---|---|---|---|
| inference_asr_model_valid.acc.best/dev_zh_TW | 2627 | 22200 | 97.7 | 2.1 | 0.2 | 0.0 | 2.4 | 9.5 |
| inference_asr_model_valid.acc.best/test_zh_TW | 2627 | 21991 | 98.0 | 1.6 | 0.4 | 0.1 | 2.1 | 7.7 |
| dataset | Snt | Wrd | Corr | Sub | Del | Ins | Err | S.Err |
|---|---|---|---|---|---|---|---|---|
| inference_asr_model_valid.acc.best/dev_zh_TW | 2627 | 24827 | 98.6 | 1.2 | 0.2 | 0.0 | 1.5 | 4.0 |
| inference_asr_model_valid.acc.best/test_zh_TW | 2627 | 24618 | 98.8 | 0.9 | 0.4 | 0.1 | 1.3 | 3.4 |