Open talal-sen opened 3 years ago
Please check the Requirements section of this repo. For the iterItems problem, see e.g. http://docs.buildbot.net/0.9.4/developer/py3-compat.html You can port this repo to Python 3 and share your results; or you must use Python 2.
Thanks for the reply, how. do i ensure that this uses python 2 to run?
I change the python path in vi /opt/conda/bin/kaldi-adapt-lm frpm the default python to python 2. Howver i am getting this error
kaldi-adapt-lm /home/jupyter/kaldi-generic-en-tdnn_fl-r20190609 lm.arpa mymodel -w=/home/jupyter/lm_model2 -f -v
Traceback (most recent call last):
File "/opt/conda/bin/kaldi-adapt-lm", line 4, in
You probably must repeat some preparation steps as needed. A fresh install after installing python-is-python2 sometimes work.
I tried installing everything from scratch using python 2.7
sudo python2.7 setup.py install
running install running bdist_egg running egg_info writing requirements to kaldi_adapt_lm.egg-info/requires.txt writing kaldi_adapt_lm.egg-info/PKG-INFO writing top-level names to kaldi_adapt_lm.egg-info/top_level.txt writing dependency_links to kaldi_adapt_lm.egg-info/dependency_links.txt reading manifest file 'kaldi_adapt_lm.egg-info/SOURCES.txt' writing manifest file 'kaldi_adapt_lm.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/kaldiadaptlm creating build/bdist.linux-x86_64/egg/kaldiadaptlm/templates copying build/lib.linux-x86_64-2.7/kaldiadaptlm/templates/kaldi-cmd.sh -> build/bdist.linux-x86_64/egg/kaldiadaptlm/templates copying build/lib.linux-x86_64-2.7/kaldiadaptlm/templates/kaldi-run-adaptation.sh -> build/bdist.linux-x86_64/egg/kaldiadaptlm/templates copying build/lib.linux-x86_64-2.7/kaldiadaptlm/templates/kaldi-path.sh.template -> build/bdist.linux-x86_64/egg/kaldiadaptlm/templates copying build/lib.linux-x86_64-2.7/kaldiadaptlm/templates/kaldi-model-dist.sh -> build/bdist.linux-x86_64/egg/kaldiadaptlm/templates copying build/lib.linux-x86_64-2.7/kaldiadaptlm/init.py -> build/bdist.linux-x86_64/egg/kaldiadaptlm byte-compiling build/bdist.linux-x86_64/egg/kaldiadaptlm/init.py to init.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts running install_scripts running build_scripts copying and adjusting kaldi-adapt-lm -> build/scripts-2.7 creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/kaldi-adapt-lm -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/kaldi-adapt-lm to 755 copying kaldi_adapt_lm.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying kaldi_adapt_lm.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying kaldi_adapt_lm.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying kaldi_adapt_lm.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying kaldi_adapt_lm.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying kaldi_adapt_lm.egg-info/.ipynb_checkpoints/PKG-INFO-checkpoint -> build/bdist.linux-x86_64/egg/EGG-INFO/.ipynb_checkpoints copying kaldi_adapt_lm.egg-info/.ipynb_checkpoints/SOURCES-checkpoint.txt -> build/bdist.linux-x86_64/egg/EGG-INFO/.ipynb_checkpoints copying kaldi_adapt_lm.egg-info/.ipynb_checkpoints/dependency_links-checkpoint.txt -> build/bdist.linux-x86_64/egg/EGG-INFO/.ipynb_checkpoints copying kaldi_adapt_lm.egg-info/.ipynb_checkpoints/requires-checkpoint.txt -> build/bdist.linux-x86_64/egg/EGG-INFO/.ipynb_checkpoints copying kaldi_adapt_lm.egg-info/.ipynb_checkpoints/top_level-checkpoint.txt -> build/bdist.linux-x86_64/egg/EGG-INFO/.ipynb_checkpoints zip_safe flag not set; analyzing archive contents... kaldiadaptlm.init: module references file creating 'dist/kaldi_adapt_lm-0.1.4-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing kaldi_adapt_lm-0.1.4-py2.7.egg removing '/usr/local/lib/python2.7/dist-packages/kaldi_adapt_lm-0.1.4-py2.7.egg' (and everything under it) creating /usr/local/lib/python2.7/dist-packages/kaldi_adapt_lm-0.1.4-py2.7.egg Extracting kaldi_adapt_lm-0.1.4-py2.7.egg to /usr/local/lib/python2.7/dist-packages kaldi-adapt-lm 0.1.4 is already the active version in easy-install.pth Installing kaldi-adapt-lm script to /usr/local/bin
Installed /usr/local/lib/python2.7/dist-packages/kaldi_adapt_lm-0.1.4-py2.7.egg
Processing dependencies for kaldi-adapt-lm==0.1.4
Searching for py-kaldi-asr
Reading https://pypi.org/simple/py-kaldi-asr/
Downloading https://files.pythonhosted.org/packages/b5/bb/0082185cfa67d63068358de9b1a65661c8dcdbe97e935809427d5881ea17/py-kaldi-asr-0.5.2.tar.gz#sha256=481c401c51ff48797a08e7eeec9ed3145a8600dc1b4699e41e26057794c49680
Best match: py-kaldi-asr 0.5.2
Processing py-kaldi-asr-0.5.2.tar.gz
Writing /tmp/easy_install-aNxuh7/py-kaldi-asr-0.5.2/setup.cfg
Running py-kaldi-asr-0.5.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-aNxuh7/py-kaldi-asr-0.5.2/egg-dist-tmp-LmZXmp
Traceback (most recent call last):
File "setup.py", line 29, in
But cython is already installed
pip2 install cython Requirement already satisfied: cython in /home/jupyter/.local/lib/python2.7/site-packages (0.29.21)
Hi, I was able to install kaldi-lm-adpat. After running the command on my sentences.txt with the Zamia pretrained model, I got this error
0609 lm.arpa mymodel -w=/home/jupyter/lm_model -f INFO:root:rm -rf =/home/jupyter/lm_model INFO:root:copying dictionary and phoneme sets from original model... INFO:root:creating skeleton destination model... Traceback (most recent call last): File "/opt/conda/bin/kaldi-adapt-lm", line 4, in
import('pkg_resources').run_script('kaldi-adapt-lm==0.1.4', 'kaldi-adapt-lm')
File "/opt/conda/lib/python3.7/site-packages/pkg_resources/init.py", line 665, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/opt/conda/lib/python3.7/site-packages/pkg_resources/init.py", line 1463, in run_script
exec(code, namespace, namespace)
File "/opt/conda/lib/python3.7/site-packages/kaldi_adapt_lm-0.1.4-py3.7.egg/EGG-INFO/scripts/kaldi-adapt-lm", line
93, in
kaldi_adapt_lm (kaldi_root, src_model_dir, lm_fn, work_dir, dst_model_name)
File "/opt/conda/lib/python3.7/site-packages/kaldi_adapt_lm-0.1.4-py3.7.egg/kaldiadaptlm/init.py", line 100, i
n kaldi_adapt_lm
misc.render_template ('%s/kaldi-path.sh.template' % tmpl_dir, '%s/path.sh' % work_dir, kaldi_root=kaldi_root)
File "/opt/conda/lib/python3.7/site-packages/py_nltools-0.5.0-py3.7.egg/nltools/misc.py", line 307, in render_temp
late
for key, value in kwargs.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'