minhahwang commited on
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) hide show
  1. README.md +23 -2
  2. mission.md +1 -1
  3. sprint.md +17 -6
  4. stories/Three_LIttle_Pigs.txt +0 -117
  5. tech_stack.md +21 -8
README.md CHANGED
@@ -38,7 +38,7 @@ Built for the Hugging Face Hackathon. Runs entirely on local models inside a Gra
38
 
39
  - **UI:** Gradio 5.x + gr.Server (custom CSS/JS for Google Stitch-inspired design)
40
  - **Runtime:** Single `app.py` process on HF Spaces (T4 or A10G GPU)
41
- - **Stories:** 3–5 public domain `.txt` files
42
  - **Storage:** In-memory session cache (no database)
43
 
44
  ## Quick Start (Local Dev)
@@ -56,7 +56,11 @@ python app.py
56
  ```
57
  β”œβ”€β”€ app.py # Main Gradio app
58
  β”œβ”€β”€ requirements.txt # Python deps
59
- β”œβ”€β”€ stories/ # Public domain story texts
 
 
 
 
60
  β”œβ”€β”€ static/ # Custom CSS/JS for Stitch-style UI
61
  β”œβ”€β”€ assets/covers/ # Story cover images
62
  β”œβ”€β”€ mission.md # Product vision
@@ -65,6 +69,23 @@ python app.py
65
  └── future_mobile_app_considerations.md # Mobile deployment guidance
66
  ```
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  ## Key Design Decisions
69
 
70
  - **All local inference** β€” voice, Q&A, and ASR run on the Space GPU. No external APIs.
 
38
 
39
  - **UI:** Gradio 5.x + gr.Server (custom CSS/JS for Google Stitch-inspired design)
40
  - **Runtime:** Single `app.py` process on HF Spaces (T4 or A10G GPU)
41
+ - **Stories:** 10 public domain `.txt` files (downloaded and cleaned from Project Gutenberg)
42
  - **Storage:** In-memory session cache (no database)
43
 
44
  ## Quick Start (Local Dev)
 
56
  ```
57
  β”œβ”€β”€ app.py # Main Gradio app
58
  β”œβ”€β”€ requirements.txt # Python deps
59
+ β”œβ”€β”€ stories/ # 10 cleaned public domain story texts (TTS-ready)
60
+ β”œβ”€β”€ story_downloader/ # Story acquisition & cleaning pipeline
61
+ β”‚ β”œβ”€β”€ gutenberg_downloader.py # Reusable Project Gutenberg downloader/parser
62
+ β”‚ β”œβ”€β”€ download_stories.py # Downloads 10 children's stories
63
+ β”‚ └── clean_stories.py # Strips Gutenberg boilerplate for TTS
64
  β”œβ”€β”€ static/ # Custom CSS/JS for Stitch-style UI
65
  β”œβ”€β”€ assets/covers/ # Story cover images
66
  β”œβ”€β”€ mission.md # Product vision
 
69
  └── future_mobile_app_considerations.md # Mobile deployment guidance
70
  ```
71
 
72
+ ## Stories Included
73
+
74
+ | Story | Words | Source |
75
+ |---|---|---|
76
+ | The Tale of Peter Rabbit | 948 | Beatrix Potter |
77
+ | The Tale of Benjamin Bunny | 1,118 | Beatrix Potter |
78
+ | The Tale of Jemima Puddle-Duck | 1,245 | Beatrix Potter |
79
+ | The Tale of Tom Kitten | 691 | Beatrix Potter |
80
+ | The History of Tom Thumb | 2,912 | Traditional |
81
+ | The Story of the Three Little Pigs | 956 | Traditional |
82
+ | The Little Red Hen | 1,295 | Traditional |
83
+ | The Little Gingerbread Man | 1,823 | Traditional |
84
+ | The Sleeping Beauty | 1,783 | Traditional |
85
+ | The Adventures of Puss in Boots | 503 | Traditional (verse) |
86
+
87
+ 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.
88
+
89
  ## Key Design Decisions
90
 
91
  - **All local inference** β€” voice, Q&A, and ASR run on the Space GPU. No external APIs.
mission.md CHANGED
@@ -56,7 +56,7 @@ A parent at a laptop who records their voice, picks a short story, and shows the
56
 
