python code - replace Gtts with Piper on Linux with complete code update and Piper installation instructions

Job ID: 39005569

Budget: $30 – $250 USD

Project Overview:
I have a working Flask application that utilizes VOSK for speech-to-text (STT), Wikipedia-API for retrieving query information, and gTTS for text-to-speech (TTS). I want to replace gTTS with Piper TTS to enable offline functionality. Must have Piper experience.

The project involves:
Installing Piper TTS on a Raspberry Pi 5 (linux) with Python 3.11.
Integrating Piper into the existing simplified Flask app.
Allowing runtime configuration of Piper settings through the Flask UI.
Providing step-by-step installation instructions for Piper on Raspberry Pi 5. (linux)
Project Requirements:
Piper Installation on Raspberry Pi 5: (linux)

Current setup
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install Required Python Packages: Run the following command to install all required dependencies:
Flask==3.0.0
gTTS==2.3.2
wikipedia-api==0.5.8
vosk==0.3.43

Guide for installing Piper TTS, ensuring compatibility with Python 3.11.
Use Java 3.11 for Piper's dependencies where applicable.
Validate Piper's functionality on the Raspberry Pi.
Integration with Flask Application:

Replace gTTS with Piper in the existing Flask app (main_test.py).
Ensure the TTS functionality works offline.
Adapt Flask UI to allow configuration of Piper's settings (e.g., voice selection, speed, and pitch).
Testing and Documentation:

Ensure the modified Flask app works out-of-the-box (OOTB) with minimal setup.
Provide a detailed, step-by-step installation guide for replicating the setup, including:
Setting up the environment.
Installing necessary Python packages and dependencies.
Configuring Piper and integrating it into the Flask app.
Optional Enhancements:

Guidance on managing VOSK and Piper models for optimal performance.
Suggest optimizations for running the application efficiently on a Raspberry Pi 5.
Technical Stack:
Python Packages: Flask (v3.0.0), Wikipedia-API (v0.5.8), VOSK (v0.3.43)
Dependencies: Piper TTS, Java 3.11
OS: linux
Hardware: Raspberry Pi 5
Current App File: main_test.py (to be shared after selection)
Deliverables:
Updated Flask application with Piper integration.
Step-by-step guide for installing and configuring Piper on Raspberry Pi 5.
Instructions for running the Flask app with the updated TTS functionality.
Any additional scripts or files required for integration.
Additional Notes:
A simplified Flask app (main_test.py) will be provided, which works OOTB after directory adjustments.
Wikipedia queries should use an agent format, as specified in the Wikipedia-API documentation.
You may need to update model paths for both VOSK and Piper based on the system setup.
Budget & Timeline:
Budget: No discussion -I accept given bids only

Proposal Requirements:
Prior experience with Flask, TTS integration, and Raspberry Pi development.
Familiarity with VOSK, Piper TTS, and managing Python environments.
Clear examples of similar work or projects.
Confirmation of understanding of the requirements and deliverables.
Related categories: Python Linux Django Software Architecture Ubuntu