#!/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

