Open KanameMadoka opened 9 years ago
Concerning 3.: This actually contradicts the goal to archieve platform independence. IMHO, no changes to ALSA should be necessary - only a properly configured audio setup, so that aplay
and arecord
work without specifing a device explicitly. @crm416 What do you think?
https://github.com/jasperproject/jasper-client/issues/140
The configuration is a bit different on the B+ , my guess is due to dropping the RCA , moving the HDMI ports, etc etc...
about number 3:
edit ~/.asoundrc and add the following:
pcm.!default {
type plug
slave {
pcm "hw:1,0"
}
}
ctl.!default {
type hw
card 1
}
restart and then run the following:
sudo modprobe snd-bcm2835
amixer cset numid=3 N
In the last command, change N to 1 if you're using analog or 2 if you're using HDMI.
This steps fixed it for me. cheers.
Depending of your microphone, you might also need to specify the card number :
amixer -c1 cset numid=3 N
I tried with the OpenFST 1.3.3 version with the swap space and it shows a swap space of more than 512MB but it still doesn't work.
I am trying to install it on a Raspberry Pi B+ which has a 512 MB RAM. Having Googled about installing the OpenFST on a Linux platform I came across a point where it said I should have my swap space twice that of my RAM which is 512 MB.
Do you guys think this could be as issue? Or should I try installing version 1.3.4 ? @KanameMadoka were you able to resolve this issue?
I'm currently using OpenFST 1.4.1 without problems.
@Holzhaus : I tried to install 1.4.1 again it gives me the same error:
g++: internal compiler error: Killed (program as) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.6/README.Bugs for instructions. Makefile:390: recipe for target 'disambiguate.lo' failed make[2]: * [disambiguate.lo] Error 1 make[2]: Leaving directory '/home/pi/openfst-1.4.1/src/script' Makefile:260: recipe for target 'install-recursive' failed make[1]: * [install-recursive] Error 1 make[1]: Leaving directory '/home/pi/openfst-1.4.1/src' Makefile:312: recipe for target 'install-recursive' failed make: *\ [install-recursive] Error 1
Can you point me in the right direction. I have been trying this since a long time now. Any help from you guys would be really helpful.
Thanks
The problem is that you're out of ram. I assume that your swap partition is still to small. To check how much free memory you have, you can run free -h
.
If you're running debian and you're willing to use packages from the experimental repo, you could do this:
sudo su -c "echo 'deb http://ftp.debian.org/debian experimental main contrib non-free' > /etc/apt/sources.list.d/experimental.list"
sudo apt-get update
sudo apt-get -t experimental install phonetisaurus m2m-aligner mitlm
If not, try to increase your swap space even further (at least temporarily).
Make sure you have at least 1GB available in /var
and do this:
free -h
sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
sudo mkswap /var/swap.img
sudo swapon /var/swap.img
free -h
Then try again.
After compilation, you can remove the swap:
sudo swapoff /var/swap.img
sudo rm /var/swap.img
@Holzhaus : I tried with the increased swap space but still does not work. See below:
/bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I./../include -std=c++0x -MT project.lo -MD -MP -MF .deps/project.Tpo -c -o project.lo project.cc libtool: compile: g++ -DHAVE_CONFIG_H -I./../include -std=c++0x -MT project.lo -MD -MP -MF .deps/project.Tpo -c project.cc -fPIC -DPIC -o .libs/project.o mv -f .deps/project.Tpo .deps/project.Plo /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I./../include -std=c++0x -MT prune.lo -MD -MP -MF .deps/prune.Tpo -c -o prune.lo prune.cc libtool: compile: g++ -DHAVE_CONFIG_H -I./../include -std=c++0x -MT prune.lo -MD -MP -MF .deps/prune.Tpo -c prune.cc -fPIC -DPIC -o .libs/prune.o mv -f .deps/prune.Tpo .deps/prune.Plo /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I./../include -std=c++0x -MT push.lo -MD -MP -MF .deps/push.Tpo -c -o push.lo push.cc libtool: compile: g++ -DHAVE_CONFIG_H -I./../include -std=c++0x -MT push.lo -MD -MP -MF .deps/push.Tpo -c push.cc -fPIC -DPIC -o .libs/push.o g++: internal compiler error: Killed (program as) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.6/README.Bugs for instructions. Makefile:390: recipe for target 'push.lo' failed make[2]: * [push.lo] Error 1 make[2]: Leaving directory '/home/pi/openfst-1.4.1/src/script' Makefile:260: recipe for target 'install-recursive' failed make[1]: * [install-recursive] Error 1 make[1]: Leaving directory '/home/pi/openfst-1.4.1/src' Makefile:312: recipe for target 'install-recursive' failed make: *\ [install-recursive] Error 1 pi@PPi:~/openfst-1.4.1$ pi@PPi:~/openfst-1.4.1$ pi@PPi:~/openfst-1.4.1$ free -h total used free shared buffers cached Mem: 373M 23M 350M 0B 1.2M 6.5M -/+ buffers/cache: 15M 357M Swap: 1.1G 7.3M 1.1G pi@PPi:~/openfst-1.4.1$
I have my swap space to 1.1Gb but still unable to resolve this issue. Could it be the problem with linking libraries as shown in Jasper tutorial which requires modifications in ~./bashrc file? Are you using B+ or some other version? As I read about it and understand that Jasper is not really working on B+. Let me know what you think. Thanks!
Looks like you need even more RAM/swap, because free -h
shows that it's full. Have you tried the Debian packages?
@Holzhaus :If you look at swap space usage its only 7.3M. Free swap space is still approx. 1.1G. total = 1.1G used = 7.3M free = 1.1G
Also I have not tried the experimental repo yet. So do I install only phonetisaurus, m2m and mitlm? do I need to install openfst as well from the experimental repo?
It will be automatically installed as dependency.
@Holzhaus : It throws me an error if I install using the instructions you gave me for experimental repo.
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en Fetched 8,401 kB in 44s (189 kB/s) Reading package lists... Done W: GPG error: http://ftp.debian.org experimental Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 W: Ignoring Provides line with DepCompareOp for package php-psr-log-implementation pi@PPi:~$ pi@PPi:~$ sudo apt-get -t experimental install phonetisaurus m2m-aligner mitlm Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: phonetisaurus : Depends: python:any but it is not installable E: Unable to correct problems, you have held broken packages. pi@PPi:~$
Have you tried sudo apt-get install python
?
i tried that option as well but still give me the same error. Then I tried manually installing python but still no improvement. I have started to believe that making it work on B+ is a lot tougher than B version. But I want to try as much as possible before I take that route and order a version B, just for Jasper to work.
Can the Jasper guys tell what are the reasons behind this platform dependency @shbhrsaha so that I could try something with B+
Can you suggest me any other things that I should look for?
There is no platform dependency. The Raspberry Pi is merely a use case. I can run Jasper on my desktop PC, too. It's just that the installation instructions were written for the RBP.
I can confirm @sunny1986 problem above, when trying to install phonetisaurus from the experimental repo. I just set up my Raspberry model B (not B+) with a fresh Raspbian from Dec 14. Also python is installed in version 2.7.3 Is that some kind of dependancy problem with the experimental repo? Anyone some ideas?
The following packages have unmet dependencies: phonetisaurus : Depends: python:any but it is not installable E: Unable to correct problems, you have held broken packages.
Thanks!
@kriswep : Did you get any errors like the GPG error I got while installing the repo which you can see in my comment above.
I don't know if that might be a reason for the repo not installing properly since it was not a clean installation of the repo package.
That's a Debian bug. Did you report it? https://www.debian.org/Bugs/Reporting
I tried this http://ubuntuforums.org/archive/index.php/t-1983220.html but it did not solve the problem. I guess I will have to report it.
Yup. Good idea anyway, because it helps the Debian project ;-)
@Holzhaus
@sunny1986
Hi all, SUCCESS!!!
I was able to get Jasper running finally. Thanks for all your help guys! The problem was I took the long route rather than the shorter one to get it working which is Method 3 : Manual installation mentioned on the website and I went doing that from scratch!
So I used the Method 1: Quick start installation. Had to figure out the source to get the Jasper image for Pi B+ (which I think is not a steady feed available all the time and the Google drive source worked for me) and then the installation went on a lot smoother. I guess now I can configure it as per my needs rather than starting from scratch and doing that first time.
Current problems: Unable to use the Google APIs for STT. Gives me an issue that the API key is not authenticated. @Holzhaus Do you know why it is doing that?
Probably some API changed (it's undocumented and inofficial anyway) and we didn't catch up yet. I'm having exams right now, so I'm not going to do a lot development in the next of couple weeks (unless I'm really skiving off learning).
am facing the same problem as above
The following packages have unmet dependencies: phonetisaurus : Depends: python:any but it is not installable E: Unable to correct problems, you have held broken packages
can anyone help me out please :)
@shajmaan I see the same issue. I suspect it has to do with etc/apt/sources.list being out of date.
Also trying the manual install here. Step "Installing Phonetisaurus, m2m-aligner and MITLM".
sudo su -c "echo 'deb http://ftp.debian.org/debian experimental main contrib non-free' > /etc/apt/sources.list.d/experimental.list"
went fine (I guess) but apt-get update
throws this error ever since:
W: GPG error: http://ftp.debian.org experimental InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
And sudo apt-get -t experimental install phonetisaurus m2m-aligner mitlm libfst-tools
leaves me with this:
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies: libfst-tools : Depends: libfst3 (= 1.5.2-1) but it is not going to be installed Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is to be installed m2m-aligner : Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is to be installed mitlm : Depends: libmitlm0 (= 0.4.1-2) but it is not going to be installed Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is to be installed phonetisaurus : Depends: libfst3 (>= 1.5.2) but it is not going to be installed Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is to be installed E: Unable to correct problems, you have held broken packages.
// edit: using latest osmc
Also getting 404 when going the manual way
wget http://distfiles.macports.org/openfst/openfst-1.3.3.tar.gz converted 'http://distfiles.macports.org/openfst/openfst-1.3.3.tar.gz' (ANSI_X3.4-1968) -> 'http://distfiles.macports.org/openfst/openfst-1.3.3.tar.gz' (UTF-8) --2016-05-29 00:24:28-- http://distfiles.macports.org/openfst/openfst-1.3.3.tar.gz Resolving distfiles.macports.org (distfiles.macports.org)... 198.232.124.36 Connecting to distfiles.macports.org (distfiles.macports.org)|198.232.124.36|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2016-05-29 00:24:29 ERROR 404: Not Found.
Try the new image I just posted, its full updated and should work without issue.
https://groups.google.com/d/msg/jasper-support-forum/QFx6TBwRLyI/aOLuK3UjDwAJ
Please keep in mind its my first revision, I am still working on it and a RPI3 image. Also some UX enhancements. Making it easier to install, and flexible for such things as USB devices/Audio settings/ETC. I feel once this is complete, it will make the entire process immensely smoother/easier.
Thanks, Matthew Curry
@mattcurrycom thanks for the reply. This is a whole image, right? Sadly, that's not a solution for me. I need to install Jasper onto my existing osmc installation.
I'm in the same boat as @black-snow as have an existing system I'd like to add it to. I've got as far as the GPG error.
I'll try the compilation route, but perhaps one of the project maintainers could clarify the line in the instructions:
On Debian, you can install these from the experimental repository:
Is that meant to apply to Raspberry Pi users running Raspbian (as a Debian derivative)? - the page seems to focus largely on RPi installs, but I realise it's installable elsewhere too (so the line seems ambiguous to me)
Thanks!
@nmstoker the install instructions on the japser page are not correct (anymore). Please scan through the google group posted above. Also see this https://github.com/mattcurrycom/RPI-Jasper-Dependencies
I am going to see if I can update that once the image is a bit more stable.
Thank you both. I was ready to roll up my sleeves on this (and have done), but it's shame there isn't a brief message atop the instructions to say they're currently out of date
@black-snow did you manage to figure out what was causing the issue? I am on the same boat trying to install jasper manually on a Raspberry Pi 1 B. I found this online but I haven't tested out the instructions there yet:
https://groups.google.com/forum/#!topic/jasper-support-forum/_i1PDuW-fSQ
Have you found anything yourself?
@mbeirouti Hey there. For installation I used the stuff provided by mattcurrycom. Didn't get Jasper to run properly whatsoever - but that's likely to be an alsa config issue. Either try the repo I posted above or the thing you posted, both should be fine.
ERROR:root:Error occured!
Traceback (most recent call last):
File "/home/pi/jasper/jasper.py", line 146, in
check your espeak config in profile.yml
I am actually a noob here, anyway
options snd-usb-audio index=-2 To this:
options snd-usb-audio index=0
after doing that, the rpi b+ won't be able to producing any sounds amixer controls numid=1,............name='Mic Capture Switch' numid=2,............name='Mic Capture Volume' and there is no numid=3