57
  **In scope:**
58
  - Upload/record parent voice sample (15–30s)
59
- - Select from 3–5 pre-loaded short stories (public domain)
60
  - Play story narrated in cloned voice with interruptible chunked streaming
61
  - Pause narration through an Ask button, preserve the current story chunk, answer, then resume
62
  - Cache generated narration per voice session and story
 
56
 
57
  **In scope:**
58
  - Upload/record parent voice sample (15–30s)
59
+ - Select from 10 pre-loaded short stories (public domain, sourced from Project Gutenberg)
60
  - Play story narrated in cloned voice with interruptible chunked streaming
61
  - Pause narration through an Ask button, preserve the current story chunk, answer, then resume
62
  - Cache generated narration per voice session and story
sprint.md CHANGED
@@ -11,10 +11,10 @@ Ship a public Hugging Face Space: parent clones voice β†’ story streams in that
11
 
12
  | # | Task | Time | Done |
13
  |---|---|---|---|
14
- | 1 | Set up repo: `app.py`, `requirements.txt`, `stories/` | 30m | ☐ |
15
  | 2 | Load QWEN-TTS-0.6B locally, test basic TTS (text β†’ audio) | 1h | ☐ |
16
  | 3 | Implement voice cloning and cache voice representation after recording | 1.5h | ☐ |
17
- | 4 | Add 3 short stories as `.txt` files (public domain) | 30m | ☐ |
18
  | 5 | Wire up: pick story β†’ stream first narration chunk, track chunk index, cache story audio | 1h | ☐ |
19
 
20
  **Checkpoint:** Can generate a story audio file in a cloned voice from CLI.
@@ -92,10 +92,21 @@ VoiceClone/
92
  β”œβ”€β”€ app.py # Main Gradio app (all logic)
93
  β”œβ”€β”€ requirements.txt # Python deps
94
  β”œβ”€β”€ README.md # HF Space description
95
- β”œβ”€β”€ stories/
96
- β”‚ β”œβ”€β”€ three_bears.txt
97
- β”‚ β”œβ”€β”€ tortoise_hare.txt
98
- β”‚ └── little_red_hen.txt
 
 
 
 
 
 
 
 
 
 
 
99
  β”œβ”€β”€ static/
100
  β”‚ β”œβ”€β”€ style.css # Stitch-style custom CSS
101
  β”‚ β”œβ”€β”€ script.js # Animations, waveform
 
11
 
12
  | # | Task | Time | Done |
13
  |---|---|---|---|
14
+ | 1 | Set up repo: `app.py`, `requirements.txt`, `stories/` | 30m | β˜‘ |
15
  | 2 | Load QWEN-TTS-0.6B locally, test basic TTS (text β†’ audio) | 1h | ☐ |
16
  | 3 | Implement voice cloning and cache voice representation after recording | 1.5h | ☐ |
17
+ | 4 | Add 10 short stories as `.txt` files (public domain, from Project Gutenberg) | 30m | β˜‘ |
18
  | 5 | Wire up: pick story β†’ stream first narration chunk, track chunk index, cache story audio | 1h | ☐ |
19
 
20
  **Checkpoint:** Can generate a story audio file in a cloned voice from CLI.
 
92
  β”œβ”€β”€ app.py # Main Gradio app (all logic)
93
  β”œβ”€β”€ requirements.txt # Python deps
94
  β”œβ”€β”€ README.md # HF Space description
95
+ β”œβ”€β”€ stories/ # 10 cleaned TTS-ready story texts
96
+ β”‚ β”œβ”€β”€ The_Tale_of_Peter_Rabbit.txt
97
+ β”‚ β”œβ”€β”€ The_Tale_of_Benjamin_Bunny.txt
98
+ β”‚ β”œβ”€β”€ The_Tale_of_Jemima_Puddle_Duck.txt
99
+ β”‚ β”œβ”€β”€ The_Tale_of_Tom_Kitten.txt
100
+ β”‚ β”œβ”€β”€ The_History_of_Tom_Thumb.txt
101
+ β”‚ β”œβ”€β”€ The_Story_of_the_Three_Little_Pigs.txt
102
+ β”‚ β”œβ”€β”€ The_Little_Red_Hen.txt
103
+ β”‚ β”œβ”€β”€ The_Little_Gingerbread_Man.txt
104
+ β”‚ β”œβ”€β”€ The_Sleeping_Beauty.txt
105
+ β”‚ └── The_Adventures_of_Puss_in_Boots.txt
106
+ β”œβ”€β”€ story_downloader/ # Story acquisition & cleaning pipeline
107
+ β”‚ β”œβ”€β”€ gutenberg_downloader.py # Reusable Project Gutenberg downloader/parser
108
+ β”‚ β”œβ”€β”€ download_stories.py # Downloads 10 children's stories
109
+ β”‚ └── clean_stories.py # Strips Gutenberg boilerplate for TTS
110
  β”œβ”€β”€ static/
