21 lines
383 B
Bash
Executable File
21 lines
383 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Check if festival is installed
|
|
if ! command -v festival &> /dev/null; then
|
|
echo "🎤 Festival not found. Installing now (requires sudo)..."
|
|
sudo apt update
|
|
sudo apt install -y festival
|
|
fi
|
|
|
|
# Check if user provided text
|
|
if [ $# -eq 0 ]; then
|
|
echo "Usage: $0 \"text to speak\""
|
|
exit 1
|
|
fi
|
|
|
|
TEXT="$1"
|
|
|
|
# Speak text using festival
|
|
echo "$TEXT" | festival --tts
|
|
|