Files
alice-backend/station/pulse-player.sh
T

12 lines
488 B
Bash
Executable File

#!/bin/sh
set -eu
base=/data/opt/alice-backend/spotify
if [ ! -S /tmp/alice-pulse/native ]; then
exec /usr/bin/aplay -q -D default -t raw -f S16_LE -r 24000 -c 1
fi
export PULSE_SERVER=unix:/tmp/alice-pulse/native
export PULSE_RUNTIME_PATH=/tmp/alice-pulse
export PULSE_COOKIE=/tmp/alice-pulse/cookie
export PULSE_SINK=station
exec "$base/run" "$base/bin/pacat" --playback --raw --format=s16le --rate=24000 --channels=1 --latency-msec=50 --client-name="Alice Voice" --stream-name=Voice