Spaces:
Paused
Paused
Commit Β·
34e6427
1
Parent(s): ed5026f
Update docs to reflect story_downloader pipeline and 10-story corpus
Browse files- README.md: add story_downloader to project structure, add story table, update count
- mission.md: update scope from 3-5 to 10 stories, note Gutenberg source
- sprint.md: mark repo setup and story tasks done, update file structure with actual stories
- tech_stack.md: replace placeholder story list with actual 10 stories and pipeline docs
- Remove old Three_LIttle_Pigs.txt reference file (replaced by proper cleaned version)
Files changed (5)
- README.md+23-2
- mission.md+1-1
- sprint.md+17-6
- stories/Three_LIttle_Pigs.txtDeleted-117
- tech_stack.md+21-8
37 unmodified lines383940414142434411 unmodified lines5657585959606162636465662 unmodified lines697071727374757677787980818283848586878889909137 unmodified lines
- **UI:** Gradio 5.x + gr.Server (custom CSS/JS for Google Stitch-inspired design)- **Runtime:** Single `app.py` process on HF Spaces (T4 or A10G GPU)- **Stories:** 3β5 public domain `.txt` files- **Stories:** 10 public domain `.txt` files (downloaded and cleaned from Project Gutenberg)- **Storage:** In-memory session cache (no database)
## Quick Start (Local Dev)11 unmodified lines```βββ app.py # Main Gradio appβββ requirements.txt # Python depsβββ stories/ # Public domain story textsβββ stories/ # 10 cleaned public domain story texts (TTS-ready)βββ story_downloader/ # Story acquisition & cleaning pipelineβ βββ gutenberg_downloader.py # Reusable Project Gutenberg downloader/parserβ βββ download_stories.py # Downloads 10 children's storiesβ βββ clean_stories.py # Strips Gutenberg boilerplate for TTSβββ static/ # Custom CSS/JS for Stitch-style UIβββ assets/covers/ # Story cover imagesβββ mission.md # Product vision2 unmodified linesβββ future_mobile_app_considerations.md # Mobile deployment guidance```
## Stories Included
| Story | Words | Source ||---|---|---|| The Tale of Peter Rabbit | 948 | Beatrix Potter || The Tale of Benjamin Bunny | 1,118 | Beatrix Potter || The Tale of Jemima Puddle-Duck | 1,245 | Beatrix Potter || The Tale of Tom Kitten | 691 | Beatrix Potter || The History of Tom Thumb | 2,912 | Traditional || The Story of the Three Little Pigs | 956 | Traditional || The Little Red Hen | 1,295 | Traditional || The Little Gingerbread Man | 1,823 | Traditional || The Sleeping Beauty | 1,783 | Traditional || The Adventures of Puss in Boots | 503 | Traditional (verse) |
All stories are public domain from [Project Gutenberg](https://www.gutenberg.org/). Each file uses a simple format: title on line 1, blank line, then story prose β ready for direct TTS consumption.
## Key Design Decisions
- **All local inference** β voice, Q&A, and ASR run on the Space GPU. No external APIs.55 unmodified lines565758595960616255 unmodified lines
**In scope:**- Upload/record parent voice sample (15β30s)- Select from 3β5 pre-loaded short stories (public domain)- Select from 10 pre-loaded short stories (public domain, sourced from Project Gutenberg)- Play story narrated in cloned voice with interruptible chunked streaming- Pause narration through an Ask button, preserve the current story chunk, answer, then resume- Cache generated narration per voice session and story10 unmodified lines11121314141516171718192071 unmodified lines92939495969798959697989910010110210310410510610710810911011111210 unmodified lines
| # | Task | Time | Done ||---|---|---|---|| 1 | Set up repo: `app.py`, `requirements.txt`, `stories/` | 30m | β || 1 | Set up repo: `app.py`, `requirements.txt`, `stories/` | 30m | β || 2 | Load QWEN-TTS-0.6B locally, test basic TTS (text β audio) | 1h | β || 3 | Implement voice cloning and cache voice representation after recording | 1.5h | β || 4 | Add 3 short stories as `.txt` files (public domain) | 30m | β || 4 | Add 10 short stories as `.txt` files (public domain, from Project Gutenberg) | 30m | β || 5 | Wire up: pick story β stream first narration chunk, track chunk index, cache story audio | 1h | β |
**Checkpoint:** Can generate a story audio file in a cloned voice from CLI.71 unmodified linesβββ app.py # Main Gradio app (all logic)βββ requirements.txt # Python depsβββ README.md # HF Space descriptionβββ stories/β βββ three_bears.txtβ βββ tortoise_hare.txtβ βββ little_red_hen.txtβββ stories/ # 10 cleaned TTS-ready story textsβ βββ The_Tale_of_Peter_Rabbit.txtβ βββ The_Tale_of_Benjamin_Bunny.txtβ βββ The_Tale_of_Jemima_Puddle_Duck.txtβ βββ The_Tale_of_Tom_Kitten.txtβ βββ The_History_of_Tom_Thumb.txtβ βββ The_Story_of_the_Three_Little_Pigs.txtβ βββ The_Little_Red_Hen.txtβ βββ The_Little_Gingerbread_Man.txtβ βββ The_Sleeping_Beauty.txtβ βββ The_Adventures_of_Puss_in_Boots.txtβββ story_downloader/ # Story acquisition & cleaning pipelineβ βββ gutenberg_downloader.py # Reusable Project Gutenberg downloader/parserβ βββ download_stories.py # Downloads 10 children's storiesβ βββ clean_stories.py # Strips Gutenberg boilerplate for TTSβββ static/β βββ style.css # Stitch-style custom CSSβ βββ script.js # Animations, waveform123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117ο»ΏTHE STORY OF THE THREE LITTLE PIGS.
Once upon a time there was an old Sow with three little Pigs,and as she had not enough to keep them, she sent them out to seek theirfortune.
The first that went off met a Man with a bundle of straw, and said tohim, "Please, Man, give me that straw to build me a house"; which theMan did, and the little Pig built a house with it. Presently came alonga Wolf, and knocked at the door, and said, "Little Pig, little Pig, letme come in."
To which the Pig answered, "No, no, by the hair of my chinny chin chin."
"Then I'll huff and I'll puff, and I'll blow your housein!" said the Wolf. So he huffed and he puffed, and he blew his housein, and ate up the little Pig.
The second Pig met a Man with a bundle of furze, and said, "Please, Man,give me that furze to build a house"; which the Man did, and the Pigbuilt his house.
Then along came the Wolf and said, "Little Pig, little Pig, let me comein."
"No, no, by the hair of my chinny chin chin."
"Then I'll puff and I'll huff, and I'll blow your house in!" So hehuffed and he puffed, and he puffed and he huffed, and at last he blewthe house down, and ate up the second little Pig.
The third little Pig met a Man with a load of bricks, and said, "Please,Man, give me those bricks to build a house with"; so the Man gave himthe bricks, and he built his house with them. So the Wolf came, as hedid to the other little Pigs, and said, "Little Pig, little Pig, let mecome in."
"No, no, by the hair of my chinny chin chin."
"Then I'll huff and I'll puff, and I'll blow your house in."
Well, he huffed and he puffed, and he huffed and he puffed, and hepuffed and he huffed; but he could _not_ get the house down. When hefound that he could not, with all his huffing and puffing, blow thehouse down, he said, "Little Pig, I know where there is a nice field ofturnips."
"Where?" said the little Pig.
"Oh, in Mr. Smith's home-field; and if you will be ready to-morrowmorning, I will call for you, and we will go together and get some fordinner."
"Very well," said the little Pig, "I will be ready. What time do youmean to go?"
"Oh, at six o'clock."
Well, the little Pig got up at five, and got the turnips and was homeagain before six. When the Wolf came he said, "Little Pig, are youready?"
"Ready!" said the little Pig, "I have been and come back again, and gota nice pot-full for dinner."
The Wolf felt very angry at this, but thought that he would be _up to_the little Pig somehow or other; so he said, "Little Pig, I know wherethere is a nice apple-tree."
"Where?" said the Pig.
"Down at Merry-garden," replied the Wolf; "and if you will not deceiveme I will come for you, at five o'clock to-morrow, and we will gotogether and get some apples."
Well, the little Pig woke at four the next morning, and bustled up, andwent off for the apples, hoping to get back before the Wolf came; buthe had farther to go, and had to climb the tree, so that just as he wascoming down from it, he saw the Wolf coming, which, as you may suppose,frightened him very much. When the Wolf came up he said, "Little Pig,what! are you here before me? Are they nice apples?"
"Yes, very," said the little Pig; "I will throw you down one." And hethrew it so far that, while the Wolf was gone to pick it up, thelittle Pig jumped down and ran home.
The next day the Wolf came again, and said to the little Pig, "LittlePig, there is a Fair in the Town this afternoon: will you go?"
"Oh, yes," said the Pig, "I will go; what time shall you be ready?"
"At three," said the Wolf.
So the little Pig went off before the time, as usual, and got to theFair, and bought a butter churn, and was on his way home with it when hesaw the Wolf coming. Then he could not tell what to do. So he got intothe churn to hide, and in doing so turned it round, and it began toroll, and rolled down the hill with the Pig inside it, which frightenedthe Wolf so much that he ran home without going to the Fair.
He went to the little Pig's house, and told him how frightened he hadbeen by a great round thing which came down the hill past him.
Then the little Pig said, "Hah! I frightened you, did I? I had been tothe Fair and bought a butter churn, and when I saw you I got into it,and rolled down the hill."
Then the Wolf was very angry indeed, and declared he _would_ eat up thelittle Pig, and that he would get down the chimney after him.
When the little Pig saw what he was about, he hung on the pot full ofwater, and made up a blazing fire, and, just as the Wolf was comingdown, took off the cover of the pot, and in fell the Wolf. And thelittle Pig put on the cover again in an instant, boiled him up, and atehim for supper, and lived happy ever after.
92 unmodified lines939495969798991001011021039697989910010110210310410510610710810911011111211311411511611711811992 unmodified lines
## 5. Stories (Content)
3β5 public domain stories stored as `.txt` in `stories/`:- *The Three Bears*- *The Tortoise and the Hare*- *The Ugly Duckling*- *Goodnight Moon* (if public domain) or similar- *The Little Red Hen*
Each file: title on line 1, text below. No metadata DB needed.10 public domain children's stories stored as `.txt` in `stories/`, sourced from [Project Gutenberg](https://www.gutenberg.org/) via the `story_downloader/` pipeline:
| Story | Words | Author/Tradition ||---|---|---|| The Tale of Peter Rabbit | 948 | Beatrix Potter || The Tale of Benjamin Bunny | 1,118 | Beatrix Potter || The Tale of Jemima Puddle-Duck | 1,245 | Beatrix Potter || The Tale of Tom Kitten | 691 | Beatrix Potter || The History of Tom Thumb | 2,912 | Traditional || The Story of the Three Little Pigs | 956 | Traditional || The Little Red Hen | 1,295 | Traditional || The Little Gingerbread Man | 1,823 | Traditional || The Sleeping Beauty | 1,783 | Traditional || The Adventures of Puss in Boots | 503 | Traditional (verse) |
Each file: title on line 1, blank line, then story prose β ready for direct TTS chunking. No metadata DB needed.
**Story Pipeline (`story_downloader/`):**- `gutenberg_downloader.py` β reusable downloader/parser for Project Gutenberg texts- `download_stories.py` β fetches 10 specific children's stories by Gutenberg ID- `clean_stories.py` β strips Gutenberg headers/footers, illustration tags, and metadata for TTS-clean output
---
README.md+23-2
mission.md+1-1
sprint.md+17-6
stories/Three_LIttle_Pigs.txtDeleted-117
tech_stack.md+21-8