facebookresearch / fairseq

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
MIT License
29.78k stars 6.3k forks source link

[Wav2Vec2-XLSR-53]Problems about the pretrained model #5418

Open scutcsq opened 5 months ago

scutcsq commented 5 months ago

Hi, when I tried to use wav2vec2.0 using transformers following the under lines under the Linux system:

from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor

load pretrained model

processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-xlsr-53-espeak-cv-ft") model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-xlsr-53-espeak-cv-ft")

I met the problem: "Espeak not installed on your system".

kgoba commented 4 months ago

For me the following worked on Mac: 1) Install espeak or espeak-ng. 2) Use environment variable PHONEMIZER_ESPEAK_LIBRARY pointing to the dylib (or perhaps DLL on Windows) when you run your python code: export PHONEMIZER_ESPEAK_LIBRARY=/opt/local/lib/libespeak-ng.dylib