Skip to content

Latest commit

 

History

History
87 lines (55 loc) · 1.75 KB

commands.md

File metadata and controls

87 lines (55 loc) · 1.75 KB

Useful commands

Record

arecord --device=hw:1,0 --format S16_LE --rate 44100 -c 2 test.wav

Convert Wav to Flac

convert to flac using ffmpeg
ffmpeg -i test.wav -b:a 16000 -c:a flac test.flac
conver to mono channel flack
ffmpeg -i test.flac -ac 1 mono.flac

Play

Using OmxPlayer

omxplayer -o local mono.flac

Debug commands

Check usb devices
dmesg | grep C-Media
lsusb

Playback devices

pi@raspberrypi ~ $ aplay -l

**** List of PLAYBACK Hardware Devices ****

Show sound card setting

cat ~/.asoundrc

Misc

Kill process
pkill -9 <pid>
sudo ps aux | grep "python transcribe_streaming.py" | grep -v grep | awk '{print $2}' | xargs sudo kill -9

Resources

raspberry pi with alsa gstreamer tutorial gstreamer download gstreamer code snippets gstreamer blog Daemon service Daemon example

Python packages

pyAudio Best practice Speech API

Raspberry pi

USB Audio