VihangaA Posted May 15, 2018 Posted May 15, 2018 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. How can I sort this out? Thanks!
guidol Posted May 15, 2018 Posted May 15, 2018 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
VihangaA Posted May 15, 2018 Author Posted May 15, 2018 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.
VihangaA Posted May 15, 2018 Author Posted May 15, 2018 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.
guidol Posted May 15, 2018 Posted May 15, 2018 Hmmm.... please check your mic against: BTW: I have the original Expansion-Board (Audio/Video/USB for the OPi Zero) 1
Recommended Posts