111
  β”‚ β”œβ”€β”€ style.css # Stitch-style custom CSS
112
  β”‚ β”œβ”€β”€ script.js # Animations, waveform
stories/Three_LIttle_Pigs.txt DELETED
@@ -1,117 +0,0 @@
1
- ο»ΏTHE STORY OF THE THREE LITTLE PIGS.
2
-
3
-
4
- Once upon a time there was an old Sow with three little Pigs,
5
- and as she had not enough to keep them, she sent them out to seek their
6
- fortune.
7
-
8
- The first that went off met a Man with a bundle of straw, and said to
9
- him, "Please, Man, give me that straw to build me a house"; which the
10
- Man did, and the little Pig built a house with it. Presently came along
11
- a Wolf, and knocked at the door, and said, "Little Pig, little Pig, let
12
- me come in."
13
-
14
- To which the Pig answered, "No, no, by the hair of my chinny chin chin."
15
-
16
- "Then I'll huff and I'll puff, and I'll blow your house
17
- in!" said the Wolf. So he huffed and he puffed, and he blew his house
18
- in, and ate up the little Pig.
19
-
20
- The second Pig met a Man with a bundle of furze, and said, "Please, Man,
21
- give me that furze to build a house"; which the Man did, and the Pig
22
- built his house.
23
-
24
- Then along came the Wolf and said, "Little Pig, little Pig, let me come
25
- in."
26
-
27
- "No, no, by the hair of my chinny chin chin."
28
-
29
- "Then I'll puff and I'll huff, and I'll blow your house in!" So he
30
- huffed and he puffed, and he puffed and he huffed, and at last he blew
31
- the house down, and ate up the second little Pig.
32
-
33
- The third little Pig met a Man with a load of bricks, and said, "Please,
34
- Man, give me those bricks to build a house with"; so the Man gave him
35
- the bricks, and he built his house with them. So the Wolf came, as he
36
- did to the other little Pigs, and said, "Little Pig, little Pig, let me
37
- come in."
38
-
39
- "No, no, by the hair of my chinny chin chin."
40
-
41
- "Then I'll huff and I'll puff, and I'll blow your house in."
42
-
43
- Well, he huffed and he puffed, and he huffed and he puffed, and he
44
- puffed and he huffed; but he could _not_ get the house down. When he
45
- found that he could not, with all his huffing and puffing, blow the
46
- house down, he said, "Little Pig, I know where there is a nice field of
47
- turnips."
48
-
49
- "Where?" said the little Pig.
50
-
51
- "Oh, in Mr. Smith's home-field; and if you will be ready to-morrow
52
- morning, I will call for you, and we will go together and get some for
53
- dinner."
54
-
55
- "Very well," said the little Pig, "I will be ready. What time do you
56
- mean to go?"
57
-
58
- "Oh, at six o'clock."
59
-
60
- Well, the little Pig got up at five, and got the turnips and was home
61
- again before six. When the Wolf came he said, "Little Pig, are you
62
- ready?"
63
-
64
- "Ready!" said the little Pig, "I have been and come back again, and got
65
- a nice pot-full for dinner."
66
-
67
- The Wolf felt very angry at this, but thought that he would be _up to_
68
- the little Pig somehow or other; so he said, "Little Pig, I know where
69
- there is a nice apple-tree."
70
-
71
- "Where?" said the Pig.
72
-
73
- "Down at Merry-garden," replied the Wolf; "and if you will not deceive
74
- me I will come for you, at five o'clock to-morrow, and we will go
75
- together and get some apples."
76
-
77
- Well, the little Pig woke at four the next morning, and bustled up, and
78
- went off for the apples, hoping to get back before the Wolf came; but
79
- he had farther to go, and had to climb the tree, so that just as he was
80
- coming down from it, he saw the Wolf coming, which, as you may suppose,
81
- frightened him very much. When the Wolf came up he said, "Little Pig,
82
- what! are you here before me? Are they nice apples?"
83
-
84
- "Yes, very," said the little Pig; "I will throw you down one." And he
85
- threw it so far that, while the Wolf was gone to pick it up, the
86
- little Pig jumped down and ran home.
87
-
88
- The next day the Wolf came again, and said to the little Pig, "Little
89
- Pig, there is a Fair in the Town this afternoon: will you go?"
90
-
91
- "Oh, yes," said the Pig, "I will go; what time shall you be ready?"
92
-
93
- "At three," said the Wolf.
94
-
95
- So the little Pig went off before the time, as usual, and got to the
96
- Fair, and bought a butter churn, and was on his way home with it when he
97
- saw the Wolf coming. Then he could not tell what to do. So he got into
98
- the churn to hide, and in doing so turned it round, and it began to
99
- roll, and rolled down the hill with the Pig inside it, which frightened
100
- the Wolf so much that he ran home without going to the Fair.
101
-
102
- He went to the little Pig's house, and told him how frightened he had
103
- been by a great round thing which came down the hill past him.
104
-
105
- Then the little Pig said, "Hah! I frightened you, did I? I had been to
106
- the Fair and bought a butter churn, and when I saw you I got into it,
107
- and rolled down the hill."
108
-
109
- Then the Wolf was very angry indeed, and declared he _would_ eat up the
110
- little Pig, and that he would get down the chimney after him.
111
-
112
- When the little Pig saw what he was about, he hung on the pot full of
113
- water, and made up a blazing fire, and, just as the Wolf was coming
114
- down, took off the cover of the pot, and in fell the Wolf. And the
115
- little Pig put on the cover again in an instant, boiled him up, and ate
116
- him for supper, and lived happy ever after.
117
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tech_stack.md CHANGED
@@ -93,14 +93,27 @@ No database. No external storage. No external LLM API. Stories are flat files. A
93
 
