CoolFace
Modelpublic

espnet/shihlun_asr_whisper_medium_finetuned_chime4

sourceHugging Facecc-by-4.0updated 8d agoView on Hugging Face
0likes16downloads
Model Card

Usage

python
import librosa
from espnet2.bin.asr_inference import Speech2Text

speech2text = Speech2Text.from_pretrained(model_tag="espnet/shihlun_asr_whisper_medium_finetuned_chime4")
# 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)

ESPnet2 ASR model

espnet/shihlun_asr_whisper_medium_finetuned_chime4

This model was trained by Shih-Lun Wu (slseanwu) using the chime4 recipe in espnet.

Demo: How to use in ESPnet2

bash
cd espnet
pip install -e .
cd egs2/chime4/asr1

train_set=tr05_multi_noisy_si284 # tr05_multi_noisy (original training data) or tr05_multi_noisy_si284 (add si284 data)
valid_set=dt05_multi_isolated_1ch_track
test_sets="dt05_real_isolated_1ch_track dt05_simu_isolated_1ch_track et05_real_isolated_1ch_track et05_simu_isolated_1ch_track"

asr_tag=whisper_medium_finetune_lr1e-5_adamw_wd1e-2_3epochs
asr_config=conf/tuning/train_asr_whisper_full.yaml
inference_config=conf/decode_asr_whisper_noctc_greedy.yaml

./asr.sh \
    --skip_data_prep false \
    --skip_train true \
    --skip_eval false \
    --lang en \
    --ngpu 1 \
    --nj 4 \
    --stage 1 \
    --stop_stage 13 \
    --gpu_inference true \
    --inference_nj 1 \
    --token_type whisper_multilingual \
    --feats_normalize '' \
    --max_wav_duration 30 \
    --feats_type raw \
    --use_lm false \
    --cleaner whisper_en \
    --asr_tag "${asr_tag}" \
    --asr_config "${asr_config}" \
    --inference_config "${inference_config}" \
    --inference_asr_model valid.acc.ave.pth \
    --train_set "${train_set}" \
    --valid_set "${valid_set}" \
    --test_sets "${test_sets}" "$@"

<!-- Generated by scripts/utils/showasrresult.sh -->

RESULTS

Environments

  • —date: Tue Jan 10 04:15:30 CST 2023
  • —python version: 3.9.13 (main, Aug 25 2022, 23:26:10) [GCC 11.2.0]
  • —espnet version: espnet 202211
  • —pytorch version: pytorch 1.12.1
  • —Git hash: d89be931dcc8f61437ac49cbe39a773f2054c50c
  • —Commit date: Mon Jan 9 11:06:45 2023 -0600

asrwhispermediumfinetunelr1e-5adamwwd1e-2_3epochs

WER

datasetSntWrdCorrSubDelInsErrS.Err
decodeasrwhispernoctcbeam20asrmodelvalid.acc.ave/dt05realisolated1ch_track16402479197.81.70.50.32.524.5
decodeasrwhispernoctcbeam20asrmodelvalid.acc.ave/dt05simuisolated1ch_track16402479296.13.00.90.54.435.6
decodeasrwhispernoctcbeam20asrmodelvalid.acc.ave/et05realisolated1ch_track13201934196.42.90.70.54.133.0
decodeasrwhispernoctcbeam20asrmodelvalid.acc.ave/et05simuisolated1ch_track13201934493.45.01.70.87.441.8
decodeasrwhispernoctcgreedyasrmodelvalid.acc.ave/dt05realisolated1ch_track16402479197.71.80.50.42.825.5
decodeasrwhispernoctcgreedyasrmodelvalid.acc.ave/dt05simuisolated1ch_track16402479296.03.30.80.74.836.0
decodeasrwhispernoctcgreedyasrmodelvalid.acc.ave/et05realisolated1ch_track13201934196.13.30.60.74.634.9
decodeasrwhispernoctcgreedyasrmodelvalid.acc.ave/et05simuisolated1ch_track13201934492.95.81.31.28.343.2

CER

datasetSntWrdCorrSubDelInsErrS.Err
decodeasrwhispernoctcbeam20asrmodelvalid.acc.ave/dt05realisolated1ch_track164014188999.10.30.50.31.224.5
decodeasrwhispernoctcbeam20asrmodelvalid.acc.ave/dt05simuisolated1ch_track164014190098.20.81.00.52.335.6
decodeasrwhispernoctcbeam20asrmodelvalid.acc.ave/et05realisolated1ch_track132011055898.50.70.80.51.933.0
decodeasrwhispernoctcbeam20asrmodelvalid.acc.ave/et05simuisolated1ch_track132011057296.51.61.90.84.341.8
decodeasrwhispernoctcgreedyasrmodelvalid.acc.ave/dt05realisolated1ch_track164014188999.10.40.50.51.325.5
decodeasrwhispernoctcgreedyasrmodelvalid.acc.ave/dt05simuisolated1ch_track164014190098.20.90.90.62.436.0
decodeasrwhispernoctcgreedyasrmodelvalid.acc.ave/et05realisolated1ch_track132011055898.40.90.70.62.234.9
decodeasrwhispernoctcgreedyasrmodelvalid.acc.ave/et05simuisolated1ch_track132011057296.32.01.71.24.943.2