flashlight / wav2letter

Facebook AI Research's Automatic Speech Recognition Toolkit
https://github.com/facebookresearch/wav2letter/wiki
Other
6.35k stars 1.02k forks source link

Unable to install wav2letter #996

Closed BakingBrains closed 2 years ago

BakingBrains commented 2 years ago

I am following the below steps to install wav2letter. But facing some issues while installing.

git clone -b v0.2 https://github.com/facebookresearch/wav2letter.git
cd wav2letter/bindings/python
export KENLM_ROOT_DIR=export KENLM_ROOT_DIR=/content/self-supervised-speech-recognition/libs/kenlm && pip install -e .
cd ../../..

Error:

Obtaining file:///content/self-supervised-speech-recognition/libs/wav2letter/bindings/python
Installing collected packages: wav2letter
  Running setup.py develop for wav2letter
ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/content/self-supervised-speech-recognition/libs/wav2letter/bindings/python/setup.py'"'"'; __file__='"'"'/content/self-supervised-speech-recognition/libs/wav2letter/bindings/python/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

Any suggestions?

Thank you

jacobkahn commented 2 years ago

@BakingBrains please paste full logs as the error message says.

BakingBrains commented 2 years ago

@jacobkahn Thank you. I resolved it

IGWPark commented 2 years ago

Hi, could you share how you resolved the issue?

I encounter the same problem...

BakingBrains commented 2 years ago

@IlllIIII after installing kenlm in colab Do this

!git clone -b v0.2 https://github.com/facebookresearch/wav2letter.git
%cd wav2letter/bindings/python
import os
os.environ['KENLM_ROOT_DIR'] = "/content/kenlm/"
!export KENLM_ROOT_DIR=/content/self-supervised-speech-recognition/libs/kenlm/
!pip install -e .

Hope this helps

IGWPark commented 2 years ago

Hey, thanks for the reply :)

I'm installing wav2letter locally and I double-checked KENLM_ROOT_DIR but I'm still getting the same error. I think there's a problem with my environment...

but thanks again!

BakingBrains commented 2 years ago

@IlllIIII In local as well

execute this

import os
os.environ['KENLM_ROOT_DIR'] = "/content/kenlm/"

and then install wav2letter.

This solved for me (loclally as well)