#!/usr/bin/env bash # Update RHVoice English pronunciation fixes on Linux set -euo pipefail # Check if running as root if [[ $EUID -ne 0 ]]; then echo "Error: This script must be run as root (use sudo)" >&2 exit 1 fi # Define paths dictDir="/etc/RHVoice/dicts" sourceDir="English" # Verify source directory exists if [[ ! -d "$sourceDir" ]]; then echo "Error: Source directory '$sourceDir' not found" >&2 exit 1 fi # Create dictionary directory if it doesn't exist mkdir -p "$dictDir" # Copy English pronunciation fixes echo "Updating English pronunciation fixes in $dictDir..." cp -rv "$sourceDir" "$dictDir/" echo "Linux update complete!" echo "You may need to restart applications using RHVoice for changes to take effect." echo "For example:" echo "sudo killall speech-dispatcher" exit 0