-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error - Error: global name 'cmuclmtk' is not defined #706
Comments
Seems like you probably just need to pip install cmuclmtk. You say you installed all the dependencies for the speech module. Can you post a link to exactly which set of instructions you followed? |
Sure. I am in the process of trying to build the jasper speech project. The instructions an be found at: https://jasperproject.github.io/documentation/installation/. I have had a look at the pip install but it returns with However,, when I use which cmuclmtk I must admit even though new to unix I am finding this difficult. do you think that I have built the packages correctly? |
I'm glad to hear that you are interested in this kind of project, sorry it's frustrating. First of all, I think Jasper still uses Python2.7, so if you have installed the dependencies in python 3 then they are not going to work (python 3 changed so many things that it is basically a different language from python 2). If your system uses python3 when you type "python" or pip3 when you type "pip", then you are probably on Arch linux. You need to use python2 and pip2 instead. try: sudo pip2 install cmuclmtk Second, cmuclmtk is a library, not an executable. Try searching for libcmuclmtk.a: Last, the last time the Jasper team merged a pull request was January 2017, almost two years ago (that's a long time in computer years). I don't think it's being actively maintained (please, someone correct me if I'm wrong), and the instructions, which were always a little iffy, are now stale which makes it even more confusing and frustrating. There are other projects with similar goals that are being actively maintained, so you might want to look at them. Good luck! |
try below pkg |
I am going to have a look at your suggestions - I am currently mobile and do not have my machine with me - however just putting this out there I am using a SUSe Leap but I should not think that makes a difference to the libraries and subsequent executable. Would it? |
most probably it will not work on openSUSe. |
Hi there G10DRAS, can I ask what makes you say that this application woll not work in openSUSe? What is it about this operating system that makes the build soo impossible?
Hi there G10DRAS, can I ask what makes you say that this application woll not work in openSUSe? What is it about this operating system that makes the build soo impossible? |
I compiled those binary for RaspberryPi arm architecture for OS Raspbian Jessie. |
I have installed this whole system on OpenSuse Tumbleweed using the instructions you referred to above:
These instructions build the library from source, so it should not matter what version of linux or which architecture you are on. What I have found is that installing cmuclmtk does not always install the python wrapper, so you have to manually "pip install cmuclmtk" in order to create the link. These are two different things that both need to be installed in order for "import cmuclmtk" to work in python. This can be confusing because sometimes the pypi package will also include the base library. Additionally, the error message you listed above was from python3, but Jasper uses python 2, so the fact that some module is or is not available in python3 doesn't say much about what Jasper will have access to. It may be that cmuclmtk has installed to somewhere that your system isn't looking for libraries. When I do 'sudo make install' on cmuclmtk, I get:
This is not a standard library location in linux, so you might need to add /usr/local to your /etc/ld.so.conf file and run sudo ldconfig Anyway, after installing the cmuclmtk program, I have the following header files in /usr/local:
and the installer also installs executables to /usr/local/bin:
and shared and static libraries here:
The actual python module appears to be here:
(note that this is python2.7, but it is also very possible to use "pip3 install cmuclmtk" to install it for python3.x). |
I see the same error, and the problem is really a hidden exception, which can be exposed like this:
So the CMUCLMTK binary need to be available for the module to load. |
Jasper AI
Hi Guys,
I am using Leap on openSUSe I have installed all the dependencies for the speech module but when I run python jasper.py I keep on getting an error.
My profile.yml looks like this:
carrier: ''
first_name: Tunji
gmail_address: tunjisakxxx.xxx
gmail_password: xxxxx
last_name: Saka
location: London
phone_number: 07721xxxxxx
prefers_email: true
stt_engine: sphinx
pocketsphinx:
hmm_dir: 'usr/share/po
timezone: GMT+0
However this is the response I get:
ERROR:client.vocabcompiler:Fatal compilation Error occured, cleaning up...
Traceback (most recent call last):
File "/home/sakat/jasper/client/vocabcompiler.py", line 163, in compile
self._compile_vocabulary(phrases)
File "/home/sakat/jasper/client/vocabcompiler.py", line 269, in _compile_vocabulary
vocabulary = self._compile_languagemodel(text, self.languagemodel_file)
File "/home/sakat/jasper/client/vocabcompiler.py", line 290, in _compile_languagemodel
cmuclmtk.text2vocab(text, vocab_file)
NameError: global name 'cmuclmtk' is not defined
ERROR:root:Error occured!
Traceback (most recent call last):
File "jasper.py", line 146, in
app = Jasper()
File "jasper.py", line 109, in init
stt_passive_engine_class.get_passive_instance(),
File "/home/sakat/jasper/client/stt.py", line 48, in get_passive_instance
return cls.get_instance('keyword', phrases)
File "/home/sakat/jasper/client/stt.py", line 40, in get_instance
vocabulary.compile(phrases)
File "/home/sakat/jasper/client/vocabcompiler.py", line 171, in compile
raise e
NameError: global name 'cmuclmtk' is not defined
Please, does any body have any suggestions?
The text was updated successfully, but these errors were encountered: