feat: Update readme.md

Update readme.md with better instructions.
This commit is contained in:
Alonso Cárdenas
2026-10-29 11:51:10 -03:00
parent 16247f45cc
commit 2a1a992dfa
8 changed files with 660 additions and 7 deletions
+17 -2
View File
@@ -1,3 +1,18 @@
hf auth login
# Phonon-40-es
The safe tensor file (the x6lttij... file) is for the voice of manito. Phonon uses that to cloning the voice and using it for audio and streaming.
## Just in case:
*The safe tensor file (the x6lttij... file) is for the voice of manito. Phonon uses that to cloning the voice and using it for audio and streaming.*
## Before running.
This model of Phonon-40-es calls huggingface as its a gated model, so you need access it and ask for permition to use it.
This is the link. ```https://huggingface.co/gradium/phonon-40m-es```
## Setup
Copy `env.example` to `.env` and then add your Hugging Face token as `HF_TOKEN`. When you run `main.py`, it loads `.env` automatically from the same folder; you do not need to set the environment variable manually in the console.
```
cp env.example .env
uv sync
uv run python main.py
```
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
HF_TOKEN = "hf_...."
+10
View File
@@ -1,8 +1,18 @@
import os
from pathlib import Path
from dotenv import load_dotenv
import ptts
import sounddevice as sd
import numpy as np
import huggingface_hub as hf
#Load Token for HuggingFace.
load_dotenv(dotenv_path=Path(__file__).with_name(".env"))
if not os.environ.get("HF_TOKEN", "").strip():
raise RuntimeError(
"HF_TOKEN is not set. Add your Hugging Face token to a .env file."
)
def main():
print("Cargando el modelo Phonon TTS...")
+1
View File
@@ -8,5 +8,6 @@ dependencies = [
"huggingface-hub>=2.3.0",
"numpy>=2.5.4",
"ptts>=0.5.0",
"python-dotenv>=1.1.0",
"sounddevice>=0.5.6",
]
+11
View File
@@ -278,6 +278,7 @@ dependencies = [
{ name = "huggingface-hub" },
{ name = "numpy" },
{ name = "ptts" },
{ name = "python-dotenv" },
{ name = "sounddevice" },
]
@@ -286,6 +287,7 @@ requires-dist = [
{ name = "huggingface-hub", specifier = ">=2.3.0" },
{ name = "numpy", specifier = ">=2.5.4" },
{ name = "ptts", specifier = ">=0.5.0" },
{ name = "python-dotenv", specifier = ">=1.1.0" },
{ name = "sounddevice", specifier = ">=0.5.6" },
]
@@ -317,6 +319,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/b6/ae/315bbeee126a769cbde43cf4908acb4b40408d8bf8bbf334dd7368d8dadf/pycparser-3.12-py3-none-any.whl", hash = "sha256:a076f3f489b39b43ed13563a1dafe42447445bec2e294154ec5c57fcdda4c85e", size = 62600, upload-time = "2026-10-22T13:40:02.021Z" },
]
[[package]]
name = "python-dotenv"
version = "1.2.4"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/74/26/2fbeedb218a787a5eea551c7532cac4e009f83d689dd2faa0d0353473f86/python_dotenv-1.2.4.tar.gz", hash = "sha256:f0d53e69935a851c0dcc78f3ab7aaccd8cabef0b92382b576b824212902873c0", size = 60824, upload-time = "2026-10-01T05:36:10Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/60/d1/38f3a3405989a89ac18390803e70c6ad7c7760da4f9b83cbeca0c44a0c72/python_dotenv-1.2.4-py3-none-any.whl", hash = "sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc", size = 23266, upload-time = "2026-10-01T05:36:08.633Z" },
]
[[package]]
name = "pyyaml"
version = "6.0.3"