lesavka/scripts/manual/audio-mic-fetch.sh
2025-07-01 10:23:51 -05:00

15 lines
424 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# scripts/manual/audio-clip-fetch.sh
# Pull & play the most recent 1 s AAC clip from lesavkaserver
PI_HOST="nikto@192.168.42.253" # adjust
REMOTE_DIR="/tmp"
DEST="$(mktemp -u).aac"
scp "${PI_HOST}:${REMOTE_DIR}/ear-*.aac" "$DEST" 2>/dev/null \
|| { echo "❌ no clip files yet"; exit 1; }
LATEST=$(ls -1t ear-*.aac | head -n1)
echo "🎧 playing ${LATEST} ..."
gst-play-1.0 --quiet "${LATEST}"