Text-to-Speech
MLX
PyTorch
Portuguese
tts
pt-br
brazilian-portuguese
tinyml
esp32
esp32-s3
microcontroller
embedded
quantized
int8
4-bit precision
fargan
pingo
webassembly
javascript
Instructions to use semfence/pingo-ptbr-edge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use semfence/pingo-ptbr-edge with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download semfence/pingo-ptbr-edge --local-dir pingo-ptbr-edge
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
File size: 1,060 Bytes
76d09f0 3559195 76d09f0 3559195 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | """python -m pingo_edge --backend torch|mlx --text "Olá, eu sou a voz da SemFence." -o out.wav"""
import argparse, time
import soundfile as sf
from .frontend import Pingo, speak, VOICES, RATE
ap = argparse.ArgumentParser(prog="pingo_edge", description="pingo-ptbr edge (acústico 4 bits + vocoder xxs int8) em PyTorch ou MLX")
ap.add_argument("--backend", choices=["torch", "mlx"], default="torch")
ap.add_argument("--voice", choices=list(VOICES), default="F_s4")
ap.add_argument("--text", required=True); ap.add_argument("--speed", type=float, default=1.0)
ap.add_argument("--no-respelling", action="store_true", help="não reescrever termos em inglês")
ap.add_argument("-o", "--output", default="out.wav")
a = ap.parse_args()
t0 = time.time(); p = Pingo(a.backend); t1 = time.time()
y = speak(p, a.text, a.voice, a.speed, not a.no_respelling); t2 = time.time()
sf.write(a.output, y, RATE); print(f"{a.output}: {len(y) / RATE:.2f} s de áudio | carga {t1 - t0:.1f} s | síntese {t2 - t1:.1f} s ({len(y) / RATE / (t2 - t1):.1f}x tempo real) | {a.backend}")
|