Tested on:Raspberry Pi 2; Python 2.7; Raspbian pre Jessie; Raspbian Jessie
Prerequisites:Raspberry Pi with Raspbian Jessie and internet connection (see steps 1-7 in the Introduction)
Hardware:Raspberry Pi compatible Microphone, e.g. Kinobo Akiro
active speakers
119

Jasper: manual installation on Raspbian Wheezy

This summary is based on the Jasper installation tutorial from the Jasper Project, just with everything required for getting up Jasper manually with Pocketsphinx as Speech-To-Text Engine(STT) and Phonetisaurus for Text-To-Speech(TTS) conversion on a Raspberry Pi with Raspbian Wheezy.

Jasper on the Raspberry Pi 3 or 2
Matt Curry made a new Image which simplifies installing Jasper on a Raspberry Pi 3 massively. This is explained in the new tutorial Jasper on the Raspberry Pi 3; please use that for the Raspberry Pi 3 (or 2) and this tutorial only for installing Jasper manually on the (outdated) Raspbian Wheezy.

Install Raspbian Wheezy
Download the Raspbian Wheezy disk image from Raspberrypi.org and burn it onto a SD card. Plug the SD card into the Raspberry Pi and boot it.

Install dependencies
Install the Jasper dependencies with

Test recording
See if sound output and recording are running with

Play and check the record with

Add environment paths
The environment paths have to be added to the .bashrc. Open it with

and add at the end of the file:

Sound configuration
The following configuration is required:
Open alsa-base.conf with

then find

and replace it with

Then, execute

Checkout the ALSA manual for additional information.

Download all Packages
The Pocketsphinx STT engine requires the MIT Language Modeling Toolkit, m2m-aligner, Phonetisaurus and OpenFST. All of these packages have to be downloaded and unzipped:

Speech-To-Text Engine Pocketsphinx and CMUCLMTK Installation

OpenFST Installation
To install OpenFST, enter the following:

This will take an hour or two.

M2M, MITLMT, Phonetisaurus and Phonetisaurus FST Installation

Jasper Installation
Finally, install the Jasper software itself with

Running Jasper
You can give Jasper some informations (all optional) with

Then run Jasper with

For adding own voice commands, check out the tutorial for custom voice commands with Jasper. Visit the Jasper support forum for updates, support and help.

Links
Jasper Project on Github: http://jasperproject.github.io/documentation/installation/
Matt Curry Website: http://www.mattcurry.com/projects-2/the-n-a-o-m-i-project/
Tutorial Jasper on the Raspberry Pi 3: http://www.knight-of-pi.org/raspberry-pi-3-installing-jasper-with-wit-ai-for-voice-recognition/
Raspbian Wheezy download: https://downloads.raspberrypi.org/raspbian/images/
ALSA manual: https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture
Tutorial custom voice commands with Jasper: http://www.knight-of-pi.org/raspberry-pi-and-jasper-a-custom-voice-command-for-measuring-the-distance/
Jasper Support Forums: https://groups.google.com/forum/#!forum/jasper-support-forum
Tutorial: Burn a disk image to a SD card: http://www.knight-of-pi.org/installation/

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.

