igorsitdikov / lid_kaldi

Apache License 2.0
22 stars 6 forks source link

How to use lid_kaldi #2

Closed asadullah73-ce closed 3 years ago

asadullah73-ce commented 3 years ago

How to use lid_kaldi for language identification?

igorsitdikov commented 3 years ago

You can find example here https://github.com/igorsitdikov/lid_kaldi/blob/master/python/example/test_simple.py

asadullah73-ce commented 3 years ago

Where to get lid-model in the example. I am getting this error in the example: from lid import Model, KaldiRecognizer ModuleNotFoundError: No module named 'lid'

s-chizhik commented 3 years ago

Hi! Thx @igorsitdikov for your work! I have related question.

I installed whl on my PC. But when I try to run example, I got an error

ERROR ([5.5.873~1-75ec]:ReadConfigFile():parse-options.cc:462) Cannot open config file: lid-model/mfcc.conf

I suppose I need to get somewhere lid-model folder. Where I can get it?

s-chizhik commented 3 years ago

@asadullah73-ce install whl file for your platform from releases page.

For example

pip install https://github.com/igorsitdikov/lid_kaldi/releases/download/1.0.1/lid-1.0.1-py3-none-manylinux2010_x86_64.whl
s-chizhik commented 3 years ago

Ok, I figured out with my problem. I was misled because actual model was in version https://github.com/igorsitdikov/lid_kaldi/releases/tag/1.0.0 and actual whl in https://github.com/igorsitdikov/lid_kaldi/releases/tag/1.0.1

igorsitdikov commented 3 years ago

@s-chizhik , @asadullah73-ce updated release 1.0.1, added archive with the lid-model. https://github.com/igorsitdikov/lid_kaldi/releases/download/1.0.1/lid-model.tar.xz

s-chizhik commented 3 years ago

@igorsitdikov thx a lot!

asadullah73-ce commented 3 years ago

One more question please. Does this detect other languages e.g Hindi or Urdu or Arabic?

asadullah73-ce commented 3 years ago

Okay, I was able to detect Urdu language from the code.