praxelhq commited on
Commit
256b084
Β·
verified Β·
1 Parent(s): 4acccac

README rewrite: plainer human voice, drop template scaffolding

Browse files
Files changed (2) hide show
  1. FIELD_NOTES.md +11 -24
  2. README.md +10 -74
FIELD_NOTES.md CHANGED
@@ -1,34 +1,21 @@
1
- # Field Notes β€” Praxy Voice at Build Small
2
 
3
- *Four small-model voice apps, one Modal backend, built for the HuggingFace Build Small hackathon.*
4
 
5
- We set out to prove one thing the giants can't do: **preserve a single speaker's identity across languages and scripts.** ElevenLabs and Cartesia synthesize Hindi or Tamil beautifully, but they don't keep *you* sounding like *you* when the script switches. That gap became four apps.
6
 
7
- ## What we shipped
8
 
9
- | App | One line | Track |
10
- |---|---|---|
11
- | πŸŽ™οΈ Polyglot Me | Clone your voice once, hear yourself in English, Hindi, Telugu, Tamil | Thousand Token Wood |
12
- | πŸ¦‰ Parliament of Owls | Five inner-voice owls debate your dilemma in your own voice, then a verdict | Thousand Token Wood |
13
- | πŸŒ™ Nidra | An AI agent writes a bedtime story, narrated in your voice | Thousand Token Wood |
14
- | πŸ“– Read-it-to-Amma | Paste English, hear it explained simply and read aloud in Telugu/Tamil/Hindi | Backyard AI |
15
 
16
- All four call one shared **Modal** app (`praxy-voice`, scale-to-zero GPU). All models are small (≀9B): **NVIDIA Nemotron-Nano-9B** (agentic text), **VoxCPM2** and **MiniCPM5-1B** (OpenBMB), and **Sarvam-Translate**.
17
 
18
- ## Three things we learned the hard way
19
 
20
- **1. Gradio 6.0 silently drops `css=` from `gr.Blocks()`.** Our custom themes simply weren't applying β€” the apps rendered as default Gradio. The fix that actually works in Gradio 6 is to inject the stylesheet as the first component: `gr.HTML(f"<style>{CSS}</style>")`, plus inline styles on every dynamically-rendered HTML card so nothing depends on an external sheet. We extracted this into a shared `theme.py` design system ("Praxy Field Guide") with WCAG-AA-verified palettes per app.
21
 
22
- **2. A Modal token can point at the wrong *workspace*.** Our Spaces threw a wall of `Error` boxes that looked like model failures. The real cause: the Space held credentials for one Modal workspace, but the deployed app lived in another β€” so `modal.Cls.from_name(...)` couldn't find the classes at all. A backend can be perfectly healthy and still be unreachable if the token resolves to the wrong workspace. Always validate the full path end-to-end, not just that the app "deployed."
23
 
24
- **3. Persona difference should come from the words, not a fake knob.** For Parliament of Owls we wanted five distinct voices. VoxCPM2's `clone()` has no emotion parameter β€” so rather than claim emotion-controlled TTS we didn't have, we made the *writing* carry the difference: the Worrier frets, the Trickster jokes, the Dreamer drifts. Honest, and it reads as more distinct than a pitch-shift would.
25
 
26
- ## The architecture, in one breath
27
-
28
- A CPU-only HuggingFace Space (the UI) calls a serverless Modal app (the GPU). Each model is its own Modal class that scales to zero between requests, so the whole fleet costs nothing idle and warms in 2–5 minutes on first use. The agentic apps (Nidra, Parliament of Owls) run multi-pass Nemotron orchestration β€” outlineβ†’story, or five personasβ†’verdict β€” and hand the text to VoxCPM2 for voicing.
29
-
30
- ## What's honest about our badges
31
-
32
- We claim what's true: the custom design system (not default Gradio), the small-model and sponsor usage, and this report. We **don't** claim Off-Grid (we run on Modal cloud GPU, not locally), Llama (we use Nemotron/MiniCPM/VoxCPM), or Well-Tuned for these four apps (they use VoxCPM2 base, not our published `praxy-voice-r6` fine-tune). Over-claiming is easy to check and not worth it.
33
-
34
- β€” Team Praxy
 
1
+ # Field notes β€” building Praxy Voice for Build Small
2
 
3
+ Four small-model voice apps, one Modal backend. What we set out to do, and what tripped us up.
4
 
5
+ ## The idea
6
 
7
+ The thing the big TTS players can't do is keep *you* sounding like *you* across languages. ElevenLabs and Cartesia speak Hindi or Tamil fine, but the speaker identity drifts when the script changes. Closing that gap is the whole reason these apps exist β€” clone a voice once, hear it in English, Hindi, Telugu, Tamil.
8
 
9
+ Four apps came out of it: **Polyglot Me** (your voice, four languages), **Parliament of Owls** (five inner-voice owls debate a dilemma in your voice), **Nidra** (an agent writes a bedtime story and narrates it in your voice), **Read-it-to-Amma** (English explained simply and read aloud in an Indic language). They all call one shared Modal app, and every model is small (≀9B): Nemotron-Nano-9B, VoxCPM2, MiniCPM5-1B, plus Sarvam for translation.
 
 
 
 
 
10
 
11
+ ## Three things that cost us time
12
 
13
+ **Gradio 6 quietly drops `css=` from `gr.Blocks()`.** Our themes just weren't applying β€” the apps rendered as plain Gradio. What works in 6.0 is injecting the stylesheet as the first component (`gr.HTML("<style>…")`) and inlining styles on anything rendered at runtime. We pulled it all into a shared `theme.py`.
14
 
15
+ **A Modal token can point at the wrong workspace.** The Spaces threw a wall of `Error` boxes that looked like model failures. The real cause: the token resolved to a different Modal workspace than the one the app was deployed in, so `modal.Cls.from_name(...)` couldn't find the classes at all. A backend can be healthy and still unreachable β€” validate the whole path, not just that it deployed.
16
 
17
+ **Persona should come from the words, not a fake knob.** For the owls we wanted five distinct voices. VoxCPM2's `clone()` has no emotion parameter, so instead of faking one we let the writing carry it β€” the worrier frets, the trickster jokes. Reads as more distinct than a pitch-shift would anyway.
18
 
19
+ ## The shape of it
20
 
21
+ A CPU-only Space (the UI) calls a serverless Modal app (the GPU). Each model is its own class that scales to zero between requests, so the fleet costs nothing idle and warms in a few minutes on first use. The two agentic apps run multi-pass Nemotron — outline→story, or five personas→verdict — and hand the text to VoxCPM2.
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -23,90 +23,26 @@ tags:
23
  - achievement:fieldnotes
24
  ---
25
 
26
- <div align="center">
27
-
28
  # πŸŒ™ Nidra
29
 
30
- ### A bedtime story woven just for your child β€” written by an AI agent, narrated in *your* voice.
31
-
32
- **Type a name, an age, and a theme. A two-step agent writes the story; your cloned voice reads it aloud.**
33
-
34
- [![Open in Spaces](https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-md.svg)](https://huggingface.co/spaces/build-small-hackathon/nidra)
35
-
36
- **β–Ά Try it live:** [build-small-hackathon/nidra](https://huggingface.co/spaces/build-small-hackathon/nidra) Β· πŸŽ₯ Demo video: *walkthrough linked at submission* Β· πŸ““ [Field Notes](./FIELD_NOTES.md)
37
-
38
- </div>
39
-
40
- ---
41
-
42
- ## TL;DR for Judges
43
-
44
- - **Track β€” Thousand Token Wood:** a delightful experience where the small model is genuinely load-bearing β€” the agent *writes the story*, and the cloned voice *is* the magic.
45
- - **NVIDIA Quest:** a real **two-step agent** on **Nemotron-Nano-9B** β€” outline β†’ full story β€” with the trace downloadable as Markdown.
46
- - **OpenBMB Quest:** narration by **VoxCPM2** (zero-shot voice cloning from a ~10s clip).
47
- - **Modal:** the whole GPU pipeline runs serverless and scales to zero.
48
- - **Off-Brand:** a custom "field-guide" night-sky UI (injected CSS, animated star-field, illuminated-manuscript story card) β€” not the default Gradio look.
49
- - **Community Choice:** public Space, free to try and upvote.
50
-
51
- ## Why this exists
52
 
53
- Every parent runs out of stories. The store-bought ones aren't about *your* kid, and the recorded ones aren't in *your* voice β€” the one thing a child actually falls asleep to. Nidra makes a brand-new story starring your child, on any theme, and reads it back in the voice they know.
54
 
55
- ## What you can do
56
 
57
- - Enter your child's **name, age, and a theme** ("a curious mongoose who finds a magical library").
58
- - Watch the **agent's outline** appear (step 1), then the full story (step 2).
59
- - Upload **~10 seconds of your voice** (optional) β€” the story is narrated in it.
60
- - **Download the agent trace** (Markdown) to see exactly how the story was built.
61
 
62
- ## πŸŽ₯ Demo
63
 
64
- The live Space above is fully interactive β€” **press "Weave the story"** and listen. (First run warms the models on Modal, ~3–5 min; after that it's quick.) A recorded walkthrough is linked here at submission.
65
 
66
- ## How it's built
67
 
68
  ```mermaid
69
  flowchart LR
70
- A[name Β· age Β· theme] --> B[Nemotron-Nano-9B<br/>step 1: outline]
71
- B --> C[Nemotron-Nano-9B<br/>step 2: full story]
72
- C --> D[VoxCPM2<br/>narrate each sentence]
73
- D --> E[πŸ”Š stitched bedtime story]
74
- F[~10s voice clip] --> D
75
  ```
76
 
77
- A CPU-only HuggingFace Space calls a serverless **Modal** app. The agent runs two Nemotron passes (outline, then story), and VoxCPM2 voices each sentence in the cloned voice. Everything scales to zero between runs.
78
-
79
- | Role | Model | Params |
80
- |---|---|---|
81
- | Story agent (2-step) | [NVIDIA-Nemotron-Nano-9B-v2](https://huggingface.co/nvidia/NVIDIA-Nemotron-Nano-9B-v2) | 9B |
82
- | Voice | [VoxCPM2](https://huggingface.co/openbmb/VoxCPM2) (OpenBMB) | small |
83
-
84
- All models are well under the 32B "build small" cap.
85
-
86
- ## Built for the Build Small Hackathon
87
-
88
- | Prize / Badge | Status | Why it qualifies |
89
- |---|---|---|
90
- | 🌲 Thousand Token Wood | Submitted | Delightful, small-model-load-bearing bedtime experience |
91
- | 🟩 NVIDIA Quest | Eligible | Two-step Nemotron-Nano-9B agent (outline β†’ story) |
92
- | 🟦 OpenBMB Quest | Eligible | VoxCPM2 voice cloning |
93
- | βš™οΈ Modal | Eligible | Serverless GPU, scale-to-zero |
94
- | 🎨 Off-Brand | Eligible | Custom night-sky design system, not default Gradio |
95
- | πŸ““ Field Notes | Eligible | [Written report](./FIELD_NOTES.md) on what we built |
96
-
97
- ### Not claiming (honesty matters)
98
- - **Off-Grid** β€” runs on Modal cloud GPU, not locally.
99
- - **Llama Champion** β€” uses Nemotron + VoxCPM2, not llama.cpp.
100
- - **Well-Tuned** β€” this app uses VoxCPM2 base, not our published `praxy-voice-r6` fine-tune.
101
-
102
- ## Submission links
103
-
104
- | | |
105
- |---|---|
106
- | Live Space | https://huggingface.co/spaces/build-small-hackathon/nidra |
107
- | Demo video | *linked at submission* |
108
- | Field Notes | [./FIELD_NOTES.md](./FIELD_NOTES.md) |
109
-
110
- ---
111
-
112
- *A story that's about your child, in your voice β€” the two things a bedtime needs and an app usually can't give.*
 
23
  - achievement:fieldnotes
24
  ---
25
 
 
 
26
  # πŸŒ™ Nidra
27
 
28
+ A bedtime story, written for your kid and read in your voice.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
+ You give a name, an age, and whatever they're into this week. A small agent writes the story; your cloned voice reads it back.
31
 
32
+ **β†’ [Open Nidra](https://huggingface.co/spaces/build-small-hackathon/nidra)** Β· first run warms up on Modal (~3–5 min), then it's quick.
33
 
34
+ ## What it does
 
 
 
35
 
36
+ Type something like *"Arjun, 5, a curious mongoose who finds a library under a banyan tree."* Nidra writes an outline, then the full story, then narrates it line by line in the voice you upload (or a default warm one). You can download the whole agent trace if you want to see how it got there.
37
 
38
+ ## How it works
39
 
40
+ Two passes of NVIDIA's Nemotron-Nano-9B β€” outline, then story β€” and then VoxCPM2 voices each sentence. The Space itself is CPU-only; all the GPU work is a serverless Modal app that scales to zero between runs.
41
 
42
  ```mermaid
43
  flowchart LR
44
+ A[name Β· age Β· theme] --> B[Nemotron: outline] --> C[Nemotron: story] --> D[VoxCPM2: narrate] --> E[πŸ”Š]
45
+ V[your voice clip] --> D
 
 
 
46
  ```
47
 
48
+ Built for the HuggingFace **Build Small** hackathon β€” Thousand Token Wood. Models: Nemotron-Nano-9B (NVIDIA) and VoxCPM2 (OpenBMB), both small, both on Modal. Notes on the build are in [FIELD_NOTES.md](./FIELD_NOTES.md).