How to Record Voice With USB Microphone Then Play It on Raspberry Pi 2
by Bay Yolal in Circuits > Raspberry Pi
59428 Views, 35 Favorites, 0 Comments
How to Record Voice With USB Microphone Then Play It on Raspberry Pi 2
Today, I am going to show you how to record your voice from USB microphone dongle over 2.5" jack microphone to Raspberry Pi 2 Model B v1.1 NOOBS loaded Raspbian operating system to play this record with omxplayer which recorded by arecord controlled on Raspberry Pi Terminal. Uh, it is not so complicated for you because this was really big trouble for me to done till now. Now, you can save your time with me! :)
The need list:
1. Raspberry Pi 2 (With mouse, with keyboard, with power cable, with hdmi-hdmi cable, with monitor (speaker included) ... these are you have I guess, and you are already did some exercises with your board then came here. If not, check my old instructables please, or ask)
2. USB to microphone-speaker out dongle
3. 2.5" jack type microphone (Mine can be flexable)
4.1. (OR) HDMI supported television/monitor/screen with laud speakers (Mine is Samsung ES5500 series a television)
4.2. (OR) Headphones
Component Assembly
The picture contains every parts. Use your mouse over the picture, you can read details about components. The assembly procedure is very easy, just plug in everything and run your Raspberry Pi board.
Pi Terminal Codes
I guess you are using Rasbian Jessie loaded on your board. So:
1. Go to Terminal and open it from top menu bar.
2. Type this code:
arecord /home/pi/Desktop/a.wav -D sysdefault:CARD=1
3. Speak to the microphone
4. When you want to finish, leave minimum 6 seconds for blank at the end of your record when you finish, click X to close terminal window, it will save.
5. On terminal, type this code:
omxplayer -p -o hdmi /home/pi/Desktop/a.wav
6.1. (OR) If you have speaker included monitor/television/screen, you can hear the voice from there.
6.2. (OR) If you want to use USB dongle, you can plug in your headphones then listen your record.
WARNING: Please be sure that the sound may harm your ears, please, when first time use, keep away the headphones a little bit away from you then try to listen the voice! Don't let yourself get harm! Before play the voice, check the volume of sound from sound settings!
My Recorded Wav File
This record is my first voice record. I want to show you what is the quality of the record from Raspberry Pi 2.
That's all!
Downloads
Further Informations
Link 1: Stackexchange
Link 2: For old type raspberry pi boards
Link 3: Raspberrypi.org
Link 4: Recording sound
BONUS: Reading This Instructable
NOTE: This instructable's step is aimed for visually impaired people to hear the sentences to learn what's going on here. Watch the video, it explains all steps.