espnet/mediaspeech-fr-hubert
0
Usage
import librosa
from espnet2.bin.asr_inference import Speech2Text
speech2text = Speech2Text.from_pretrained(model_tag="espnet/mediaspeech-fr-hubert")
# 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)<!-- Generated by scripts/utils/showasrresult.sh -->
RESULTS
Environments
- date:
Tue Mar 22 13:50:31 UTC 2022 - python version:
3.7.11 (default, Jul 27 2021, 14:32:16) [GCC 7.5.0] - espnet version:
espnet 0.10.7a1 - pytorch version:
pytorch 1.10.1 - Git hash:
1991a25855821b8b61d775681aa0cdfd6161bbc8 - Commit date:
Mon Mar 21 22:19:19 2022 +0800
