Files
SoundGame/web/rpg/gen/gen_gap_sfx.sh
T

17 lines
716 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
# R6 缺口 sfx:victory(Stable Audio 3,英文 prompt 照录 docs/design/11 §5)。
# 用法: bash web/rpg/gen/gen_gap_sfx.sh (内部 flock 串行 GPU;输出 staging)
set -u
source /home/ubuntu/SoundGame/env.d/sfx.sh
cd /home/ubuntu/SoundGame/tools/stable-audio-3
OUT=/home/ubuntu/SoundGame/web/rpg/gen/staging/sfx
mkdir -p "$OUT"
flock /home/ubuntu/SoundGame/.gpu.lock bash -c '
if [ -s "'"$OUT"'/victory.wav" ]; then echo "skip victory"; else
uv run stable-audio --model small-sfx \
-p "triumphant short brass fanfare, 3 rising notes, wuxia style, under 1.5 seconds" \
--duration 2 -o "'"$OUT"'/victory.wav" 2>&1 | grep -i "saved\|error"
fi'
echo "done: $(ls "$OUT")"