119 Comments

  1. wonderful points altogether, you just received a
    logo new reader. What would you suggest about your put up that you just made
    a few days ago? Any sure?

  2. Pingback: excel consultant
  3. Pingback: Comedy rap
  4. Pingback: funny hip hop
  5. Pingback: gucci bags
  6. Pingback: Tory Burch
  7. I am really enjoying the theme/design of your website.

    Do you ever run into any browser compatibility issues?

    A small number of my blog readers have complained
    about my blog not working correctly in Explorer but looks great in Safari.
    Do you have any solutions to help fix this issue?

  8. My partner and I stumbled over here different web page and thought I may
    as well check things out. I like what I see so i am just
    following you. Look forward to finding out about your web page again.

  9. Pingback: psicologo avezzano
  10. Normally I don’t read post on blogs, however I would like to say that this write-up very compelled me to try and do it!
    Your writing taste has been amazed me. Thanks, very nice post.

  11. #AT62M.COM#jn-atm.com #코드JUNO$#카톡문의JUNO747#아이폰xr #야놀자#그래프게임#바카라#한국야동#사다리#지뢰찾기#봄비벳#씨앤에스#조조벳#무료야동#인증업체#주노야#junoya.com#텀블러#노래방#성인사이트#비비스#꿀떡넷#리얼#먹튀셀렉트#먹튀검증사이트

  12. #1 Network Experience – About Us

    UniverseMC is a thriving Minecraft network that consist of many unique features that make it better then all of the other servers out.
    It consist of multiple gamemodes to fit what everyone likes.

    UniverseMC also has paypal rewards for the top players at the end of each of
    our seasons to reward those who try to become the
    best. The server ip Address is play.universemc.us and is
    a 1.8-1.12 network

    » Features:
    * $2,000 in prizes
    * Customized plugins
    * Weekly events
    * Skyblock
    * Factions
    * Prison
    * PLAY.UNIVERSEMC.US

  13. Pingback: dildo
  14. Pingback: rechargeable wand
  15. I was curious if you ever thought of changing the page layout of your
    website? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could
    connect with it better. Youve got an awful lot
    of text for only having 1 or 2 images. Maybe you could
    space it out better?

  16. Unquestionably consider that that you said.

    Your favorite justification seemed to be at the net the easiest factor to bear
    in mind of. I say to you, I definitely get irked at the same time as other people consider issues
    that they just don’t understand about. You managed to hit the nail
    upon the top as neatly as defined out the whole thing without having side-effects
    , people can take a signal. Will likely be again to get more.
    Thanks

  17. I’m not sure why but this web site is loading very slow for me.
    Is anyone else having this problem or is it a issue on my end?

    I’ll check back later on and see if the problem still exists.

  18. Oh my goodness! Incredible article dude!
    Thank you so much, However I am having issues with your RSS.
    I don’t know why I cannot subscribe to it. Is there anybody else getting identical RSS issues?
    Anyone who knows the solution will you kindly respond? Thanx!!

  19. Excellent site. A lot of useful information here. I am sending it to a few buddies ans additionally sharing in delicious.

    And obviously, thanks for your sweat!

  20. In Dwarka, people want various drives and keeping
    in mind that loving the opportunity they consistently contact the prerequisite of having nice accomplices with
    them as a Dwarka Escorts.

  21. My brother recommended I may like this blog. He was once totally right.
    This publish truly made my day. You can not believe simply how much time I had spent for this information! Thanks!

  22. Good day! Do you know if they make any plugins to protect against hackers?

    I’m kinda paranoid about losing everything I’ve worked hard on. Any
    tips?

  23. Howdy, i read your blog occasionally and i own a
    similar one and i was just wondering if you get a lot of spam comments?
    If so how do you stop it, any plugin or anything you can advise?

    I get so much lately it’s driving me mad so any support is very much appreciated.

  24. Appreciating the commitment you put into your website and in depth information you present.

    It’s great to come across a blog every once in a while that isn’t the same old rehashed information. Great read!
    I’ve saved your site and I’m adding your RSS feeds to my Google account.

  25. A motivating discussion is worth comment. I do think that you
    ought to write more on this topic, it may not be a taboo matter but generally people don’t speak about
    such subjects. To the next! Best wishes!!

  26. I’ve been browsing on-line greater than three hours nowadays, but I by no means discovered any interesting article like yours.

    It’s pretty value enough foor me.In myy opinion, iff all site owners
    and bloggers made excellent content as you did, the net will bbe much more useful
    than eer before.

  27. Pingback: Hot rap mixtape
  28. Pingback: ride sharing
  29. Hmm is anyone else experiencing problems with the images on this blog loading?
    I’m trying to determine if its a problem on my end
    oor iff it’s the blog. Any feed-back would be greatly appreciated.

  30. Hmm it appears like your website ate my first comment (it was extremely long) so I guess I’ll just
    sum it up what I wrote and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog blogger but I’m still new
    to everything. Do you have any suggestions for
    rookie blog writers? I’d certainly appreciate
    it.

  31. Pingback: hot mixtape
  32. Do you have a spam problem on this blog; I also am a blogger, and I was curious about
    your situation; many of us have developed some nice practices and we are looking to exchange
    strategies with others, why not shoot me an e-mail if interested.

  33. Greetings! Quick question that’s entirely off topic. Do you know how to make
    your site mobile friendly? My blog looks weird when viewing from my iphone.
    I’m trying to find a theme or plugin that might be able
    to resolve this problem. If you have any suggestions, please share.
    Thanks!

  34. Pingback: Comedy Hip hop
  35. Ijust could not depaft your website prior to suggesting
    that I extremely loved the standard information a person provvide too your guests?
    Is gonna be gain regularly to inspect new posts

  36. Pingback: Hip hop videos
  37. Pingback: Hot rap song
  38. I’m gone to convey my little brother, that he should also go to see this webpage on regular basis to
    get updated from latest news.

  39. Pingback: rap hip hop
  40. Appreciating the hard work you put into your site and detailed information you
    present. It’s nice to come across a blog every once in a while that isn’t the
    same out of date rehashed material. Great read! I’ve saved your site
    and I’m adding your RSS feeds to my Google account.

  41. Hi there! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted
    keywords but I’m not seeing very good gains. If you know of any please share.
    Many thanks!
    스포츠중계
    실시간스포츠중계
    일본야구중계
    무료스포츠중계
    메이저리그중계
    nba중계
    mlb중계
    해외스포츠중계
    해외축구중계
    무료스포츠중계
    프리미어리그중계

  42. It’s a pity you don’t have a donate button! I’d certainly donate to this
    excellent blog! I suppose for now i’ll settle for book-marking and adding your RSS feed to my Google
    account. I look forward to new updates and will talk
    about this website with my Facebook group. Talk soon!

  43. Pingback: hip hop memes
  44. Pingback: seo backlinks
  45. I’ve been exploring for a bit for any high-quality articles or blog
    posts in this kind of house . Exploring in Yahoo I at last
    stumbled upon this web site. Reading this information So i am glad to convey that I
    have an incredibly good uncanny feeling I discovered just what I needed.
    I so much certainly will make certain to don?t omit this
    web site and give it a glance on a constant basis.

  46. Hello there I am so glad I found your web site, I really found
    you by accident, while I was searching on Aol for something else, Anyways I am here now and would just
    like to say cheers for a fantastic post and a all round exciting blog (I also love the theme/design),
    I don’t have time to browse it all at the minute but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read
    more, Please do keep up the awesome job.

  47. I do believe all of the ideas you’ve introduced to your post.
    They are very convincing and will certainly work. Still, the posts
    are very brief for novices. Could you please extend them a bit
    from next time? Thank you for the post.

  48. Pingback: Funny videos
  49. Just desire to say your article is as astounding. The clarity on your put up is just nice and i can suppose
    you’re a professional on this subject. Well with your permission allow me to seize your
    RSS feed to stay updated with impending post. Thank you a million and please carry on the rewarding work.

  50. Pingback: Free adult
  51. Sir does Jasper works offline? I need it for my project but in offline mode.

  52. Hello sir. I’m installing jasper on raspbian jessie lite. my problem is that i can’t seem to make the microphone work. I’m still a noob with this and only following some guides, unfortunately i can’t find a solution to my problem.

    • The current builds of Jasper do not support Jessie lite as far as i know. You could download the newest image and try to replicate the steps on a Jessie lite system, but i can’t say if that works.

  53. google code packages seem to have moved, any easy way to find them? i can probably google it…

    • Hey Rick, installing Jasper on Wheezy is not recommended anymore. For now, use the Disk Image Matt Curry supplies on the Jasper forums. I want to make a “manual installation on Jessie”-tutorial, but i can’t say when i’ll find the time for that.
      If you go for Wheezy and fix the missing dependencies, it’d be very nice if you post what you did here or write me an email.

  54. I am still somewhat of a noob when it comes to python and pi, so please forgive me if this sounds dumb. I have been trying to follow the jasper install guides and I cannot get jasper to work. Right now, I am getting the error: OSError: Can’t find command ‘phonetisaurus-g2p’! Please check if Phonetisaurus is installed and in your $PATH.

    I’ve tried reinstalling it and recompiling and I can’t seem to resolve the issue. Is there anyway you could give me a few suggestions as to where to go from here?

    Also, I looked in the phonetisaurus folder and phonetisaurus-g2p.cpp is there. Is that the same file the error is referring to? Thanks

    • Hi DLDR,
      What’s the output of
      cd ~/g014b2b/
      ./compile-fst.sh

      Anyways, are you sure you want install Jasper on Wheezy? The image supplied by Matt Curry is certainly the fastest path to a well-running Jasper…

  55. getting the following message and didn´t find anything on the web :/ help :D
    *******************************************************
    * JASPER – THE TALKING COMPUTER *
    * (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
    *******************************************************
    WARNING:root:tts_engine not specified in profile, defaulting to ‘espeak-tts’
    ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
    ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

    ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

    ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started
    WARNING:client.notifier:gmail_address or gmail_password not set in profile, Gmail notifier will not be used
    Expression ‘paInvalidSampleRate’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 2048
    Expression ‘PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 2719
    Expression ‘PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 2843
    Traceback (most recent call last):
    File “jasper/jasper.py”, line 141, in
    app.run()
    File “jasper/jasper.py”, line 111, in run
    conversation.handleForever()
    File “/home/pi/jasper/client/conversation.py”, line 31, in handleForever
    threshold, transcribed = self.mic.passiveListen(self.persona)
    File “/home/pi/jasper/client/mic.py”, line 110, in passiveListen
    frames_per_buffer=CHUNK)
    File “/usr/lib/python2.7/dist-packages/pyaudio.py”, line 747, in open
    stream = Stream(self, *args, **kwargs)
    File “/usr/lib/python2.7/dist-packages/pyaudio.py”, line 442, in __init__
    self._stream = pa.open(**arguments)
    IOError: [Errno Invalid sample rate] -9997

  56. Hi, I’m trying to follow your instructions but having some large (>12 hours) waits for the packages to compile, which they don’t actually complete. This is an issue for is2013, g014b2b and openFST-1.3.4. Do you know why this is? I’m using a Raspberry Pi A+ with latest Jessie (the CLI version). Jasper dependencies are already downloaded.

  57. ./jasper.py
    Traceback (most recent call last):
    File “./jasper.py”, line 12, in
    from client import tts
    File “/home/pi/jasper/client/tts.py”, line 41, in
    import diagnose
    File “/home/pi/jasper/client/diagnose.py”, line 9, in
    import pip.req
    File “/usr/lib/python2.7/dist-packages/pip/__init__.py”, line 74, in
    from pip.vcs import git, mercurial, subversion, bazaar # noqa
    File “/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py”, line 9, in
    from pip.download import path_to_url
    File “/usr/lib/python2.7/dist-packages/pip/download.py”, line 25, in
    from requests.compat import IncompleteRead
    ImportError: cannot import name IncompleteRead

  58. WARNING:client.stt:Empty response: Nothing has been transcribed.
    No disturbance detected
    WARNING:apscheduler.scheduler:Execution of job “Notifier.gather (trigger: interval[0:00:30], next run at: 2016-07-21 04:24:19 UTC)” skipped: maximum number of running instances reached (1)
    No disturbance detected
    No disturbance detected
    No disturbance detected
    WARNING:apscheduler.scheduler:Execution of job “Notifier.gather (trigger: interval[0:00:30], next run at: 2016-07-21 04:24:49 UTC)” skipped: maximum number of running instances reached (1)
    No disturbance detected
    WARNING:client.stt:Empty response: Nothing has been transcribed.

    i’m having this error. what can be the problem here?

    • As much as for the RPi2 with Jessie (Wheezy won’t run on the Rpi3):
      The program compiles but Pocketsphinx only hears gibberish, which might be solved by installing wit.ai as STT engine.

  59. After trying to debug alsa issues for this project and getting BOTH usb mic and bcm2835 speakers working I think there is a basic problem that ALL of the ALSA advice I received does not deal with.

    The /usr/share/alsa/cards directory does not have a bcm2835.conf file. The /usr/share/alsa directory file alsa.conf leaves a LOT of stubs that need to be specified. Unless a card for bcm2835 is supplied, firing up Jasper.py displays a lot of supposedly non-fatal error messages. By working up a bcm2835.conf file, you can get rid of the irritating messages.

    It seems to me that this is a Jessie bug; there really should be a file that resolves these error messages. I seems just lazy for the jessie programmer that deals with ALSA to not have created one that is tested.

    I have not worked down thru all of the error messages, but I suspect that other messages are caused by this as well.

    Another case of not having a mature release is the failure to check for old firmware during boot. Old firmware on my jessie resulted in a desktop that would not respond to keyboard or mouse which is a showstopper for using jessie with old firmware, unless you know ssh. Not a naive user situation.

    • rchoppin, thanks for the information! Sadly i’m way to busy for Jasper experimentation right now, but have you submitted your bug to the Jasper developers?
      Jessie developed pretty rapidly and had quite some internal changes which brought some issues, not only for Jasper. It might need some time till Jasper is up to date, you might need to stay with Wheezy for now…

  60. Congratulations for the article. After trying several times with other methods, I have followed your instructions and I could install jasper on my RP2.
    Now I have a problem with jasper that he is “listening” random words when active. He constantly listen “IT”, “BUT”, “IT IT IT”, “WHAT IT IT” and some other words without I’m saying anything. Sometimes he listen some words I say, trying several times, but never the entire frase, even the word “JASPER” is hard to make him understand.
    Anyone have a idea of what can be made to fix it?
    Thank you

    • When i last tried, Jasper was not fully ported for the Raspberry Pi 2. I think this specific problem may be circumvented by using an other Speech-To-Text engine like Julius, but the installation is quite complex. I’d love to find some time soon for making more experiments…

  61. I had the same error and I believe it was due to extracting the archive as root. I deleted the directory and redid “tar xf g014B2B” command and ran the compile command (not as root) and it worked fine.

    • Phonetisaurus, the Text-To-Speech (TTS) engine of Jasper, is a modular Python framework, so there probably are alternative voices somewhere on the web.
      But TTS still is a hard task: i would be very impressed if a natural sounding voice could be generated from the Phonetisaurus framework.

      • Thank you, and thank you for the reply, I am still working on installing it to see how it all runs. But what about putting an image for the Pi2 and Pi3, for those new comming to the site?

        • Hi Vlad,

          since i haven’t got Jasper running stabily on Jessie, i hesitate to make an image right now. I really do want to try a better voice recognition engine (Julius), but that is complicated matter and i’m low on time right now. So, sadly, maybe in the future.

      • Now I have changed the SST to Wit.ai, and it worked. I just left the sphinx to passive mode.
        now I will try write some custom modules to my system.

        thanks again for the post.

        • Congrats! If you return, please let me know how happy you are with Wit.ai. I want to make some more experiments with voice recognition soon…

  62. Hi there!
    Thanks for the page! DOES this work for Pi zero? somebody tried this out so far? Thanks

    • Hi Ruslan, i do not know if it would work on the Zero, but since voice recognition requires quite some processing power i would recommend the strongest RPi out there.
      But you can shrink an RPi 3 by relocating the USB and Ethernet ports…

  63. I have a problem on step : OpenFST Installation
    When i do “sudo ./configure –enable-compact-fsts –enable-const-fsts –enable-far –enable-lookahead-fsts –enable-pdt” it give me this error :

    checking whether the C++ compiler works… no
    configure: error: in /home/pi/openfst-1.3.4':
    configure: error: C++ compiler cannot create executables
    See
    config.log’ for more details

    Here is an screenshot
    http://i66.tinypic.com/2q319b6.jpg

    Can you help me to resolve this problem ?I have Raspberry pi 3 model B and latest Raspbian Jessie on it

    • Hmm, looks like you’re missing the compiler. Did you do
      sudo apt-get install espeak subversion autoconf libtool automake gfortran g++ –yes
      and what version of Raspbian are you using?

Leave a Reply to DLDR Cancel reply

Time limit is exhausted. Please reload CAPTCHA.