element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Wolfson audio card + Jasper ?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 22 replies
  • Answers 2 answers
  • Subscribers 679 subscribers
  • Views 3253 views
  • Users 0 members are here
  • wolfson
  • jasper
  • audio
  • alsa
  • voice
  • raspberry_pi
  • raspberrypi
  • raspeberry_pi_accessories
Related

Wolfson audio card + Jasper ?

fvan
fvan over 11 years ago

Hi,

 

has anyone been able to get Jasper (Jasper | Control everything with your voice ) to work with the Wolfson audio card ?

 

I tried getting it to work with two different approaches and ended up with the same result (which is something good I suppose).

  • Took the Wolfson image and manually installed Jasper software
  • Took the Jasper image and manually installed Wolfson drivers/kernel

 

Jasper is working via the command line, but when trying to use voice control, I get some (Alsa related?) errors.

 

Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2762
Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2013
Expression 'PaAlsaStreamComponent_FinishConfigure( &self->capture, hwParamsCapture, inParams, self->primeBuffers, realSr, inputLatency )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2650

 

Full log attached.

 

Thanks!

Frederick

Attachments:
jasper_log.txt.zip
  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Hi Frederick,

    I did not use jasper on the pi, only on PC. But some time ago I found this. Maybe it works for you.

    http://stevenhickson.blogspot.de/2013/06/voice-command-v30-for-raspberry-pi.html

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • fvan
    0 fvan over 11 years ago in reply to Former Member

    Thanks Georg, I'll give it a try, as I haven't been able to get past this problem yet.

     

    Frederick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to fvan

    Hi Frederick,

    please report here if you get it running on your pi with the wolfson card. I'd be interested in this to. It would be nice to say "Shutdown" and the pi would do it :-)

    Georg

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • willondubs
    0 willondubs over 11 years ago

    Hi Frederick,

    Jasper works fine with the Wolfson audio card using the .asoundrc found at the link below. It allows alsa to play/record in any rate format. I also removed the hw: references in boot.py and mic.py. The original error you got is due to the wolfson card throwing an error on the samplerate.

     

    Raspberry Pi and Karaoke Machine (Wolfson Pi Use and its Limitation)

     

    Here is where they admit the unintentional behavior:

    Re: PJSIP/PJSUA with Wolfson audio card

    Element14: "I can confirm your observation on the sample rate limitation. From our perspective it wasn’t the intention to limit the audio ADC and DAC sample rates to above 32k. At the moment we are investigating an update to the drivers which will allow full 8k to 192k support for the analogue inputs and outputs."

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • malakai
    0 malakai over 11 years ago in reply to willondubs

    I do believe I have it working but I cannot get sound to output. The example Wolfson gave had the sound connected to the SPKOUT and a 5v supply connected to the card. Is this the only way to get Jasper to play sound with Wolfson?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • fvan
    0 fvan over 11 years ago in reply to willondubs

    I applied the .asoundrc as you described. The behaviour is now different, but it still crashes.

     

    When running jasper's main.py:

     

    Playing WAVE 'say.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
    ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
    ALSA lib pcm_dsnoop.c:551:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
    ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
    ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_samplerate.so
    ALSA lib pcm_rate.c:1399:(snd_pcm_rate_open) Cannot find rate converter
    Segmentation fault

     

    When searching for the file, it is indeed not there:

     

    pi@raspberrypi ~/jasper/client $ sudo ls -l /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_samplerate.so
    
    ls: cannot access /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_samplerate.so: No such file or directory

     

    When playing out without the "hw" referenc emanually (this is what you removed from the mic.py ?):

     

    pi@raspberrypi ~/jasper/client $ aplay beep_hi.wav
    Playing WAVE 'beep_hi.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
    ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_samplerate.so
    ALSA lib pcm_rate.c:1399:(snd_pcm_rate_open) Cannot find rate converter
    Segmentation fault

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • malakai
    0 malakai over 11 years ago in reply to fvan

    This might help not sure though:

     

    sudo apt-get install libasound2-plugins

     

    What jack are you using for speakers?

     

    This is how I got it working but I think I need to solder on the pins and hook up some speakers that way

     

    http://www.raspians.com/wolfson-jasper/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • fvan
    0 fvan over 11 years ago in reply to malakai

    I'm using the onboard amplifier and speaker connections: IoT Alarm Clock - Part 1

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • willondubs
    0 willondubs over 11 years ago in reply to malakai

    Hi Todd,

    Getting Jasper to play requires that you can play a wav file using aplay with no arguments. Once that works, you want to remove the aplay hardware references(-D hw:x,x) in /boot/boot.py and /client/mic.py

     

    Try this file:

    aplay /home/pi/jasper/static/audio/jasper.wav

     

    My standard speakers work in the line out (green plug) and from the headphone out (black). Jasper works great with the onboard digital mics.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • willondubs
    0 willondubs over 11 years ago in reply to fvan

    Hi Frederick,

    I also had to add libasound2-plugins for it to work.

     

    The good thing about getting Jasper working is that you've completed most of the requirements for getting another project working called Blather. It's better for my uses than Jasper and supports true continuous listening.

     

    Links for the Blather project:

    Project: Jezra.net: projects: Blather - speech recognizer

    Code: https://gitorious.org/blather

     

    If you're interested in getting Blather working on the pi, let me know and I can share notes. I'm having a problem with the very last step and it would be nice if someone else is trying it too.

     

    Thanks,

    Will

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube