=-=-=-=-=-=-=-=-=-=-=-=-=-
Resident English Clipboard Reader Based on Piper tts
Four Piper TTS neural voice models (.onnx files). These are the AI models that convert text to speech locally on your machine. No data is sent to the internet.
https://github.com/Brets0150/ReadToMe-TTS/releases
configure it to use Use win+insert
It is fast
This is a text-to-speech synthesizer that uses Piper TTS engine to read text aloud.
I replaced one of voices with farsi that I separately got by
git clone https://huggingface.co/MahtaFetrat/Mana-Persian-Piper
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Install Python
python -m pip install flask
will be installed somewhere like
C:\Users\amir\AppData\Roaming\Python\Python314\site-packages\
https://huggingface.co/MahtaFetrat/Mana-Persian-Piper
Install Piper
python -m pip install piper-tts
will be installed somewhere like
C:\Users\amir\AppData\Roaming\Python\Python314\site-packages\
Download the Model
git clone https://huggingface.co/MahtaFetrat/Mana-Persian-Piper
make the file app.py which will be serving a page in folder c:\amir\amirpy
copy the Mana-Persian-Piper to
C:\amir\amirpy\content\Mana-Persian-Piper\fa_IR-mana-medium.onnx
|
import wave #This loads the Flask library. #This creates the Flask server object. voice = PiperVoice.load( HTML = “”” <body style=”font-family: Arial; margin: 40px;”> <h2>Persian Text to Speech</h2> <textarea id=”text” rows=”12″ cols=”90″ <br><br> <button onclick=”speak()” style=”font-size:18px;”>Speak</button> <p id=”status”></p> <audio id=”player” controls style=”width:600px;”></audio> <script> status.innerText = “Generating speech…”; const response = await fetch(“/speak”, { if (!response.ok) { const blob = await response.blob(); player.src = audioUrl; status.innerText = “Playing.”; </body> @app.route(“/”)
#If the browser sends a POST request to /speak if not text: output_file = f”test_{int(time.time())}.wav” with wave.open(output_file, “wb”) as wav_file: return send_file(output_file, mimetype=”audio/wav”) #The port is determined by this line: app.run(debug=True) #Start Flask This is the line that actually launches the web server: |
Run it:
python app.py
Then open this in your browser:
http://127.0.0.1:5000
=-=-=-=-=-=-=-=-=-=-
- Install the package:
bash
pip install auto-py-to-exeUse code with caution. - Launch the interface:
bash
auto-py-to-exeUse code with caution. - Select your script, choose “One File”, configure your icons or files, and click Convert .py to .exe. [1, 2, 3, 4, 5]
Never build your executable from your global Python environment.If you use your main Python environment, auto-py-to-exe (via PyInstaller) will often accidentally grab unrelated packages you installed for other projects, ballooning your file size.To get the smallest file possible, always do this first:Create a fresh, empty virtual environment for your project.Activate it.Install only auto-py-to-exe and the exact libraries your specific script needs.Run auto-py-to-exe from inside that activated environment
|
Step 1: Create the Empty Environment
Open your terminal or command prompt, navigate to your project folder, and run the command for your operating system: [1]
(Replace
myenv with whatever name you want to give your environment folder). [1]Step 2: Activate the Environment [1]
Once activated, your terminal prompt will show
(myenv) at the beginning of the line. [1]Step 3: How to Verify It Is Truly Empty
To confirm that absolutely nothing is installed in this environment, run:
bash
Use code with caution.
Because you used the
--without-pip flag, your system will return an error stating that 'pip' is not recognized or found. This proves the environment is entirely bare and contains only the core Python binary files. [1, 2]Warning: How to Install Packages Later
Because this environment has no package manager (
pip), you cannot install libraries normally. If you actually meant a clean, standard environment (which only includes pip and setuptools but no heavy third-party libraries), omit the flag: [1, 2, 3, 4, 5]bash
Use code with caution.
If you are setting this up for your standalone executable, let me know:
I can guide you through the manual installation steps.
|
=-=-=-=-=-=-=-=-=-
- Create the Application: Log in to cPanel, go to the Software section, and click Setup Python App. Click Create Application, select your desired Python version, and set the application directory. [1, 2]
- Install Dependencies: cPanel allows you to declare a
requirements.txtfile and runpipinstallation directly from the Python Selector screen. [1, 2, 3] - Configure the WSGI File: cPanel automatically generates a
passenger_wsgi.pyfile. You will need to edit this file in the File Manager to link it to your primary Flask file (e.g.,from app import app as application). [1, 2, 3] - Restart: Once the configuration is set, restart the application from the Setup Python App page to apply the changes. [1]
- Hosting Support: Your hosting provider must have the cPanel Python Selector feature enabled.
- Environment: cPanel handles Python applications by automatically creating a virtual environment for each app.
- Routing Entry Point: In Flask, your main
appinstance must be namedapplicationin the WSGI file to interface correctly with Phusion Passenger
=-=-=-=-=-=-=-
![]()
