4

I am trying to install Jasper (Jasper is an open source platform for developing always-on, voice-controlled applications) on Raspberry Pi 2 (Jessie). I have a mic to give the commands, but it does not seem to be working. As per the documentation

  1. Plug in your USB microphone. Let’s open up an ALSA configuration file in vim: sudo vim /etc/modprobe.d/alsa-base.conf

  2. Change the following line: options snd-usb-audio index=-2, to this: options snd-usb-audio index=0

  3. Back in the shell, run: sudo alsa force-reload (Does not work, says "could not find alsa")

  4. Next, test that recording works (you may need to restart your Pi) by recording some audio with the following command: arecord temp.wav (throws error "arecord: main:722: audio open error: No such file or directory")

I have looked at one of the solutions on this site, but it did not work for me.

The Jasper instructions are: Manual Installation

mic: Kinobo USB Microphone

speaker: Logitech S150 USB Speakers with Digital Sound

sarvs
  • 51
  • 1
  • 1
  • 3

4 Answers4

4

Here is a solution you might find helpful:

arecord -D hw:2,0 -d 5 -f cd test.wav -c 1

D option specifies recording device. Since this specific test mic is on “card 2”, “device 0”, the value is “hw:2,0” here. This command creates “test.wav” as a 5-second, CD-quality wave file. Since it’s a mono mic, specify “1” as the number of channels with “-c” option.

To play, simply secure-copy the "test.wav" to download the file on to whatever device is logged-in to the Raspberry Pi (in my case, it's a MacBook). Hope that helps!

3

Use arecord -Dhw:cardID:deviceID test.wav

For MIC You can find the card ID and device ID of kinobo USB from arecord -l

For Play The aplay -l ---> will display Card Id and Device ID

$ aplay -Dhw:CardID:DeviceID test.wav

Note:

user73636
  • 117
  • 3
  • 12
1

Try this:

sudo arecord --format=S16_LE --duration=5 --rate=16000--file-type=raw out.raw

To play, you will then need to run this:

aplay --format=S16_LE --rate=16000 out.raw
Aurora0001
  • 6,357
  • 3
  • 25
  • 39
Azhar ali
  • 11
  • 1
-1

Installing PulseAudio could be so helpful on Linux systems. From a Linux.com Article

PulseAudio could account for 90% of the audio needs of a regular Linux session. To install use :$ sudo apt-get install pulseaudio

Final thoughts Your ALSA may have issues. Just try resetting it:

$ sudo /etc/init.d/alsa-utils reset

For more information alsa use and reset, these was my source