Files
Kokoro-TTS-Local/setup.sh
Pierre Bruno 23f0ffb7da Enhance setup scripts for TTS environment initialization
- Updated setup.ps1 and setup.sh to check for and install the 'uv' package manager if not already present.
- Modified virtual environment creation to use 'uv' for consistency across platforms.
- Improved activation instructions for the virtual environment in both scripts.
- Added FFmpeg installation for Windows and system dependencies for Linux and macOS to ensure all necessary tools are available for TTS functionality.
- Streamlined dependency installation process to utilize 'uv' for package management.
2025-01-24 20:02:11 +01:00

40 lines
1.1 KiB
Bash

#!/bin/bash
echo "Setting up Kokoro TTS Local..."
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "Error: Python is not installed. Please install Python 3.8 or higher."
exit 1
fi
# Install uv if not already installed
if ! command -v uv &> /dev/null; then
echo "Installing uv package manager..."
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
uv venv
fi
# Activate virtual environment
source venv/bin/activate
# Install dependencies using uv
echo "Installing dependencies..."
uv pip install -r requirements.txt
# Install system dependencies if needed
if [ "$(uname)" == "Linux" ]; then
echo "Installing system dependencies..."
sudo apt-get update
sudo apt-get install -y espeak-ng ffmpeg
elif [ "$(uname)" == "Darwin" ]; then
echo "Installing system dependencies..."
brew install espeak-ng ffmpeg
fi
echo "Setup complete! Run 'source venv/bin/activate' to activate the virtual environment."