Jump to content

Recommended Posts

Posted

I want to record sound using Orange Pi Zero. I connected MIC1PIN in single header in Orange Pi Zero and GND to my mic(I'm using simple mic which is used for arduino). Aplay works fine, but when I tried to execute arecord it gives an error.

root@orangepizero:~# arecord -Dhw:0 -f cd test2.wav
Recording WAVE 'test2.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: pcm_read:2103: read error: Input/output error

When I execute arcord -l I got this,

root@orangepizero:~# arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0

My .asoundrc file looks like this.

pcm.!default{
    type hw
    card 0
    device 0
}

ctl.!default{
    type hw
    card 0
}

I use this kind of mic.

K9YNE.jpg.3fcb967f0c913af9e4a0c93416ba1b2c.jpg

How can I sort this out? Thanks!

Posted

for playing espeak without showing a error I used the follwing command:
espeak -w /tmp/espeak.wav -s150 "Hello how are you today?"; aplay -D plughw:0,0 /tmp/espeak.wav 2>/dev/null

 

arecord does support the same options. How about trying the follwing arecord command? (with a space after -D):

arecord -D plughw:0,0 -f cd ./test2.wav

Posted
11 hours ago, guidol said:

for playing espeak without showing a error I used the follwing command:
espeak -w /tmp/espeak.wav -s150 "Hello how are you today?"; aplay -D plughw:0,0 /tmp/espeak.wav 2>/dev/null

 

arecord does support the same options. How about trying the follwing arecord command? (with a space after -D):

arecord -D plughw:0,0 -f cd ./test2.wav

Hi!Thanks for the reply. arecord -D plughw:0,0 -f cd ./test2.wav command gives the same error (arecord: pcm_read:2103: read error: Input/output error)! :( Also espeak commands you mentioned above are also not working! Is that means the bug is in hardware? I use condenser mic which is used in Arduino projects.

Posted

I went through on this topic and did some modifications according to that. It gives no error, but when I'm trying to play that audio file which I recorded, it gives me an error saying test2.wav: No such file or directory

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines