This document covers the full setup process for running Floura locally, including dependencies, environment variables, and the Piper text-to-speech voice model.
- Python 3.9 or later
- pip
- A Replicate API key (see REPLICATE.md)
git clone <repository-url>
cd Flourapython -m venv venv
source venv/bin/activateOn Windows (Git Bash):
python -m venv venv
source venv/Scripts/activatepip install -r requirements.txt --break-system-packagesCopy the example environment file and fill in your credentials:
cp .env.example .envEdit .env and set:
REPLICATE_API_KEY=your_api_key_here
AI_MODEL=meta/llama-2-70b-chat
See REPLICATE.md for instructions on obtaining an API key.
Floura uses Piper TTS with the en_GB-semaine-medium voice. Download the model and its configuration file into src/data/voices:
mkdir -p src/data/voices
curl -L -o src/data/voices/en_GB-semaine-medium.onnx https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_GB/semaine/medium/en_GB-semaine-medium.onnx
curl -L -o src/data/voices/en_GB-semaine-medium.onnx.json https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_GB/semaine/medium/en_GB-semaine-medium.onnx.jsonAdditional Piper voices can be browsed at the Piper TTS voice samples page.
Confirm the required Python packages are importable:
python -c "import piper; print('piper OK')"
python -c "import sounddevice; print('sounddevice OK')"
python -c "import soundfile; print('soundfile OK')"mkdir -p src/data/audio
echo "hello world" | piper -m src/data/voices/en_GB-semaine-medium.onnx -f src/data/audio/test.wavIf a test.wav file is created in src/data/audio, the voice model is installed correctly.
python src/main.py