Spaces:
Running
Running
undefined - Initial Deployment
Browse files- README.md +7 -5
- index.html +387 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: babygenius
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: green
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,387 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Baby Genius - Interactive Learning for Infants</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
@keyframes float {
|
11 |
+
0% { transform: translateY(0px); }
|
12 |
+
50% { transform: translateY(-10px); }
|
13 |
+
100% { transform: translateY(0px); }
|
14 |
+
}
|
15 |
+
.floating {
|
16 |
+
animation: float 3s ease-in-out infinite;
|
17 |
+
}
|
18 |
+
.speech-bubble {
|
19 |
+
position: relative;
|
20 |
+
background: #f8fafc;
|
21 |
+
border-radius: 1rem;
|
22 |
+
}
|
23 |
+
.speech-bubble:after {
|
24 |
+
content: '';
|
25 |
+
position: absolute;
|
26 |
+
bottom: 0;
|
27 |
+
left: 20%;
|
28 |
+
width: 0;
|
29 |
+
height: 0;
|
30 |
+
border: 20px solid transparent;
|
31 |
+
border-top-color: #f8fafc;
|
32 |
+
border-bottom: 0;
|
33 |
+
border-left: 0;
|
34 |
+
margin-left: -10px;
|
35 |
+
margin-bottom: -20px;
|
36 |
+
}
|
37 |
+
.btn-press {
|
38 |
+
transition: all 0.2s;
|
39 |
+
}
|
40 |
+
.btn-press:active {
|
41 |
+
transform: scale(0.95);
|
42 |
+
}
|
43 |
+
</style>
|
44 |
+
</head>
|
45 |
+
<body class="bg-gradient-to-b from-blue-50 to-purple-50 min-h-screen">
|
46 |
+
<div class="container mx-auto px-4 py-8">
|
47 |
+
<!-- Header -->
|
48 |
+
<header class="text-center mb-8">
|
49 |
+
<h1 class="text-4xl md:text-5xl font-bold text-purple-600 mb-2">Baby Genius</h1>
|
50 |
+
<p class="text-lg text-gray-600">Interactive learning to boost your baby's IQ development</p>
|
51 |
+
</header>
|
52 |
+
|
53 |
+
<!-- Main Content -->
|
54 |
+
<main class="flex flex-col lg:flex-row gap-8">
|
55 |
+
<!-- Interactive Panel -->
|
56 |
+
<div class="lg:w-2/3 bg-white rounded-2xl shadow-lg p-6">
|
57 |
+
<div class="flex justify-between items-center mb-6">
|
58 |
+
<h2 class="text-2xl font-semibold text-purple-700">Learning Activities</h2>
|
59 |
+
<div class="flex items-center space-x-2">
|
60 |
+
<span class="text-sm text-gray-500">Volume</span>
|
61 |
+
<input type="range" min="0" max="100" value="70" class="w-24 accent-purple-500">
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
|
65 |
+
<!-- Activity Cards -->
|
66 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6">
|
67 |
+
<!-- Animal Sounds -->
|
68 |
+
<div class="bg-yellow-50 rounded-xl p-4 border border-yellow-100">
|
69 |
+
<div class="flex items-center mb-3">
|
70 |
+
<div class="w-10 h-10 rounded-full bg-yellow-200 flex items-center justify-center mr-3">
|
71 |
+
<i class="fas fa-paw text-yellow-600"></i>
|
72 |
+
</div>
|
73 |
+
<h3 class="font-medium text-gray-800">Animal Friends</h3>
|
74 |
+
</div>
|
75 |
+
<p class="text-sm text-gray-600 mb-3">Learn animal names and sounds</p>
|
76 |
+
<div class="grid grid-cols-3 gap-2">
|
77 |
+
<button onclick="playSound('cow')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-yellow-100">
|
78 |
+
<img src="https://cdn-icons-png.flaticon.com/512/1998/1998610.png" class="w-12 h-12 mb-1">
|
79 |
+
<span class="text-xs">Cow</span>
|
80 |
+
</button>
|
81 |
+
<button onclick="playSound('duck')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-yellow-100">
|
82 |
+
<img src="https://cdn-icons-png.flaticon.com/512/3176/3176291.png" class="w-12 h-12 mb-1">
|
83 |
+
<span class="text-xs">Duck</span>
|
84 |
+
</button>
|
85 |
+
<button onclick="playSound('lion')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-yellow-100">
|
86 |
+
<img src="https://cdn-icons-png.flaticon.com/512/616/616408.png" class="w-12 h-12 mb-1">
|
87 |
+
<span class="text-xs">Lion</span>
|
88 |
+
</button>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
|
92 |
+
<!-- Numbers -->
|
93 |
+
<div class="bg-blue-50 rounded-xl p-4 border border-blue-100">
|
94 |
+
<div class="flex items-center mb-3">
|
95 |
+
<div class="w-10 h-10 rounded-full bg-blue-200 flex items-center justify-center mr-3">
|
96 |
+
<i class="fas fa-sort-numeric-up-alt text-blue-600"></i>
|
97 |
+
</div>
|
98 |
+
<h3 class="font-medium text-gray-800">Counting Fun</h3>
|
99 |
+
</div>
|
100 |
+
<p class="text-sm text-gray-600 mb-3">Learn numbers 1 to 5</p>
|
101 |
+
<div class="grid grid-cols-5 gap-1">
|
102 |
+
<button onclick="playNumber(1)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
|
103 |
+
<span class="text-xl font-bold text-blue-600">1</span>
|
104 |
+
</button>
|
105 |
+
<button onclick="playNumber(2)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
|
106 |
+
<span class="text-xl font-bold text-blue-600">2</span>
|
107 |
+
</button>
|
108 |
+
<button onclick="playNumber(3)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
|
109 |
+
<span class="text-xl font-bold text-blue-600">3</span>
|
110 |
+
</button>
|
111 |
+
<button onclick="playNumber(4)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
|
112 |
+
<span class="text-xl font-bold text-blue-600">4</span>
|
113 |
+
</button>
|
114 |
+
<button onclick="playNumber(5)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
|
115 |
+
<span class="text-xl font-bold text-blue-600">5</span>
|
116 |
+
</button>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
|
120 |
+
<!-- Colors -->
|
121 |
+
<div class="bg-red-50 rounded-xl p-4 border border-red-100">
|
122 |
+
<div class="flex items-center mb-3">
|
123 |
+
<div class="w-10 h-10 rounded-full bg-red-200 flex items-center justify-center mr-3">
|
124 |
+
<i class="fas fa-palette text-red-600"></i>
|
125 |
+
</div>
|
126 |
+
<h3 class="font-medium text-gray-800">Color World</h3>
|
127 |
+
</div>
|
128 |
+
<p class="text-sm text-gray-600 mb-3">Learn basic colors</p>
|
129 |
+
<div class="grid grid-cols-4 gap-2">
|
130 |
+
<button onclick="playColor('red')" class="btn-press rounded-lg p-3 bg-red-500 hover:bg-red-600"></button>
|
131 |
+
<button onclick="playColor('blue')" class="btn-press rounded-lg p-3 bg-blue-500 hover:bg-blue-600"></button>
|
132 |
+
<button onclick="playColor('yellow')" class="btn-press rounded-lg p-3 bg-yellow-400 hover:bg-yellow-500"></button>
|
133 |
+
<button onclick="playColor('green')" class="btn-press rounded-lg p-3 bg-green-500 hover:bg-green-600"></button>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<!-- Shapes -->
|
138 |
+
<div class="bg-green-50 rounded-xl p-4 border border-green-100">
|
139 |
+
<div class="flex items-center mb-3">
|
140 |
+
<div class="w-10 h-10 rounded-full bg-green-200 flex items-center justify-center mr-3">
|
141 |
+
<i class="fas fa-shapes text-green-600"></i>
|
142 |
+
</div>
|
143 |
+
<h3 class="font-medium text-gray-800">Shape Explorer</h3>
|
144 |
+
</div>
|
145 |
+
<p class="text-sm text-gray-600 mb-3">Learn basic shapes</p>
|
146 |
+
<div class="grid grid-cols-3 gap-2">
|
147 |
+
<button onclick="playShape('circle')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-green-100">
|
148 |
+
<div class="w-12 h-12 rounded-full bg-purple-400 mb-1"></div>
|
149 |
+
<span class="text-xs">Circle</span>
|
150 |
+
</button>
|
151 |
+
<button onclick="playShape('square')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-green-100">
|
152 |
+
<div class="w-12 h-12 bg-red-400 mb-1"></div>
|
153 |
+
<span class="text-xs">Square</span>
|
154 |
+
</button>
|
155 |
+
<button onclick="playShape('triangle')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-green-100">
|
156 |
+
<div class="w-0 h-0 border-l-[24px] border-l-transparent border-r-[24px] border-r-transparent border-b-[24px] border-b-blue-400 mb-1"></div>
|
157 |
+
<span class="text-xs">Triangle</span>
|
158 |
+
</button>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
</div>
|
162 |
+
|
163 |
+
<!-- Talking Button -->
|
164 |
+
<div class="text-center mt-8">
|
165 |
+
<button onclick="playRandomPhrase()" class="btn-press bg-purple-600 hover:bg-purple-700 text-white font-bold py-4 px-8 rounded-full shadow-lg transition-all duration-300 transform hover:scale-105">
|
166 |
+
<i class="fas fa-comment-dots text-xl mr-2"></i>
|
167 |
+
Talk to Baby!
|
168 |
+
</button>
|
169 |
+
</div>
|
170 |
+
</div>
|
171 |
+
|
172 |
+
<!-- Side Panel -->
|
173 |
+
<div class="lg:w-1/3">
|
174 |
+
<!-- Baby Character -->
|
175 |
+
<div class="bg-white rounded-2xl shadow-lg p-6 mb-6 text-center">
|
176 |
+
<div class="relative mb-4">
|
177 |
+
<img src="https://cdn-icons-png.flaticon.com/512/1864/1864593.png" class="w-32 h-32 mx-auto floating">
|
178 |
+
<div id="speechBubble" class="speech-bubble p-4 mb-4 hidden">
|
179 |
+
<p id="bubbleText" class="text-gray-800"></p>
|
180 |
+
</div>
|
181 |
+
</div>
|
182 |
+
<h3 class="text-xl font-semibold text-purple-700 mb-2">Meet Baby Genius!</h3>
|
183 |
+
<p class="text-gray-600 mb-4">I'll help your baby learn and grow smarter every day!</p>
|
184 |
+
<div class="bg-purple-50 rounded-lg p-3">
|
185 |
+
<div class="flex justify-between items-center mb-2">
|
186 |
+
<span class="text-sm font-medium text-purple-700">Today's Progress</span>
|
187 |
+
<span class="text-xs bg-purple-100 text-purple-800 py-1 px-2 rounded-full">3/5 activities</span>
|
188 |
+
</div>
|
189 |
+
<div class="w-full bg-purple-200 rounded-full h-2">
|
190 |
+
<div class="bg-purple-600 h-2 rounded-full" style="width: 60%"></div>
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
|
195 |
+
<!-- Benefits Section -->
|
196 |
+
<div class="bg-white rounded-2xl shadow-lg p-6">
|
197 |
+
<h3 class="text-xl font-semibold text-purple-700 mb-4">How This Helps Baby's IQ</h3>
|
198 |
+
<div class="space-y-4">
|
199 |
+
<div class="flex items-start">
|
200 |
+
<div class="bg-blue-100 p-2 rounded-lg mr-3">
|
201 |
+
<i class="fas fa-brain text-blue-600"></i>
|
202 |
+
</div>
|
203 |
+
<div>
|
204 |
+
<h4 class="font-medium text-gray-800">Cognitive Development</h4>
|
205 |
+
<p class="text-sm text-gray-600">Stimulates brain connections through interactive learning</p>
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
+
<div class="flex items-start">
|
209 |
+
<div class="bg-yellow-100 p-2 rounded-lg mr-3">
|
210 |
+
<i class="fas fa-comments text-yellow-600"></i>
|
211 |
+
</div>
|
212 |
+
<div>
|
213 |
+
<h4 class="font-medium text-gray-800">Language Skills</h4>
|
214 |
+
<p class="text-sm text-gray-600">Builds vocabulary and speech patterns early</p>
|
215 |
+
</div>
|
216 |
+
</div>
|
217 |
+
<div class="flex items-start">
|
218 |
+
<div class="bg-green-100 p-2 rounded-lg mr-3">
|
219 |
+
<i class="fas fa-lightbulb text-green-600"></i>
|
220 |
+
</div>
|
221 |
+
<div>
|
222 |
+
<h4 class="font-medium text-gray-800">Problem Solving</h4>
|
223 |
+
<p class="text-sm text-gray-600">Encourages cause-and-effect understanding</p>
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
</div>
|
227 |
+
</div>
|
228 |
+
|
229 |
+
<!-- Tips Section -->
|
230 |
+
<div class="bg-white rounded-2xl shadow-lg p-6 mt-6">
|
231 |
+
<h3 class="text-xl font-semibold text-purple-700 mb-4">Parent Tips</h3>
|
232 |
+
<div class="space-y-3">
|
233 |
+
<div class="flex items-start">
|
234 |
+
<div class="bg-purple-100 p-1 rounded-full mr-3 mt-1">
|
235 |
+
<i class="fas fa-check text-purple-600 text-xs"></i>
|
236 |
+
</div>
|
237 |
+
<p class="text-sm text-gray-600">Engage with your baby while using the activities</p>
|
238 |
+
</div>
|
239 |
+
<div class="flex items-start">
|
240 |
+
<div class="bg-purple-100 p-1 rounded-full mr-3 mt-1">
|
241 |
+
<i class="fas fa-check text-purple-600 text-xs"></i>
|
242 |
+
</div>
|
243 |
+
<p class="text-sm text-gray-600">Limit sessions to 10-15 minutes for best attention</p>
|
244 |
+
</div>
|
245 |
+
<div class="flex items-start">
|
246 |
+
<div class="bg-purple-100 p-1 rounded-full mr-3 mt-1">
|
247 |
+
<i class="fas fa-check text-purple-600 text-xs"></i>
|
248 |
+
</div>
|
249 |
+
<p class="text-sm text-gray-600">Repeat words and sounds to reinforce learning</p>
|
250 |
+
</div>
|
251 |
+
</div>
|
252 |
+
</div>
|
253 |
+
</div>
|
254 |
+
</main>
|
255 |
+
|
256 |
+
<!-- Footer -->
|
257 |
+
<footer class="mt-12 text-center text-gray-500 text-sm">
|
258 |
+
<p>© 2023 Baby Genius - Designed to nurture young minds</p>
|
259 |
+
<p class="mt-1">Recommended for babies 6 months to 3 years</p>
|
260 |
+
</footer>
|
261 |
+
</div>
|
262 |
+
|
263 |
+
<script>
|
264 |
+
// Baby phrases
|
265 |
+
const babyPhrases = [
|
266 |
+
"Hi baby! Can you say hi?",
|
267 |
+
"Look at the pretty colors!",
|
268 |
+
"What does the cow say? Moo!",
|
269 |
+
"1... 2... 3! Let's count!",
|
270 |
+
"Big smile! You're so smart!",
|
271 |
+
"Peek-a-boo! I see you!",
|
272 |
+
"Clap your hands! Yay!",
|
273 |
+
"Where's your nose? There it is!",
|
274 |
+
"The sun is yellow like a banana!",
|
275 |
+
"Let's sing a song! La la la!"
|
276 |
+
];
|
277 |
+
|
278 |
+
// Animal sounds
|
279 |
+
const animalSounds = {
|
280 |
+
cow: { phrase: "The cow says moo!", sound: "https://www.soundjay.com/mechanical/sounds/cow-moo-01.mp3" },
|
281 |
+
duck: { phrase: "The duck says quack!", sound: "https://www.soundjay.com/mechanical/sounds/duck-quacking-01.mp3" },
|
282 |
+
lion: { phrase: "The lion says roar!", sound: "https://www.soundjay.com/mechanical/sounds/lion-01.mp3" }
|
283 |
+
};
|
284 |
+
|
285 |
+
// Number phrases
|
286 |
+
const numberPhrases = [
|
287 |
+
"One little finger",
|
288 |
+
"Two little eyes",
|
289 |
+
"Three little ducks",
|
290 |
+
"Four wheels on the car",
|
291 |
+
"Five fingers on your hand"
|
292 |
+
];
|
293 |
+
|
294 |
+
// Color phrases
|
295 |
+
const colorPhrases = {
|
296 |
+
red: "Red like an apple!",
|
297 |
+
blue: "Blue like the sky!",
|
298 |
+
yellow: "Yellow like the sun!",
|
299 |
+
green: "Green like grass!"
|
300 |
+
};
|
301 |
+
|
302 |
+
// Shape phrases
|
303 |
+
const shapePhrases = {
|
304 |
+
circle: "Round and round like a circle!",
|
305 |
+
square: "Four equal sides make a square!",
|
306 |
+
triangle: "Three corners on a triangle!"
|
307 |
+
};
|
308 |
+
|
309 |
+
// Play random baby phrase
|
310 |
+
function playRandomPhrase() {
|
311 |
+
const randomIndex = Math.floor(Math.random() * babyPhrases.length);
|
312 |
+
const phrase = babyPhrases[randomIndex];
|
313 |
+
showSpeechBubble(phrase);
|
314 |
+
speak(phrase);
|
315 |
+
}
|
316 |
+
|
317 |
+
// Play animal sound
|
318 |
+
function playSound(animal) {
|
319 |
+
const animalData = animalSounds[animal];
|
320 |
+
showSpeechBubble(animalData.phrase);
|
321 |
+
|
322 |
+
const audio = new Audio(animalData.sound);
|
323 |
+
audio.play();
|
324 |
+
|
325 |
+
// Also speak the phrase
|
326 |
+
setTimeout(() => {
|
327 |
+
speak(animalData.phrase);
|
328 |
+
}, 2000);
|
329 |
+
}
|
330 |
+
|
331 |
+
// Play number
|
332 |
+
function playNumber(num) {
|
333 |
+
const phrase = numberPhrases[num - 1];
|
334 |
+
showSpeechBubble(phrase);
|
335 |
+
speak(phrase);
|
336 |
+
}
|
337 |
+
|
338 |
+
// Play color
|
339 |
+
function playColor(color) {
|
340 |
+
const phrase = colorPhrases[color];
|
341 |
+
showSpeechBubble(phrase);
|
342 |
+
speak(phrase);
|
343 |
+
}
|
344 |
+
|
345 |
+
// Play shape
|
346 |
+
function playShape(shape) {
|
347 |
+
const phrase = shapePhrases[shape];
|
348 |
+
showSpeechBubble(phrase);
|
349 |
+
speak(phrase);
|
350 |
+
}
|
351 |
+
|
352 |
+
// Show speech bubble
|
353 |
+
function showSpeechBubble(text) {
|
354 |
+
const bubble = document.getElementById('speechBubble');
|
355 |
+
const bubbleText = document.getElementById('bubbleText');
|
356 |
+
|
357 |
+
bubbleText.textContent = text;
|
358 |
+
bubble.classList.remove('hidden');
|
359 |
+
|
360 |
+
// Hide after 5 seconds
|
361 |
+
setTimeout(() => {
|
362 |
+
bubble.classList.add('hidden');
|
363 |
+
}, 5000);
|
364 |
+
}
|
365 |
+
|
366 |
+
// Text-to-speech function
|
367 |
+
function speak(text) {
|
368 |
+
if ('speechSynthesis' in window) {
|
369 |
+
const utterance = new SpeechSynthesisUtterance(text);
|
370 |
+
utterance.rate = 0.8; // Slower speed for babies
|
371 |
+
utterance.pitch = 1.2; // Higher pitch
|
372 |
+
window.speechSynthesis.speak(utterance);
|
373 |
+
} else {
|
374 |
+
console.log("Text-to-speech not supported");
|
375 |
+
}
|
376 |
+
}
|
377 |
+
|
378 |
+
// Initialize with a welcome message
|
379 |
+
window.onload = function() {
|
380 |
+
setTimeout(() => {
|
381 |
+
showSpeechBubble("Welcome to Baby Genius! Let's learn and play!");
|
382 |
+
speak("Welcome to Baby Genius! Let's learn and play!");
|
383 |
+
}, 1000);
|
384 |
+
};
|
385 |
+
</script>
|
386 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=yasserrmd/babygenius" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
387 |
+
</html>
|