94
  ## 5. Stories (Content)
95
 
96
- 3–5 public domain stories stored as `.txt` in `stories/`:
97
- - *The Three Bears*
98
- - *The Tortoise and the Hare*
99
- - *The Ugly Duckling*
100
- - *Goodnight Moon* (if public domain) or similar
101
- - *The Little Red Hen*
102
-
103
- Each file: title on line 1, text below. No metadata DB needed.
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
  ---
106
 
 
93
 
94
  ## 5. Stories (Content)
95
 
96
+ 10 public domain children's stories stored as `.txt` in `stories/`, sourced from [Project Gutenberg](https://www.gutenberg.org/) via the `story_downloader/` pipeline:
97
+
98
+ | Story | Words | Author/Tradition |
99
+ |---|---|---|
100
+ | The Tale of Peter Rabbit | 948 | Beatrix Potter |
101
+ | The Tale of Benjamin Bunny | 1,118 | Beatrix Potter |
102
+ | The Tale of Jemima Puddle-Duck | 1,245 | Beatrix Potter |
103
+ | The Tale of Tom Kitten | 691 | Beatrix Potter |
104
+ | The History of Tom Thumb | 2,912 | Traditional |
105
+ | The Story of the Three Little Pigs | 956 | Traditional |
106
+ | The Little Red Hen | 1,295 | Traditional |
107
+ | The Little Gingerbread Man | 1,823 | Traditional |
108
+ | The Sleeping Beauty | 1,783 | Traditional |
109
+ | The Adventures of Puss in Boots | 503 | Traditional (verse) |
110
+
111
+ Each file: title on line 1, blank line, then story prose β€” ready for direct TTS chunking. No metadata DB needed.
112
+
113
+ **Story Pipeline (`story_downloader/`):**
114
+ - `gutenberg_downloader.py` β€” reusable downloader/parser for Project Gutenberg texts
115
+ - `download_stories.py` β€” fetches 10 specific children's stories by Gutenberg ID
116
+ - `clean_stories.py` β€” strips Gutenberg headers/footers, illustration tags, and metadata for TTS-clean output
117
 
118
  ---
119