Skip to content

Instantly share code, notes, and snippets.

@ArtBIT ArtBIT/HAL900 Audio Record
Last active Jun 17, 2016

Embed
What would you like to do?
Record sounds from the HAL9000 microphone ans save them to /home/pi/recordings
#!/bin/bash
FILE=/tmp/mic.wav
arecord \
-D plughw:0 \
-f cd \
> $FILE
TARGET_DIR="${HOME}/recordings"
if [ ! -d "$TARGET_DIR" ]; then
mkdir -p "$TARGET_DIR"
fi
cp $FILE $TARGET_DIR/$(date +\%Y\%m\%d\%H\%M).wav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.