AI Newsletter Digest improvements: fixed QP soft line break decoding, URL extraction, and content cleaning
This commit is contained in:
19
scripts/piper-tts.sh
Executable file
19
scripts/piper-tts.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Piper TTS wrapper for OpenClaw
|
||||
# Usage: piper-tts.sh "text to speak" [output_file]
|
||||
|
||||
TEXT="${1:-Hello}"
|
||||
OUTPUT="${2:-/tmp/piper_output.wav}"
|
||||
MODEL="${PIPER_MODEL:-$HOME/.config/piper/voices/en_US-ryan-medium.onnx}"
|
||||
|
||||
# Generate speech
|
||||
echo "$TEXT" | $HOME/.local/bin/piper --model "$MODEL" --output_file "$OUTPUT" 2>/dev/null
|
||||
|
||||
# Check if file was created
|
||||
if [ -f "$OUTPUT" ]; then
|
||||
echo "$OUTPUT"
|
||||
exit 0
|
||||
else
|
||||
echo "Error: TTS generation failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user