Alternative ways to use Kokoro-TTS kokoro-onnx, Kokoro-FastAPI, kokoro
Clone the Repository
sh
https://github.com/NeuralFalconYT/Kokoro-TTS-Subtitle.git
cd Kokoro-TTS-Subtitle
(Optional) Create and Activate a Virtual Environment
sh
python -m venv myenv
myenv\Scripts\activateMac/Linux:
sh
python3 -m venv myenv
source myenv/bin/activate
Install PyTorch
Check CUDA Version (for GPU setup):
bash
nvcc --version
Find your CUDA version example 11.8
Visit PyTorch Get Started and install the version compatible with your CUDA setup.:
pip install torch --index-url https://download.pytorch.org/whl/cu118pip install torch --index-url https://download.pytorch.org/whl/cu121pip install torch --index-url https://download.pytorch.org/whl/cu124Install Dependencies
sh
pip install -r requirements.txtInstall eSpeak NG
For Windows:
espeak-ng-X64.msi.Run the installer and follow the installation steps. Ensure that you install eSpeak NG in the default directory:
C:\Program Files\eSpeak NG
> Note: This default path is required for the application to locate eSpeak NG properly.
For Linux:
bash
sudo apt-get -qq -y install espeak-ng > /dev/null 2>&1
> Note: This command suppresses unnecessary output for a cleaner installation process.If you used a virtual environment, make sure you enabled it.
- Windows/Mac/Linux:
sh
python beta.py
Or,
python one_clicker.py
Then, double-click on run_app.bat (Windows) to execute the script.
scripts/api.py Codekokoro_v1 folder from your project directory.kokoro_v1 directory, run the following command to uninstall dependencies:
bash
pip uninstall -r requirements.txtbash
pip uninstall torchC:\Users\<username>\.cache\huggingface\hubhub folder.
That's it! You've successfully removed everything.If you encounter an error while generating Japanese audio, try the following steps:
unidic:bash
pip uninstall unidic -y
unidic:bash
pip install unidic
bash
python -m unidic download
Note: This solution is likely to work, the same issue has been observed on both Colab and Hugging Face.
Kokoro model is licensed under the [Apache License 2.0]
$ claude mcp add Kokoro-TTS-Subtitle \
-- python -m otcore.mcp_server <graph>