How to record and playback on Raspi

(audio) recording

Microphone volume control

0-55.

amixer sset Mic 55 -c 2
The last 2 are card numbers.
arecord -l
You can check it out at

2 is the card number, 0 is the device number

arecord -D plughw:2,0 -d 10 -f cd test.wav

http://uepon.hatenadiary.com/entry/2016/12/15/095114

↓ change the rate of recording (actually the resolution bit also changed to 8bit- >16bit. Does it automatically recognize the device it's connected to?)

https://qiita.com/yozawa/items/0695664ad89dad56e62f

↓ -f 16000 to get 16 kHz rate

$ arecord -f S16_LE -r 16000 test2.wav

https://qiita.com/mayfair/items/384c8d774accd4309416

↓Conclusion 16kHz / mono /signed 16bit little endian

arecord -D plughw:0,0 -f S16_LE -r 16000 test.wav

Volume setting

Also possible with alsamixer

-> alsamixer is a lie! The following link is correct amixer

http://www.yam-web.net/raspberry-pi/music.html

Microphone and speakers can be set up together.

→Mike did not actually reflect this!
The following link is correct

http://akatsuki774.hatenablog.com/entry/2015/12/24/173636

If no sound is heard

Check also.conf!
Delete ~/.asoundrc

http://www.tapun.net/raspi/raspberry-pi-usb-speaker

Check output devices

aplay -l

to see the output device number.

Was this all you could get?

Official Adafruit page for USB speakers
https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/updating-alsa-config

It didn't work once I set up Jessie.
I deleted it and the sound came out!

Error after reboot!

pi@raspberrypi:~/WatchOverBudge/voice $ aplay man-voice.wav
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
aplay: main:788: audio open error: no such file or directory

reference

Example of arecord configuration

http://vimvimvim.blogspot.jp/2012/10/aplay-arecord.html

You can see the PCM device list here.

sudo vim /proc/asound/pcm

or

/dev/snd

question

For some reason, it does not sound with hw:0,0 in aplay, but it does with plughw:0,0.

aplay -D plughw:0,0 test.wav