Giter VIP home page Giter VIP logo

Comments (5)

binaryatlas avatar binaryatlas commented on September 6, 2024

i changed out the mic several times till i found one that worked

from jasper-client.

RocketMan1988 avatar RocketMan1988 commented on September 6, 2024

Which Mic did you use?

from jasper-client.

tiny-tinker avatar tiny-tinker commented on September 6, 2024

I am having the same errors, although I don't get those "New email from" messages (probably because I skipped the email set up in populate.py).

I am using a Cyber Acoustics USB microphone ... I can't tell the model number.. mabye DNCT4?

from jasper-client.

tiny-tinker avatar tiny-tinker commented on September 6, 2024

Ok, some progress... I'm wondering if you have any other devices? I have a wifi usb dongle and a hub plugged directly into the pi, and off the hub is the keyboard and the microphone. I unplugged the hub and plugged the mic directly into the pi and I no longer get this error. (Thanks: http://www.raspberrypi.org/forums/viewtopic.php?f=38&t=15851)

Then using the arecord with some parameters I've picked up from various places (the -vvv is sooo helpful!!):

pi@raspberrypi ~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: device [Cyber Acoustics USB device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi ~ $ arecord --device hw:0,0 --format s16_le --channels 2 --rate 48000 -vvv test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Hardware PCM card 0 'Cyber Acoustics USB device' device 0 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 1572864000
  appl_ptr     : 0
  hw_ptr       : 0
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%
Max peak (12000 samples): 0x00000000 #                    0%

The 0s carry on until I ctrl-c out. So I suspect the audio isn't reaching the pi. I unplugged the mic from the pi and into my windows laptop and successfully made a recording of my voice. So I know the mic works, but the pi (or at least arecord) isn't getting the sound in.

ideas?

from jasper-client.

tiny-tinker avatar tiny-tinker commented on September 6, 2024

Wooo! Success!
Many many many thanks to this post: http://blog.scphillips.com/2013/01/sound-configuration-on-raspberry-pi-with-alsa/

amixer told me the Capture Volume was set to 0!!!
This is what I did:

[code]pi@raspberrypi ~/jasper/client $
pi@raspberrypi ~/jasper/client $ amixer controls
numid=1,iface=MIXER,name='Mic Capture Switch'
numid=2,iface=MIXER,name='Mic Capture Volume'
pi@raspberrypi ~/jasper/client $
pi@raspberrypi ~/jasper/client $
pi@raspberrypi ~/jasper/client $ amixer cget numid=2
numid=2,iface=MIXER,name='Mic Capture Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=15,step=0
: values=15,15
| dBminmax-min=-10.50dB,max=12.00dB
pi@raspberrypi ~/jasper/client $ amixer cset numid=2 100%
numid=2,iface=MIXER,name='Mic Capture Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=15,step=0
: values=15,15
| dBminmax-min=-10.50dB,max=12.00dB
pi@raspberrypi ~/jasper/client $
pi@raspberrypi ~/jasper/client $[/code]

And I successfully was able to record with this command:

[code]pi@raspberrypi ~ $
pi@raspberrypi ~ $ arecord -vvv -d 10 --device hw:0,0 --format s16_le --channels 2 --rate 48000 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Hardware PCM card 0 'Cyber Acoustics USB device' device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 1
stop_threshold : 24000
silence_threshold: 0
silence_size : 0
boundary : 1572864000
appl_ptr : 0
hw_ptr : 0
Max peak (12000 samples): 0x000018df #### 19%
Max peak (12000 samples): 0x000015f6 #### 17%
Max peak (12000 samples): 0x0000137e #### 15%
Max peak (12000 samples): 0x00000acd ## 8%
Max peak (12000 samples): 0x0000121d ### 14%
Max peak (12000 samples): 0x00001388 #### 15%
Max peak (12000 samples): 0x00000dfe ### 10%
Max peak (12000 samples): 0x00000ba2 ## 9%
Max peak (12000 samples): 0x000019a5 ##### 20%
Max peak (12000 samples): 0x00001013 ### 12%
Max peak (12000 samples): 0x000018f5 #### 19%
Max peak (12000 samples): 0x000019b8 ##### 20%
Max peak (12000 samples): 0x00001391 #### 15%
Max peak (12000 samples): 0x0000156f #### 16%
Max peak (12000 samples): 0x00001cd3 ##### 22%
[/code]

And then play it back with an appropriate aplay command.
I restarted the pi, and got the familiar "One moment" on boot, but then I found no python processes were running. So I ran

[code]cd ~/jasper/client
python main.py[/code]

And it successfully told me the time and weather! But then threw other errors and wouldn't respond. But it is progress! I'll take it!!!

from jasper-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.