Spaces:
Running
Running
Add 2 files
Browse files- README.md +6 -4
- index.html +1282 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: green
|
| 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: ai-avatar-v1-03
|
| 3 |
+
emoji: 🐳
|
| 4 |
colorFrom: green
|
| 5 |
+
colorTo: yellow
|
| 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,1282 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>AI Video Avatar - Your Digital Guide</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 |
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
|
| 11 |
+
|
| 12 |
+
:root {
|
| 13 |
+
--primary: #3b82f6;
|
| 14 |
+
--primary-dark: #2563eb;
|
| 15 |
+
--secondary: #f43f5e;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
body {
|
| 19 |
+
font-family: 'Poppins', sans-serif;
|
| 20 |
+
background: #0f172a;
|
| 21 |
+
color: white;
|
| 22 |
+
overflow: hidden;
|
| 23 |
+
height: 100vh;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.video-container {
|
| 27 |
+
position: fixed;
|
| 28 |
+
top: 0;
|
| 29 |
+
left: 0;
|
| 30 |
+
width: 100%;
|
| 31 |
+
height: 100%;
|
| 32 |
+
z-index: 0;
|
| 33 |
+
overflow: hidden;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.video-placeholder {
|
| 37 |
+
position: absolute;
|
| 38 |
+
top: 0;
|
| 39 |
+
left: 0;
|
| 40 |
+
width: 100%;
|
| 41 |
+
height: 100%;
|
| 42 |
+
object-fit: cover;
|
| 43 |
+
background-color: #1e293b;
|
| 44 |
+
display: flex;
|
| 45 |
+
align-items: center;
|
| 46 |
+
justify-content: center;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.video-placeholder img {
|
| 50 |
+
max-width: 100%;
|
| 51 |
+
max-height: 100%;
|
| 52 |
+
object-fit: contain;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.video-overlay {
|
| 56 |
+
position: absolute;
|
| 57 |
+
top: 0;
|
| 58 |
+
left: 0;
|
| 59 |
+
width: 100%;
|
| 60 |
+
height: 100%;
|
| 61 |
+
background: linear-gradient(to bottom, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.7) 100%);
|
| 62 |
+
z-index: 1;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.content-container {
|
| 66 |
+
position: relative;
|
| 67 |
+
z-index: 2;
|
| 68 |
+
height: 100vh;
|
| 69 |
+
display: flex;
|
| 70 |
+
flex-direction: column;
|
| 71 |
+
justify-content: flex-end;
|
| 72 |
+
padding-bottom: 120px;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.speech-bubble {
|
| 76 |
+
position: relative;
|
| 77 |
+
background: rgba(30, 41, 59, 0.9);
|
| 78 |
+
border-radius: 1rem;
|
| 79 |
+
animation: pulse 2s infinite;
|
| 80 |
+
max-width: 800px;
|
| 81 |
+
margin: 0 auto;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
.speech-bubble:after {
|
| 85 |
+
content: '';
|
| 86 |
+
position: absolute;
|
| 87 |
+
bottom: -10px;
|
| 88 |
+
left: 50px;
|
| 89 |
+
border-width: 10px 10px 0;
|
| 90 |
+
border-style: solid;
|
| 91 |
+
border-color: rgba(30, 41, 59, 0.9) transparent;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
@keyframes pulse {
|
| 95 |
+
0% {
|
| 96 |
+
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
|
| 97 |
+
}
|
| 98 |
+
70% {
|
| 99 |
+
box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
|
| 100 |
+
}
|
| 101 |
+
100% {
|
| 102 |
+
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.typing-indicator span {
|
| 107 |
+
display: inline-block;
|
| 108 |
+
width: 8px;
|
| 109 |
+
height: 8px;
|
| 110 |
+
border-radius: 50%;
|
| 111 |
+
background: white;
|
| 112 |
+
margin: 0 2px;
|
| 113 |
+
opacity: 0.4;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
.typing-indicator span:nth-child(1) {
|
| 117 |
+
animation: typing 1s infinite;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
.typing-indicator span:nth-child(2) {
|
| 121 |
+
animation: typing 1s infinite 0.2s;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.typing-indicator span:nth-child(3) {
|
| 125 |
+
animation: typing 1s infinite 0.4s;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
@keyframes typing {
|
| 129 |
+
0% {
|
| 130 |
+
opacity: 0.4;
|
| 131 |
+
transform: translateY(0);
|
| 132 |
+
}
|
| 133 |
+
50% {
|
| 134 |
+
opacity: 1;
|
| 135 |
+
transform: translateY(-5px);
|
| 136 |
+
}
|
| 137 |
+
100% {
|
| 138 |
+
opacity: 0.4;
|
| 139 |
+
transform: translateY(0);
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.lip-sync {
|
| 144 |
+
animation: lip-sync 0.5s infinite alternate;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
@keyframes lip-sync {
|
| 148 |
+
0% {
|
| 149 |
+
transform: scaleY(1);
|
| 150 |
+
}
|
| 151 |
+
100% {
|
| 152 |
+
transform: scaleY(0.8);
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
.news-card {
|
| 157 |
+
background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
|
| 158 |
+
backdrop-filter: blur(10px);
|
| 159 |
+
transition: all 0.3s ease;
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
.news-card:hover {
|
| 163 |
+
transform: translateY(-5px);
|
| 164 |
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
.social-icon {
|
| 168 |
+
transition: all 0.3s ease;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
.social-icon:hover {
|
| 172 |
+
transform: scale(1.2);
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
.upload-btn {
|
| 176 |
+
position: absolute;
|
| 177 |
+
top: 20px;
|
| 178 |
+
right: 20px;
|
| 179 |
+
z-index: 10;
|
| 180 |
+
background: rgba(30, 41, 59, 0.8);
|
| 181 |
+
border: 1px solid #3b82f6;
|
| 182 |
+
color: white;
|
| 183 |
+
padding: 8px 16px;
|
| 184 |
+
border-radius: 8px;
|
| 185 |
+
cursor: pointer;
|
| 186 |
+
transition: all 0.3s ease;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.upload-btn:hover {
|
| 190 |
+
background: rgba(59, 130, 246, 0.8);
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
#file-input {
|
| 194 |
+
display: none;
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
.upload-icon {
|
| 198 |
+
margin-right: 8px;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
.avatar-placeholder-text {
|
| 202 |
+
color: rgba(255, 255, 255, 0.5);
|
| 203 |
+
font-size: 1.2rem;
|
| 204 |
+
text-align: center;
|
| 205 |
+
padding: 20px;
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
/* Floating action button styles */
|
| 209 |
+
.fab-container {
|
| 210 |
+
position: fixed;
|
| 211 |
+
bottom: 30px;
|
| 212 |
+
right: 30px;
|
| 213 |
+
z-index: 100;
|
| 214 |
+
display: flex;
|
| 215 |
+
flex-direction: column;
|
| 216 |
+
align-items: flex-end;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.fab-main {
|
| 220 |
+
width: 60px;
|
| 221 |
+
height: 60px;
|
| 222 |
+
border-radius: 50%;
|
| 223 |
+
background: linear-gradient(135deg, #3b82f6, #2563eb);
|
| 224 |
+
color: white;
|
| 225 |
+
display: flex;
|
| 226 |
+
align-items: center;
|
| 227 |
+
justify-content: center;
|
| 228 |
+
font-size: 24px;
|
| 229 |
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
| 230 |
+
cursor: pointer;
|
| 231 |
+
transition: all 0.3s ease;
|
| 232 |
+
z-index: 101;
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
.fab-main:hover {
|
| 236 |
+
transform: scale(1.1);
|
| 237 |
+
box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
.fab-menu {
|
| 241 |
+
position: absolute;
|
| 242 |
+
bottom: 70px;
|
| 243 |
+
right: 0;
|
| 244 |
+
width: 300px;
|
| 245 |
+
background: rgba(30, 41, 59, 0.95);
|
| 246 |
+
border-radius: 16px;
|
| 247 |
+
padding: 20px;
|
| 248 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
| 249 |
+
transform: translateY(20px);
|
| 250 |
+
opacity: 0;
|
| 251 |
+
pointer-events: none;
|
| 252 |
+
transition: all 0.3s ease;
|
| 253 |
+
backdrop-filter: blur(10px);
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
.fab-menu.active {
|
| 257 |
+
transform: translateY(0);
|
| 258 |
+
opacity: 1;
|
| 259 |
+
pointer-events: all;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
.fab-menu-header {
|
| 263 |
+
display: flex;
|
| 264 |
+
justify-content: space-between;
|
| 265 |
+
align-items: center;
|
| 266 |
+
margin-bottom: 15px;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
.fab-menu-title {
|
| 270 |
+
font-weight: 600;
|
| 271 |
+
color: #3b82f6;
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
.fab-close-btn {
|
| 275 |
+
background: none;
|
| 276 |
+
border: none;
|
| 277 |
+
color: rgba(255, 255, 255, 0.5);
|
| 278 |
+
font-size: 20px;
|
| 279 |
+
cursor: pointer;
|
| 280 |
+
transition: all 0.2s ease;
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
.fab-close-btn:hover {
|
| 284 |
+
color: white;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
.fab-menu-content {
|
| 288 |
+
max-height: 400px;
|
| 289 |
+
overflow-y: auto;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
.fab-menu-tabs {
|
| 293 |
+
display: flex;
|
| 294 |
+
margin-bottom: 15px;
|
| 295 |
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
.fab-tab {
|
| 299 |
+
padding: 8px 16px;
|
| 300 |
+
cursor: pointer;
|
| 301 |
+
color: rgba(255, 255, 255, 0.6);
|
| 302 |
+
font-size: 14px;
|
| 303 |
+
transition: all 0.2s ease;
|
| 304 |
+
border-bottom: 2px solid transparent;
|
| 305 |
+
}
|
| 306 |
+
|
| 307 |
+
.fab-tab.active {
|
| 308 |
+
color: white;
|
| 309 |
+
border-bottom: 2px solid #3b82f6;
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
.fab-tab:hover {
|
| 313 |
+
color: white;
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
.fab-tab-content {
|
| 317 |
+
display: none;
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
.fab-tab-content.active {
|
| 321 |
+
display: block;
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
.fab-chat-input {
|
| 325 |
+
display: flex;
|
| 326 |
+
gap: 10px;
|
| 327 |
+
margin-top: 15px;
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
.fab-chat-input input {
|
| 331 |
+
flex: 1;
|
| 332 |
+
background: rgba(15, 23, 42, 0.7);
|
| 333 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 334 |
+
border-radius: 8px;
|
| 335 |
+
padding: 10px 15px;
|
| 336 |
+
color: white;
|
| 337 |
+
outline: none;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
.fab-chat-input button {
|
| 341 |
+
background: #3b82f6;
|
| 342 |
+
color: white;
|
| 343 |
+
border: none;
|
| 344 |
+
border-radius: 8px;
|
| 345 |
+
padding: 0 15px;
|
| 346 |
+
cursor: pointer;
|
| 347 |
+
transition: all 0.2s ease;
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
.fab-chat-input button:hover {
|
| 351 |
+
background: #2563eb;
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
/* TTS Button Styles */
|
| 355 |
+
.tts-container {
|
| 356 |
+
position: fixed;
|
| 357 |
+
bottom: 30px;
|
| 358 |
+
right: 100px;
|
| 359 |
+
z-index: 100;
|
| 360 |
+
display: flex;
|
| 361 |
+
flex-direction: column;
|
| 362 |
+
align-items: flex-end;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
.tts-button {
|
| 366 |
+
width: 60px;
|
| 367 |
+
height: 60px;
|
| 368 |
+
border-radius: 50%;
|
| 369 |
+
background: linear-gradient(135deg, #f43f5e, #e11d48);
|
| 370 |
+
color: white;
|
| 371 |
+
display: flex;
|
| 372 |
+
align-items: center;
|
| 373 |
+
justify-content: center;
|
| 374 |
+
font-size: 24px;
|
| 375 |
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
| 376 |
+
cursor: pointer;
|
| 377 |
+
transition: all 0.3s ease;
|
| 378 |
+
z-index: 101;
|
| 379 |
+
border: none;
|
| 380 |
+
outline: none;
|
| 381 |
+
}
|
| 382 |
+
|
| 383 |
+
.tts-button:hover {
|
| 384 |
+
transform: scale(1.1);
|
| 385 |
+
box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
.tts-button.listening {
|
| 389 |
+
animation: pulse-red 1.5s infinite;
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
.tts-panel {
|
| 393 |
+
position: absolute;
|
| 394 |
+
bottom: 70px;
|
| 395 |
+
right: 0;
|
| 396 |
+
width: 300px;
|
| 397 |
+
background: rgba(30, 41, 59, 0.95);
|
| 398 |
+
border-radius: 16px;
|
| 399 |
+
padding: 20px;
|
| 400 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
| 401 |
+
transform: translateY(20px);
|
| 402 |
+
opacity: 0;
|
| 403 |
+
pointer-events: none;
|
| 404 |
+
transition: all 0.3s ease;
|
| 405 |
+
backdrop-filter: blur(10px);
|
| 406 |
+
}
|
| 407 |
+
|
| 408 |
+
.tts-panel.active {
|
| 409 |
+
transform: translateY(0);
|
| 410 |
+
opacity: 1;
|
| 411 |
+
pointer-events: all;
|
| 412 |
+
}
|
| 413 |
+
|
| 414 |
+
.tts-header {
|
| 415 |
+
display: flex;
|
| 416 |
+
justify-content: space-between;
|
| 417 |
+
align-items: center;
|
| 418 |
+
margin-bottom: 15px;
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
.tts-title {
|
| 422 |
+
font-weight: 600;
|
| 423 |
+
color: #f43f5e;
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
.tts-close-btn {
|
| 427 |
+
background: none;
|
| 428 |
+
border: none;
|
| 429 |
+
color: rgba(255, 255, 255, 0.5);
|
| 430 |
+
font-size: 20px;
|
| 431 |
+
cursor: pointer;
|
| 432 |
+
transition: all 0.2s ease;
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
.tts-close-btn:hover {
|
| 436 |
+
color: white;
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
.tts-content {
|
| 440 |
+
max-height: 300px;
|
| 441 |
+
overflow-y: auto;
|
| 442 |
+
margin-bottom: 15px;
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
+
.tts-status {
|
| 446 |
+
font-size: 14px;
|
| 447 |
+
color: rgba(255, 255, 255, 0.7);
|
| 448 |
+
margin-bottom: 10px;
|
| 449 |
+
text-align: center;
|
| 450 |
+
}
|
| 451 |
+
|
| 452 |
+
.tts-transcript {
|
| 453 |
+
background: rgba(15, 23, 42, 0.7);
|
| 454 |
+
border-radius: 8px;
|
| 455 |
+
padding: 10px;
|
| 456 |
+
min-height: 60px;
|
| 457 |
+
margin-bottom: 15px;
|
| 458 |
+
}
|
| 459 |
+
|
| 460 |
+
.tts-controls {
|
| 461 |
+
display: flex;
|
| 462 |
+
justify-content: center;
|
| 463 |
+
gap: 10px;
|
| 464 |
+
}
|
| 465 |
+
|
| 466 |
+
.tts-controls button {
|
| 467 |
+
background: #f43f5e;
|
| 468 |
+
color: white;
|
| 469 |
+
border: none;
|
| 470 |
+
border-radius: 8px;
|
| 471 |
+
padding: 8px 15px;
|
| 472 |
+
cursor: pointer;
|
| 473 |
+
transition: all 0.2s ease;
|
| 474 |
+
display: flex;
|
| 475 |
+
align-items: center;
|
| 476 |
+
gap: 5px;
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
.tts-controls button:hover {
|
| 480 |
+
background: #e11d48;
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
.tts-controls button.secondary {
|
| 484 |
+
background: rgba(255, 255, 255, 0.1);
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
.tts-controls button.secondary:hover {
|
| 488 |
+
background: rgba(255, 255, 255, 0.2);
|
| 489 |
+
}
|
| 490 |
+
|
| 491 |
+
@keyframes pulse-red {
|
| 492 |
+
0% {
|
| 493 |
+
box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
|
| 494 |
+
}
|
| 495 |
+
70% {
|
| 496 |
+
box-shadow: 0 0 0 10px rgba(244, 63, 94, 0);
|
| 497 |
+
}
|
| 498 |
+
100% {
|
| 499 |
+
box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
|
| 500 |
+
}
|
| 501 |
+
}
|
| 502 |
+
|
| 503 |
+
/* Telegram Feed Styles */
|
| 504 |
+
.telegram-container {
|
| 505 |
+
position: fixed;
|
| 506 |
+
bottom: 30px;
|
| 507 |
+
left: 30px;
|
| 508 |
+
z-index: 100;
|
| 509 |
+
display: flex;
|
| 510 |
+
flex-direction: column;
|
| 511 |
+
align-items: flex-start;
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
.telegram-button {
|
| 515 |
+
width: 60px;
|
| 516 |
+
height: 60px;
|
| 517 |
+
border-radius: 50%;
|
| 518 |
+
background: linear-gradient(135deg, #0088cc, #0077b5);
|
| 519 |
+
color: white;
|
| 520 |
+
display: flex;
|
| 521 |
+
align-items: center;
|
| 522 |
+
justify-content: center;
|
| 523 |
+
font-size: 24px;
|
| 524 |
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
| 525 |
+
cursor: pointer;
|
| 526 |
+
transition: all 0.3s ease;
|
| 527 |
+
z-index: 101;
|
| 528 |
+
}
|
| 529 |
+
|
| 530 |
+
.telegram-button:hover {
|
| 531 |
+
transform: scale(1.1);
|
| 532 |
+
box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
|
| 533 |
+
}
|
| 534 |
+
|
| 535 |
+
.telegram-panel {
|
| 536 |
+
position: absolute;
|
| 537 |
+
bottom: 70px;
|
| 538 |
+
left: 0;
|
| 539 |
+
width: 350px;
|
| 540 |
+
max-height: 500px;
|
| 541 |
+
background: rgba(30, 41, 59, 0.95);
|
| 542 |
+
border-radius: 16px;
|
| 543 |
+
padding: 20px;
|
| 544 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
| 545 |
+
transform: translateY(20px);
|
| 546 |
+
opacity: 0;
|
| 547 |
+
pointer-events: none;
|
| 548 |
+
transition: all 0.3s ease;
|
| 549 |
+
backdrop-filter: blur(10px);
|
| 550 |
+
display: flex;
|
| 551 |
+
flex-direction: column;
|
| 552 |
+
}
|
| 553 |
+
|
| 554 |
+
.telegram-panel.active {
|
| 555 |
+
transform: translateY(0);
|
| 556 |
+
opacity: 1;
|
| 557 |
+
pointer-events: all;
|
| 558 |
+
}
|
| 559 |
+
|
| 560 |
+
.telegram-header {
|
| 561 |
+
display: flex;
|
| 562 |
+
justify-content: space-between;
|
| 563 |
+
align-items: center;
|
| 564 |
+
margin-bottom: 15px;
|
| 565 |
+
}
|
| 566 |
+
|
| 567 |
+
.telegram-title {
|
| 568 |
+
font-weight: 600;
|
| 569 |
+
color: #0088cc;
|
| 570 |
+
display: flex;
|
| 571 |
+
align-items: center;
|
| 572 |
+
gap: 8px;
|
| 573 |
+
}
|
| 574 |
+
|
| 575 |
+
.telegram-close-btn {
|
| 576 |
+
background: none;
|
| 577 |
+
border: none;
|
| 578 |
+
color: rgba(255, 255, 255, 0.5);
|
| 579 |
+
font-size: 20px;
|
| 580 |
+
cursor: pointer;
|
| 581 |
+
transition: all 0.2s ease;
|
| 582 |
+
}
|
| 583 |
+
|
| 584 |
+
.telegram-close-btn:hover {
|
| 585 |
+
color: white;
|
| 586 |
+
}
|
| 587 |
+
|
| 588 |
+
.telegram-content {
|
| 589 |
+
flex: 1;
|
| 590 |
+
overflow-y: auto;
|
| 591 |
+
margin-bottom: 15px;
|
| 592 |
+
}
|
| 593 |
+
|
| 594 |
+
.telegram-post {
|
| 595 |
+
background: rgba(15, 23, 42, 0.7);
|
| 596 |
+
border-radius: 12px;
|
| 597 |
+
padding: 15px;
|
| 598 |
+
margin-bottom: 15px;
|
| 599 |
+
transition: all 0.3s ease;
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
.telegram-post:hover {
|
| 603 |
+
transform: translateY(-2px);
|
| 604 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
| 605 |
+
}
|
| 606 |
+
|
| 607 |
+
.telegram-post-header {
|
| 608 |
+
display: flex;
|
| 609 |
+
align-items: center;
|
| 610 |
+
margin-bottom: 10px;
|
| 611 |
+
}
|
| 612 |
+
|
| 613 |
+
.telegram-post-avatar {
|
| 614 |
+
width: 40px;
|
| 615 |
+
height: 40px;
|
| 616 |
+
border-radius: 50%;
|
| 617 |
+
background-color: #0088cc;
|
| 618 |
+
display: flex;
|
| 619 |
+
align-items: center;
|
| 620 |
+
justify-content: center;
|
| 621 |
+
margin-right: 10px;
|
| 622 |
+
}
|
| 623 |
+
|
| 624 |
+
.telegram-post-author {
|
| 625 |
+
font-weight: 600;
|
| 626 |
+
color: #0088cc;
|
| 627 |
+
}
|
| 628 |
+
|
| 629 |
+
.telegram-post-date {
|
| 630 |
+
font-size: 12px;
|
| 631 |
+
color: rgba(255, 255, 255, 0.5);
|
| 632 |
+
margin-left: auto;
|
| 633 |
+
}
|
| 634 |
+
|
| 635 |
+
.telegram-post-text {
|
| 636 |
+
margin-bottom: 10px;
|
| 637 |
+
line-height: 1.5;
|
| 638 |
+
}
|
| 639 |
+
|
| 640 |
+
.telegram-post-image {
|
| 641 |
+
width: 100%;
|
| 642 |
+
border-radius: 8px;
|
| 643 |
+
margin-bottom: 10px;
|
| 644 |
+
}
|
| 645 |
+
|
| 646 |
+
.telegram-footer {
|
| 647 |
+
display: flex;
|
| 648 |
+
justify-content: center;
|
| 649 |
+
}
|
| 650 |
+
|
| 651 |
+
.telegram-view-all {
|
| 652 |
+
background: rgba(0, 136, 204, 0.2);
|
| 653 |
+
color: #0088cc;
|
| 654 |
+
border: none;
|
| 655 |
+
border-radius: 8px;
|
| 656 |
+
padding: 8px 15px;
|
| 657 |
+
cursor: pointer;
|
| 658 |
+
transition: all 0.2s ease;
|
| 659 |
+
font-size: 14px;
|
| 660 |
+
}
|
| 661 |
+
|
| 662 |
+
.telegram-view-all:hover {
|
| 663 |
+
background: rgba(0, 136, 204, 0.3);
|
| 664 |
+
}
|
| 665 |
+
|
| 666 |
+
/* Scrollbar styling */
|
| 667 |
+
::-webkit-scrollbar {
|
| 668 |
+
width: 6px;
|
| 669 |
+
}
|
| 670 |
+
|
| 671 |
+
::-webkit-scrollbar-track {
|
| 672 |
+
background: rgba(255, 255, 255, 0.05);
|
| 673 |
+
border-radius: 3px;
|
| 674 |
+
}
|
| 675 |
+
|
| 676 |
+
::-webkit-scrollbar-thumb {
|
| 677 |
+
background: rgba(255, 255, 255, 0.2);
|
| 678 |
+
border-radius: 3px;
|
| 679 |
+
}
|
| 680 |
+
|
| 681 |
+
::-webkit-scrollbar-thumb:hover {
|
| 682 |
+
background: rgba(255, 255, 255, 0.3);
|
| 683 |
+
}
|
| 684 |
+
</style>
|
| 685 |
+
</head>
|
| 686 |
+
<body>
|
| 687 |
+
<!-- Video Avatar Container -->
|
| 688 |
+
<div class="video-container">
|
| 689 |
+
<div class="video-placeholder" id="video-placeholder">
|
| 690 |
+
<div class="avatar-placeholder-text">
|
| 691 |
+
<i class="fas fa-user-circle text-6xl mb-4"></i>
|
| 692 |
+
<p>Upload an image to create your AI video avatar</p>
|
| 693 |
+
</div>
|
| 694 |
+
</div>
|
| 695 |
+
<div class="video-overlay"></div>
|
| 696 |
+
</div>
|
| 697 |
+
|
| 698 |
+
<!-- Upload Button -->
|
| 699 |
+
<button class="upload-btn" onclick="document.getElementById('file-input').click()">
|
| 700 |
+
<i class="fas fa-upload upload-icon"></i>
|
| 701 |
+
Upload Avatar Image
|
| 702 |
+
</button>
|
| 703 |
+
<input type="file" id="file-input" accept="image/*">
|
| 704 |
+
|
| 705 |
+
<!-- Content Container -->
|
| 706 |
+
<div class="content-container">
|
| 707 |
+
<!-- Speech Bubble -->
|
| 708 |
+
<div class="speech-bubble p-6 mb-6 mx-4 relative">
|
| 709 |
+
<div id="avatar-message" class="text-lg">
|
| 710 |
+
Hello there! I'm your AI Avatar. Upload an image to create your personalized video avatar.
|
| 711 |
+
</div>
|
| 712 |
+
<div id="typing-indicator" class="typing-indicator hidden mt-2">
|
| 713 |
+
<span></span>
|
| 714 |
+
<span></span>
|
| 715 |
+
<span></span>
|
| 716 |
+
</div>
|
| 717 |
+
</div>
|
| 718 |
+
|
| 719 |
+
<!-- Social Media & Controls -->
|
| 720 |
+
<div class="flex justify-center gap-6 mt-8">
|
| 721 |
+
<a href="https://t.me/SMPlusBot" target="_blank" class="social-icon text-blue-400 hover:text-blue-300 text-2xl">
|
| 722 |
+
<i class="fab fa-telegram"></i>
|
| 723 |
+
</a>
|
| 724 |
+
<button onclick="toggleFullscreen()" class="social-icon text-white hover:text-gray-300 text-2xl">
|
| 725 |
+
<i class="fas fa-expand"></i>
|
| 726 |
+
</button>
|
| 727 |
+
<button onclick="toggleMute()" class="social-icon text-white hover:text-gray-300 text-2xl">
|
| 728 |
+
<i id="mute-icon" class="fas fa-volume-up"></i>
|
| 729 |
+
</button>
|
| 730 |
+
</div>
|
| 731 |
+
</div>
|
| 732 |
+
|
| 733 |
+
<!-- Telegram Feed Panel -->
|
| 734 |
+
<div class="telegram-container">
|
| 735 |
+
<div class="telegram-panel" id="telegram-panel">
|
| 736 |
+
<div class="telegram-header">
|
| 737 |
+
<div class="telegram-title">
|
| 738 |
+
<i class="fab fa-telegram"></i> Telegram Feed
|
| 739 |
+
</div>
|
| 740 |
+
<button class="telegram-close-btn" onclick="toggleTelegramPanel()">
|
| 741 |
+
<i class="fas fa-times"></i>
|
| 742 |
+
</button>
|
| 743 |
+
</div>
|
| 744 |
+
|
| 745 |
+
<div class="telegram-content" id="telegram-content">
|
| 746 |
+
<!-- Telegram posts will be loaded here -->
|
| 747 |
+
<div class="text-center py-10 text-gray-400">
|
| 748 |
+
<i class="fas fa-spinner fa-spin text-2xl mb-2"></i>
|
| 749 |
+
<p>Loading Telegram feed...</p>
|
| 750 |
+
</div>
|
| 751 |
+
</div>
|
| 752 |
+
|
| 753 |
+
<div class="telegram-footer">
|
| 754 |
+
<button class="telegram-view-all" onclick="window.open('https://t.me/SMPlusBot', '_blank')">
|
| 755 |
+
View on Telegram
|
| 756 |
+
</button>
|
| 757 |
+
</div>
|
| 758 |
+
</div>
|
| 759 |
+
|
| 760 |
+
<button class="telegram-button" onclick="toggleTelegramPanel()">
|
| 761 |
+
<i class="fab fa-telegram"></i>
|
| 762 |
+
</button>
|
| 763 |
+
</div>
|
| 764 |
+
|
| 765 |
+
<!-- TTS (Voice Input) Button -->
|
| 766 |
+
<div class="tts-container">
|
| 767 |
+
<div class="tts-panel" id="tts-panel">
|
| 768 |
+
<div class="tts-header">
|
| 769 |
+
<div class="tts-title">Voice Command</div>
|
| 770 |
+
<button class="tts-close-btn" onclick="toggleTtsPanel()">
|
| 771 |
+
<i class="fas fa-times"></i>
|
| 772 |
+
</button>
|
| 773 |
+
</div>
|
| 774 |
+
|
| 775 |
+
<div class="tts-content">
|
| 776 |
+
<div class="tts-status" id="tts-status">
|
| 777 |
+
Click the microphone to start speaking
|
| 778 |
+
</div>
|
| 779 |
+
<div class="tts-transcript" id="tts-transcript">
|
| 780 |
+
Your voice input will appear here...
|
| 781 |
+
</div>
|
| 782 |
+
</div>
|
| 783 |
+
|
| 784 |
+
<div class="tts-controls">
|
| 785 |
+
<button id="tts-start-btn" onclick="startVoiceRecognition()">
|
| 786 |
+
<i class="fas fa-microphone"></i> Start
|
| 787 |
+
</button>
|
| 788 |
+
<button class="secondary" onclick="clearTranscript()">
|
| 789 |
+
<i class="fas fa-trash"></i> Clear
|
| 790 |
+
</button>
|
| 791 |
+
<button class="secondary" onclick="submitVoiceCommand()">
|
| 792 |
+
<i class="fas fa-paper-plane"></i> Send
|
| 793 |
+
</button>
|
| 794 |
+
</div>
|
| 795 |
+
</div>
|
| 796 |
+
|
| 797 |
+
<button class="tts-button" id="tts-button" onclick="toggleTtsPanel()">
|
| 798 |
+
<img src="https://cdn-icons-png.flaticon.com/512/4712/4712139.png" width="30" height="30" alt="Voice Assistant">
|
| 799 |
+
</button>
|
| 800 |
+
</div>
|
| 801 |
+
|
| 802 |
+
<!-- Floating Action Button -->
|
| 803 |
+
<div class="fab-container">
|
| 804 |
+
<div class="fab-menu" id="fab-menu">
|
| 805 |
+
<div class="fab-menu-header">
|
| 806 |
+
<div class="fab-menu-title">AI Assistant</div>
|
| 807 |
+
<button class="fab-close-btn" onclick="toggleFabMenu()">
|
| 808 |
+
<i class="fas fa-times"></i>
|
| 809 |
+
</button>
|
| 810 |
+
</div>
|
| 811 |
+
|
| 812 |
+
<div class="fab-menu-tabs">
|
| 813 |
+
<div class="fab-tab active" onclick="switchTab('topics')">Topics</div>
|
| 814 |
+
<div class="fab-tab" onclick="switchTab('chat')">Chat</div>
|
| 815 |
+
</div>
|
| 816 |
+
|
| 817 |
+
<div class="fab-menu-content">
|
| 818 |
+
<div class="fab-tab-content active" id="topics-tab">
|
| 819 |
+
<div class="grid grid-cols-1 gap-3">
|
| 820 |
+
<div class="news-card p-4 rounded-xl cursor-pointer" onclick="selectTopic('technology')">
|
| 821 |
+
<h3 class="font-bold text-blue-300">Tech Updates</h3>
|
| 822 |
+
<p class="text-sm">Latest in AI and gadgets</p>
|
| 823 |
+
</div>
|
| 824 |
+
<div class="news-card p-4 rounded-xl cursor-pointer" onclick="selectTopic('entertainment')">
|
| 825 |
+
<h3 class="font-bold text-pink-300">Entertainment</h3>
|
| 826 |
+
<p class="text-sm">Movies, music and celebrity news</p>
|
| 827 |
+
</div>
|
| 828 |
+
</div>
|
| 829 |
+
</div>
|
| 830 |
+
|
| 831 |
+
<div class="fab-tab-content" id="chat-tab">
|
| 832 |
+
<div class="text-center text-gray-400 py-4">
|
| 833 |
+
Ask me anything about technology, entertainment, or current events
|
| 834 |
+
</div>
|
| 835 |
+
<div class="fab-chat-input">
|
| 836 |
+
<input type="text" id="fab-user-input" placeholder="Type your message...">
|
| 837 |
+
<button onclick="sendMessageFromFab()">
|
| 838 |
+
<i class="fas fa-paper-plane"></i>
|
| 839 |
+
</button>
|
| 840 |
+
</div>
|
| 841 |
+
</div>
|
| 842 |
+
</div>
|
| 843 |
+
</div>
|
| 844 |
+
|
| 845 |
+
<div class="fab-main" onclick="toggleFabMenu()">
|
| 846 |
+
<i class="fas fa-comment-dots"></i>
|
| 847 |
+
</div>
|
| 848 |
+
</div>
|
| 849 |
+
|
| 850 |
+
<script>
|
| 851 |
+
// Speech Synthesis
|
| 852 |
+
const synth = window.speechSynthesis;
|
| 853 |
+
let isSpeaking = false;
|
| 854 |
+
let isMuted = false;
|
| 855 |
+
|
| 856 |
+
// Voice recognition
|
| 857 |
+
let recognition;
|
| 858 |
+
let isListening = false;
|
| 859 |
+
let finalTranscript = '';
|
| 860 |
+
|
| 861 |
+
// Telegram API token
|
| 862 |
+
const TELEGRAM_BOT_TOKEN = '5908509381:AAFzbvZC0YXuxkCA_qGjlc9NyjeYCtXHs-8';
|
| 863 |
+
|
| 864 |
+
// Sample knowledge base
|
| 865 |
+
const knowledgeBase = {
|
| 866 |
+
technology: [
|
| 867 |
+
"The latest AI models can now generate realistic video from text prompts. This could revolutionize content creation.",
|
| 868 |
+
"Quantum computing is making progress with several companies announcing breakthroughs in qubit stability.",
|
| 869 |
+
"The metaverse continues to evolve with new VR headsets offering higher resolution and better motion tracking."
|
| 870 |
+
],
|
| 871 |
+
entertainment: [
|
| 872 |
+
"The summer blockbuster season is heating up with several highly anticipated movies releasing this month.",
|
| 873 |
+
"Streaming platforms are investing heavily in original content, with over 500 new shows announced this year.",
|
| 874 |
+
"Music festivals are returning in full force after the pandemic, with record ticket sales reported."
|
| 875 |
+
],
|
| 876 |
+
default: [
|
| 877 |
+
"I'm here to help you stay informed about the latest trends and news.",
|
| 878 |
+
"Did you know I can summarize complex topics into easy-to-understand explanations?",
|
| 879 |
+
"Feel free to ask me about technology, entertainment, or current events."
|
| 880 |
+
]
|
| 881 |
+
};
|
| 882 |
+
|
| 883 |
+
// Initialize
|
| 884 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 885 |
+
// Start with a greeting
|
| 886 |
+
setTimeout(() => {
|
| 887 |
+
speak("Hello there! I'm your AI guide. Upload an image to create your personalized video avatar.");
|
| 888 |
+
}, 1000);
|
| 889 |
+
|
| 890 |
+
// Set up image upload
|
| 891 |
+
document.getElementById('file-input').addEventListener('change', handleImageUpload);
|
| 892 |
+
|
| 893 |
+
// Set up keyboard events for fab input
|
| 894 |
+
document.getElementById('fab-user-input').addEventListener('keypress', (e) => {
|
| 895 |
+
if (e.key === 'Enter') {
|
| 896 |
+
sendMessageFromFab();
|
| 897 |
+
}
|
| 898 |
+
});
|
| 899 |
+
|
| 900 |
+
// Initialize voice recognition
|
| 901 |
+
initVoiceRecognition();
|
| 902 |
+
|
| 903 |
+
// Load Telegram feed
|
| 904 |
+
loadTelegramFeed();
|
| 905 |
+
});
|
| 906 |
+
|
| 907 |
+
// Handle image upload
|
| 908 |
+
function handleImageUpload(event) {
|
| 909 |
+
const file = event.target.files[0];
|
| 910 |
+
if (!file) return;
|
| 911 |
+
|
| 912 |
+
const reader = new FileReader();
|
| 913 |
+
reader.onload = function(e) {
|
| 914 |
+
const placeholder = document.getElementById('video-placeholder');
|
| 915 |
+
placeholder.innerHTML = '';
|
| 916 |
+
|
| 917 |
+
const img = document.createElement('img');
|
| 918 |
+
img.src = e.target.result;
|
| 919 |
+
img.alt = 'AI Avatar';
|
| 920 |
+
placeholder.appendChild(img);
|
| 921 |
+
|
| 922 |
+
// Simulate video processing
|
| 923 |
+
setTimeout(() => {
|
| 924 |
+
speak("Thank you! Your AI video avatar is being processed. In a real implementation, this would generate a lifelike talking avatar from your image.");
|
| 925 |
+
}, 1000);
|
| 926 |
+
};
|
| 927 |
+
reader.readAsDataURL(file);
|
| 928 |
+
}
|
| 929 |
+
|
| 930 |
+
// Speech function
|
| 931 |
+
function speak(text) {
|
| 932 |
+
if (isMuted) return;
|
| 933 |
+
|
| 934 |
+
const utterance = new SpeechSynthesisUtterance(text);
|
| 935 |
+
utterance.voice = synth.getVoices().find(voice => voice.name.includes('English'));
|
| 936 |
+
utterance.pitch = 1;
|
| 937 |
+
utterance.rate = 1;
|
| 938 |
+
utterance.volume = 1;
|
| 939 |
+
|
| 940 |
+
isSpeaking = true;
|
| 941 |
+
synth.speak(utterance);
|
| 942 |
+
|
| 943 |
+
utterance.onend = () => {
|
| 944 |
+
isSpeaking = false;
|
| 945 |
+
};
|
| 946 |
+
|
| 947 |
+
// Display message
|
| 948 |
+
document.getElementById('avatar-message').textContent = text;
|
| 949 |
+
}
|
| 950 |
+
|
| 951 |
+
// Process user input
|
| 952 |
+
function sendMessage() {
|
| 953 |
+
const input = document.getElementById('user-input');
|
| 954 |
+
const message = input.value.trim();
|
| 955 |
+
|
| 956 |
+
if (message) {
|
| 957 |
+
// Show user message temporarily
|
| 958 |
+
document.getElementById('avatar-message').textContent = `You: ${message}`;
|
| 959 |
+
input.value = '';
|
| 960 |
+
|
| 961 |
+
// Show typing indicator
|
| 962 |
+
document.getElementById('typing-indicator').classList.remove('hidden');
|
| 963 |
+
|
| 964 |
+
// Process after delay
|
| 965 |
+
setTimeout(() => {
|
| 966 |
+
document.getElementById('typing-indicator').classList.add('hidden');
|
| 967 |
+
respondToMessage(message);
|
| 968 |
+
}, 1500);
|
| 969 |
+
}
|
| 970 |
+
}
|
| 971 |
+
|
| 972 |
+
// Process user input from FAB
|
| 973 |
+
function sendMessageFromFab() {
|
| 974 |
+
const input = document.getElementById('fab-user-input');
|
| 975 |
+
const message = input.value.trim();
|
| 976 |
+
|
| 977 |
+
if (message) {
|
| 978 |
+
// Show user message temporarily
|
| 979 |
+
document.getElementById('avatar-message').textContent = `You: ${message}`;
|
| 980 |
+
input.value = '';
|
| 981 |
+
|
| 982 |
+
// Show typing indicator
|
| 983 |
+
document.getElementById('typing-indicator').classList.remove('hidden');
|
| 984 |
+
|
| 985 |
+
// Process after delay
|
| 986 |
+
setTimeout(() => {
|
| 987 |
+
document.getElementById('typing-indicator').classList.add('hidden');
|
| 988 |
+
respondToMessage(message);
|
| 989 |
+
}, 1500);
|
| 990 |
+
}
|
| 991 |
+
}
|
| 992 |
+
|
| 993 |
+
// AI response logic
|
| 994 |
+
function respondToMessage(message) {
|
| 995 |
+
let response = "";
|
| 996 |
+
const lowerMsg = message.toLowerCase();
|
| 997 |
+
|
| 998 |
+
if (lowerMsg.includes('tech') || lowerMsg.includes('technology')) {
|
| 999 |
+
const techResponses = knowledgeBase.technology;
|
| 1000 |
+
response = techResponses[Math.floor(Math.random() * techResponses.length)];
|
| 1001 |
+
}
|
| 1002 |
+
else if (lowerMsg.includes('movie') || lowerMsg.includes('music') || lowerMsg.includes('entertainment')) {
|
| 1003 |
+
const entResponses = knowledgeBase.entertainment;
|
| 1004 |
+
response = entResponses[Math.floor(Math.random() * entResponses.length)];
|
| 1005 |
+
}
|
| 1006 |
+
else if (lowerMsg.includes('hello') || lowerMsg.includes('hi')) {
|
| 1007 |
+
response = "Hello! It's great to connect with you. How can I assist you today?";
|
| 1008 |
+
}
|
| 1009 |
+
else if (lowerMsg.includes('how are you')) {
|
| 1010 |
+
response = "I'm an AI, so I don't have feelings, but I'm functioning optimally and ready to help you!";
|
| 1011 |
+
}
|
| 1012 |
+
else {
|
| 1013 |
+
const defaultResponses = knowledgeBase.default;
|
| 1014 |
+
response = defaultResponses[Math.floor(Math.random() * defaultResponses.length)];
|
| 1015 |
+
}
|
| 1016 |
+
|
| 1017 |
+
speak(response);
|
| 1018 |
+
}
|
| 1019 |
+
|
| 1020 |
+
// Topic selection
|
| 1021 |
+
function selectTopic(topic) {
|
| 1022 |
+
const message = `Tell me about ${topic}`;
|
| 1023 |
+
document.getElementById('avatar-message').textContent = `You: ${message}`;
|
| 1024 |
+
|
| 1025 |
+
// Show typing indicator
|
| 1026 |
+
document.getElementById('typing-indicator').classList.remove('hidden');
|
| 1027 |
+
|
| 1028 |
+
// Process after delay
|
| 1029 |
+
setTimeout(() => {
|
| 1030 |
+
document.getElementById('typing-indicator').classList.add('hidden');
|
| 1031 |
+
respondToMessage(message);
|
| 1032 |
+
}, 1500);
|
| 1033 |
+
|
| 1034 |
+
// Close the menu
|
| 1035 |
+
toggleFabMenu();
|
| 1036 |
+
}
|
| 1037 |
+
|
| 1038 |
+
// Fullscreen toggle
|
| 1039 |
+
function toggleFullscreen() {
|
| 1040 |
+
if (!document.fullscreenElement) {
|
| 1041 |
+
document.documentElement.requestFullscreen();
|
| 1042 |
+
} else {
|
| 1043 |
+
if (document.exitFullscreen) {
|
| 1044 |
+
document.exitFullscreen();
|
| 1045 |
+
}
|
| 1046 |
+
}
|
| 1047 |
+
}
|
| 1048 |
+
|
| 1049 |
+
// Mute toggle
|
| 1050 |
+
function toggleMute() {
|
| 1051 |
+
isMuted = !isMuted;
|
| 1052 |
+
const icon = document.getElementById('mute-icon');
|
| 1053 |
+
|
| 1054 |
+
if (isMuted) {
|
| 1055 |
+
icon.classList.remove('fa-volume-up');
|
| 1056 |
+
icon.classList.add('fa-volume-mute');
|
| 1057 |
+
synth.cancel();
|
| 1058 |
+
} else {
|
| 1059 |
+
icon.classList.remove('fa-volume-mute');
|
| 1060 |
+
icon.classList.add('fa-volume-up');
|
| 1061 |
+
}
|
| 1062 |
+
}
|
| 1063 |
+
|
| 1064 |
+
// Toggle FAB menu
|
| 1065 |
+
function toggleFabMenu() {
|
| 1066 |
+
const menu = document.getElementById('fab-menu');
|
| 1067 |
+
menu.classList.toggle('active');
|
| 1068 |
+
|
| 1069 |
+
// Close other panels if open
|
| 1070 |
+
document.getElementById('telegram-panel').classList.remove('active');
|
| 1071 |
+
document.getElementById('tts-panel').classList.remove('active');
|
| 1072 |
+
}
|
| 1073 |
+
|
| 1074 |
+
// Switch between tabs in FAB menu
|
| 1075 |
+
function switchTab(tabName) {
|
| 1076 |
+
// Update active tab
|
| 1077 |
+
document.querySelectorAll('.fab-tab').forEach(tab => {
|
| 1078 |
+
tab.classList.remove('active');
|
| 1079 |
+
});
|
| 1080 |
+
event.target.classList.add('active');
|
| 1081 |
+
|
| 1082 |
+
// Update active content
|
| 1083 |
+
document.querySelectorAll('.fab-tab-content').forEach(content => {
|
| 1084 |
+
content.classList.remove('active');
|
| 1085 |
+
});
|
| 1086 |
+
document.getElementById(`${tabName}-tab`).classList.add('active');
|
| 1087 |
+
}
|
| 1088 |
+
|
| 1089 |
+
// Toggle TTS panel
|
| 1090 |
+
function toggleTtsPanel() {
|
| 1091 |
+
const panel = document.getElementById('tts-panel');
|
| 1092 |
+
panel.classList.toggle('active');
|
| 1093 |
+
|
| 1094 |
+
// Close other panels if open
|
| 1095 |
+
document.getElementById('fab-menu').classList.remove('active');
|
| 1096 |
+
document.getElementById('telegram-panel').classList.remove('active');
|
| 1097 |
+
}
|
| 1098 |
+
|
| 1099 |
+
// Toggle Telegram panel
|
| 1100 |
+
function toggleTelegramPanel() {
|
| 1101 |
+
const panel = document.getElementById('telegram-panel');
|
| 1102 |
+
panel.classList.toggle('active');
|
| 1103 |
+
|
| 1104 |
+
// Close other panels if open
|
| 1105 |
+
document.getElementById('fab-menu').classList.remove('active');
|
| 1106 |
+
document.getElementById('tts-panel').classList.remove('active');
|
| 1107 |
+
}
|
| 1108 |
+
|
| 1109 |
+
// Initialize voice recognition
|
| 1110 |
+
function initVoiceRecognition() {
|
| 1111 |
+
try {
|
| 1112 |
+
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
| 1113 |
+
recognition = new SpeechRecognition();
|
| 1114 |
+
recognition.continuous = false;
|
| 1115 |
+
recognition.interimResults = true;
|
| 1116 |
+
|
| 1117 |
+
recognition.onstart = function() {
|
| 1118 |
+
isListening = true;
|
| 1119 |
+
document.getElementById('tts-button').classList.add('listening');
|
| 1120 |
+
document.getElementById('tts-status').textContent = 'Listening... Speak now';
|
| 1121 |
+
};
|
| 1122 |
+
|
| 1123 |
+
recognition.onerror = function(event) {
|
| 1124 |
+
console.error('Speech recognition error', event.error);
|
| 1125 |
+
stopVoiceRecognition();
|
| 1126 |
+
document.getElementById('tts-status').textContent = 'Error: ' + event.error;
|
| 1127 |
+
};
|
| 1128 |
+
|
| 1129 |
+
recognition.onend = function() {
|
| 1130 |
+
stopVoiceRecognition();
|
| 1131 |
+
if (finalTranscript.trim()) {
|
| 1132 |
+
document.getElementById('tts-status').textContent = 'Click send or speak again';
|
| 1133 |
+
} else {
|
| 1134 |
+
document.getElementById('tts-status').textContent = 'Click the microphone to start speaking';
|
| 1135 |
+
}
|
| 1136 |
+
};
|
| 1137 |
+
|
| 1138 |
+
recognition.onresult = function(event) {
|
| 1139 |
+
let interimTranscript = '';
|
| 1140 |
+
|
| 1141 |
+
for (let i = event.resultIndex; i < event.results.length; i++) {
|
| 1142 |
+
const transcript = event.results[i][0].transcript;
|
| 1143 |
+
if (event.results[i].isFinal) {
|
| 1144 |
+
finalTranscript += transcript;
|
| 1145 |
+
} else {
|
| 1146 |
+
interimTranscript += transcript;
|
| 1147 |
+
}
|
| 1148 |
+
}
|
| 1149 |
+
|
| 1150 |
+
document.getElementById('tts-transcript').innerHTML =
|
| 1151 |
+
`<span class="text-white">${finalTranscript}</span>` +
|
| 1152 |
+
`<span class="text-gray-400">${interimTranscript}</span>`;
|
| 1153 |
+
};
|
| 1154 |
+
} catch (e) {
|
| 1155 |
+
console.error('Speech recognition not supported', e);
|
| 1156 |
+
document.getElementById('tts-status').textContent = 'Voice recognition not supported in this browser';
|
| 1157 |
+
document.getElementById('tts-start-btn').disabled = true;
|
| 1158 |
+
}
|
| 1159 |
+
}
|
| 1160 |
+
|
| 1161 |
+
// Start voice recognition
|
| 1162 |
+
function startVoiceRecognition() {
|
| 1163 |
+
if (!recognition) return;
|
| 1164 |
+
|
| 1165 |
+
finalTranscript = '';
|
| 1166 |
+
document.getElementById('tts-transcript').textContent = 'Your voice input will appear here...';
|
| 1167 |
+
|
| 1168 |
+
try {
|
| 1169 |
+
recognition.start();
|
| 1170 |
+
} catch (e) {
|
| 1171 |
+
console.error('Error starting recognition:', e);
|
| 1172 |
+
document.getElementById('tts-status').textContent = 'Error starting voice recognition';
|
| 1173 |
+
}
|
| 1174 |
+
}
|
| 1175 |
+
|
| 1176 |
+
// Stop voice recognition
|
| 1177 |
+
function stopVoiceRecognition() {
|
| 1178 |
+
isListening = false;
|
| 1179 |
+
document.getElementById('tts-button').classList.remove('listening');
|
| 1180 |
+
|
| 1181 |
+
if (recognition) {
|
| 1182 |
+
recognition.stop();
|
| 1183 |
+
}
|
| 1184 |
+
}
|
| 1185 |
+
|
| 1186 |
+
// Clear transcript
|
| 1187 |
+
function clearTranscript() {
|
| 1188 |
+
finalTranscript = '';
|
| 1189 |
+
document.getElementById('tts-transcript').textContent = 'Your voice input will appear here...';
|
| 1190 |
+
document.getElementById('tts-status').textContent = 'Click the microphone to start speaking';
|
| 1191 |
+
}
|
| 1192 |
+
|
| 1193 |
+
// Submit voice command
|
| 1194 |
+
function submitVoiceCommand() {
|
| 1195 |
+
if (finalTranscript.trim()) {
|
| 1196 |
+
// Close TTS panel
|
| 1197 |
+
toggleTtsPanel();
|
| 1198 |
+
|
| 1199 |
+
// Show user message
|
| 1200 |
+
document.getElementById('avatar-message').textContent = `You: ${finalTranscript}`;
|
| 1201 |
+
|
| 1202 |
+
// Show typing indicator
|
| 1203 |
+
document.getElementById('typing-indicator').classList.remove('hidden');
|
| 1204 |
+
|
| 1205 |
+
// Process after delay
|
| 1206 |
+
setTimeout(() => {
|
| 1207 |
+
document.getElementById('typing-indicator').classList.add('hidden');
|
| 1208 |
+
respondToMessage(finalTranscript);
|
| 1209 |
+
}, 1500);
|
| 1210 |
+
|
| 1211 |
+
// Clear transcript
|
| 1212 |
+
clearTranscript();
|
| 1213 |
+
}
|
| 1214 |
+
}
|
| 1215 |
+
|
| 1216 |
+
// Load Telegram feed (simulated since we can't directly access Telegram API from frontend)
|
| 1217 |
+
function loadTelegramFeed() {
|
| 1218 |
+
// In a real implementation, you would need a backend service to fetch Telegram posts
|
| 1219 |
+
// using the bot token. Here we simulate some posts after a delay.
|
| 1220 |
+
|
| 1221 |
+
setTimeout(() => {
|
| 1222 |
+
const telegramContent = document.getElementById('telegram-content');
|
| 1223 |
+
telegramContent.innerHTML = '';
|
| 1224 |
+
|
| 1225 |
+
// Sample Telegram posts
|
| 1226 |
+
const samplePosts = [
|
| 1227 |
+
{
|
| 1228 |
+
author: "SMPlusBot",
|
| 1229 |
+
date: "2 minutes ago",
|
| 1230 |
+
text: "Welcome to our AI Avatar platform! Get started by uploading your image to create a personalized video avatar.",
|
| 1231 |
+
image: "https://via.placeholder.com/300x150/0088cc/ffffff?text=AI+Avatar"
|
| 1232 |
+
},
|
| 1233 |
+
{
|
| 1234 |
+
author: "SMPlusBot",
|
| 1235 |
+
date: "15 minutes ago",
|
| 1236 |
+
date: "15 minutes ago",
|
| 1237 |
+
text: "New feature alert: You can now interact with your avatar using voice commands. Try it out!",
|
| 1238 |
+
image: "https://via.placeholder.com/300x150/0088cc/ffffff?text=Voice+Commands"
|
| 1239 |
+
},
|
| 1240 |
+
{
|
| 1241 |
+
author: "SMPlusBot",
|
| 1242 |
+
date: "1 hour ago",
|
| 1243 |
+
text: "Did you know you can share your avatar on social media? Click the Telegram icon to share your creation!",
|
| 1244 |
+
image: null
|
| 1245 |
+
}
|
| 1246 |
+
];
|
| 1247 |
+
|
| 1248 |
+
samplePosts.forEach(post => {
|
| 1249 |
+
const postElement = document.createElement('div');
|
| 1250 |
+
postElement.className = 'telegram-post';
|
| 1251 |
+
|
| 1252 |
+
let imageHtml = '';
|
| 1253 |
+
if (post.image) {
|
| 1254 |
+
imageHtml = `<img src="${post.image}" class="telegram-post-image" alt="Telegram post image">`;
|
| 1255 |
+
}
|
| 1256 |
+
|
| 1257 |
+
postElement.innerHTML = `
|
| 1258 |
+
<div class="telegram-post-header">
|
| 1259 |
+
<div class="telegram-post-avatar">
|
| 1260 |
+
<i class="fab fa-telegram"></i>
|
| 1261 |
+
</div>
|
| 1262 |
+
<div class="telegram-post-author">${post.author}</div>
|
| 1263 |
+
<div class="telegram-post-date">${post.date}</div>
|
| 1264 |
+
</div>
|
| 1265 |
+
<div class="telegram-post-text">${post.text}</div>
|
| 1266 |
+
${imageHtml}
|
| 1267 |
+
`;
|
| 1268 |
+
|
| 1269 |
+
telegramContent.appendChild(postElement);
|
| 1270 |
+
});
|
| 1271 |
+
}, 1500);
|
| 1272 |
+
}
|
| 1273 |
+
|
| 1274 |
+
// Keyboard support
|
| 1275 |
+
document.getElementById('user-input').addEventListener('keypress', (e) => {
|
| 1276 |
+
if (e.key === 'Enter') {
|
| 1277 |
+
sendMessage();
|
| 1278 |
+
}
|
| 1279 |
+
});
|
| 1280 |
+
</script>
|
| 1281 |
+
<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=privateuserh/ai-avatar-v1-03" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 1282 |
+
</html>
|