Spaces:
Running
title: 'WakeForge: GCP & Piper TTS Wake Word Dataset Creator'
emoji: π¨
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 6.19.0
app_file: app.py
pinned: false
license: cc-by-4.0
π¨ WakeForge
GCP & Piper TTS Wake Word Dataset Creator
A Hugging Face Space that generates a synthetic keyword-spotting / wake-word dataset ready for Hugging Face Datasets and Edge Impulse.
It uses Google Cloud Text-to-Speech when you provide an API key, and automatically falls back to free, local Piper TTS when you don't β so it always works, with or without a paid service.
Features
- π Automatic backend selection β Google Cloud TTS (API key) with a free Piper TTS fallback.
- π§± Three keyword-spotting classes β
hey_android,unknown,background_noise(fully configurable phrases and labels). - ποΈ Local augmentation β gain, time shift, additive noise, echo, plus synthetic background-noise generation.
- π¦ Edge Impulse-ready β
label.<id>.wavfilenames andtraining/testingfolders. - β¬οΈ One-click publishing β push to a Hugging Face dataset repo and/or upload directly to your Edge Impulse project with your own API key.
Using the Space
- Set the phrases, labels and dataset size.
- (Optional) Paste a Google Cloud TTS API key. Leave blank to use free Piper TTS.
- (Optional) Tick Push to Hugging Face and provide a repo id + write token.
- (Optional) Tick Upload to Edge Impulse and paste your project API key (Edge Impulse β your project β Dashboard β Keys).
- Click Generate dataset and download the resulting zip.
Space secrets (optional)
Instead of typing keys into the UI, set them as Space secrets:
| Secret | Purpose |
|---|---|
GCP_TTS_API_KEY |
Google Cloud TTS API key |
HF_TOKEN |
Hugging Face write token for pushing datasets |
EDGE_IMPULSE_API_KEY |
Edge Impulse project API key |
Command line
The same pipeline runs locally without Gradio:
pip install -r requirements.txt
# Free Piper TTS, prepare an HF folder locally
python generate.py --out output --hf-out hf_dataset
# Google Cloud TTS + push to HF + upload to Edge Impulse
python generate.py \
--gcp-api-key "$GCP_TTS_API_KEY" \
--push-hf-repo "username/hey-android" --hf-token "$HF_TOKEN" \
--edge-impulse-api-key "$EDGE_IMPULSE_API_KEY"
Output layout
output/
edge_impulse_upload/
training/ hey_android.<id>.wav ...
testing/ hey_android.<id>.wav ...
by_label/
hey_android/ ...
metadata.csv
selected_voices.csv
dataset_summary.json
hf_dataset/
audio/train/ ...
audio/test/ ...
README.md # dataset card
hf_metadata.csv
metadata.csv
Getting the keys
- Google Cloud TTS API key β Google Cloud Console: enable Cloud Text-to-Speech API, then APIs & Services β Credentials β Create credentials β API key.
- Edge Impulse API key β your project β Dashboard β Keys.
- Hugging Face token β huggingface.co/settings/tokens (needs write access).
Notes & limitations
Synthetic TTS audio is great for bootstrapping a wake-word model but is not a production benchmark. Before deploying, add real recordings from the target device and expected acoustic environments.
License
CC BY 4.0. Verify that your use of generated synthetic speech complies with the terms of the voice models (Google Cloud TTS / Piper voices) you use.