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
Download training/make_pcm.py from semfence/pingo-ptbr-edge: direct link, hf CLI and curl.
- Browser
- Download file 912 Bytes
-
https://huggingface.co/semfence/pingo-ptbr-edge/resolve/main/training/make_pcm.py
- Command line
-
hf download hf://semfence/pingo-ptbr-edge/training/make_pcm.py
-
curl -L -o make_pcm.py https://huggingface.co/semfence/pingo-ptbr-edge/resolve/main/training/make_pcm.py
912 Bytes
| """Parquet (FLAC 24 kHz) -> raw 16 kHz int16 PCM, one file per split, as `dump_data -train` expects.""" | |
| import io, sys, glob, numpy as np, pyarrow.parquet as pq, soundfile as sf | |
| from scipy.signal import resample_poly | |
| root = sys.argv[1] | |
| for split, out in (("train", "train.s16"), ("validation", "val.s16")): | |
| n = 0; secs = 0.0 | |
| with open(out, "wb") as f: | |
| for p in sorted(glob.glob(f"{root}/data/{split}-*.parquet")): | |
| t = pq.read_table(p, columns=["audio"]).column("audio") | |
| for a in t.to_pylist(): | |
| x, sr = sf.read(io.BytesIO(a["bytes"]), dtype="float32") | |
| if x.ndim > 1: x = x.mean(1) | |
| assert sr == 24000, sr | |
| y = resample_poly(x, 2, 3) | |
| f.write((np.clip(y, -1, 1) * 32767).astype("<i2").tobytes()); n += 1; secs += len(y) / 16000 | |
| print(split, n, "clips", round(secs / 3600, 2), "h", flush=True) | |