adding a bunch of untested files
Some checks failed
Deploy API / deploy (push) Failing after 1s

This commit is contained in:
Your Name 2026-05-19 20:12:49 -04:00
parent ab3a76cd0f
commit 56d8fb4d56
85 changed files with 8879 additions and 0 deletions

31
clio-pi/bin/record.sh Executable file
View file

@ -0,0 +1,31 @@
#!/bin/bash
set -euo pipefail
# Configuration
AUDIO_DEVICE="${AUDIO_DEVICE:-hw:1}" # ALSA device (run 'arecord -l' to list)
SEGMENT_SECONDS="${SEGMENT_SECONDS:-7200}" # 2 hours per file
RECORDINGS_DIR="${RECORDINGS_DIR:-$HOME/recordings}"
SOURCE_NAME="${SOURCE_NAME:-stationary}" # Prefix for filenames
mkdir -p "${RECORDINGS_DIR}"
echo "Starting recording..."
echo " Device: ${AUDIO_DEVICE}"
echo " Segment: ${SEGMENT_SECONDS}s"
echo " Output: ${RECORDINGS_DIR}/${SOURCE_NAME}-*.opus"
while true; do
ffmpeg -f alsa -ac 1 -i "${AUDIO_DEVICE}" \
-c:a libopus \
-b:a 32k \
-f segment \
-segment_time "${SEGMENT_SECONDS}" \
-strftime 1 \
-reset_timestamps 1 \
"${RECORDINGS_DIR}/${SOURCE_NAME}-%Y-%m-%d_%H-%M-%S.opus" \
2>&1 | while read line; do echo "[ffmpeg] $line"; done
echo "Recording stopped, restarting in 5s..."
sleep 5
done