Spaces:
Running on Zero
Running on Zero
File size: 65,789 Bytes
00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 97ddbe3 5a6c23f 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 75cc0e6 5a6c23f 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 5a6c23f 97ddbe3 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 5a6c23f 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 97ddbe3 5a6c23f 97ddbe3 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 97ddbe3 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 00b19ca 97ddbe3 5a6c23f 00b19ca 97ddbe3 5a6c23f 00b19ca 5a6c23f 97ddbe3 5a6c23f 97ddbe3 5a6c23f 00b19ca 5a6c23f 97ddbe3 5a6c23f 97ddbe3 5a6c23f 97ddbe3 5a6c23f 97ddbe3 5a6c23f 00b19ca 97ddbe3 5a6c23f 97ddbe3 00b19ca 97ddbe3 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 97ddbe3 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca 5a6c23f 00b19ca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🎭 DramaBox — Expressive TTS with Voice Cloning</title>
<!-- Meta tags for premium look and SEO -->
<meta name="description" content="Generate highly expressive speech with voice cloning. Powered by LTX-2.3 and Resemble Perth watermarking.">
<meta name="theme-color" content="#07090e">
<!-- Google Fonts: Outfit and Inter -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<style>
:root {
--bg-color: #05060a;
--panel-bg: rgba(11, 14, 23, 0.75);
--sidebar-bg: #0b0e17;
--panel-border: rgba(60, 208, 162, 0.08);
--text-primary: #f8fafc;
--text-secondary: #94a3b8;
--accent-mint: #3cd0a2;
--accent-mint-hover: #5fe2b9;
--accent-mint-glow: rgba(60, 208, 162, 0.2);
--accent-dark-slate: #1e293b;
--accent-green: #10b981;
--radius-lg: 18px;
--radius-md: 12px;
--radius-sm: 8px;
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: var(--bg-color);
color: var(--text-primary);
font-family: 'Inter', sans-serif;
min-height: 100vh;
line-height: 1.5;
overflow: hidden; /* Sidebar controls scrolling */
position: relative;
}
/* Ambient glowing circles using Resemble AI branding colors */
body::before {
content: '';
position: absolute;
top: -10%;
left: 10%;
width: 45%;
height: 45%;
background: radial-gradient(circle, var(--accent-mint-glow) 0%, transparent 60%);
z-index: -1;
filter: blur(80px);
pointer-events: none;
opacity: 0.7;
}
body::after {
content: '';
position: absolute;
bottom: -5%;
right: 5%;
width: 40%;
height: 40%;
background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 60%);
z-index: -1;
filter: blur(80px);
pointer-events: none;
opacity: 0.5;
}
/* Base Page Layout */
.app-layout {
display: flex;
width: 100vw;
height: 100vh;
position: relative;
overflow: hidden;
}
/* ── Collapsible Sidebar ── */
.sidebar {
width: 360px;
height: 100%;
background-color: var(--sidebar-bg);
border-right: 1px solid var(--panel-border);
display: flex;
flex-direction: column;
position: relative;
z-index: 100;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
flex-shrink: 0;
}
.sidebar.collapsed {
margin-left: -360px;
transform: translateX(-100%);
}
.sidebar-header {
padding: 20px 24px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.sidebar-title {
font-family: 'Outfit', sans-serif;
font-size: 1.1rem;
font-weight: 700;
color: #ffffff;
letter-spacing: 0.5px;
display: flex;
align-items: center;
gap: 8px;
}
.sidebar-close-btn {
background: none;
border: none;
color: var(--text-secondary);
font-size: 1.1rem;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
}
.sidebar-close-btn:hover {
color: #ffffff;
transform: scale(1.1);
}
.sidebar-scrollable {
flex: 1;
overflow-y: auto;
padding: 24px;
display: flex;
flex-direction: column;
gap: 24px;
}
/* Scrollbar styles for sidebar */
.sidebar-scrollable::-webkit-scrollbar {
width: 5px;
}
.sidebar-scrollable::-webkit-scrollbar-track {
background: transparent;
}
.sidebar-scrollable::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.05);
border-radius: 3px;
}
.sidebar-scrollable::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.1);
}
/* ── Main Workspace Area ── */
.content-area {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
overflow-y: auto;
position: relative;
transition: var(--transition);
}
/* Main Scrollable wrapper */
.content-container {
width: 100%;
max-width: 840px;
margin: 0 auto;
padding: 24px 20px 60px 20px;
display: flex;
flex-direction: column;
gap: 24px;
}
header {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 20px 0 10px 0;
gap: 12px;
position: relative;
}
.logo-area {
display: flex;
align-items: center;
gap: 12px;
}
.logo-emoji {
font-size: 2.2rem;
animation: float 3s ease-in-out infinite;
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-5px); }
}
h1 {
font-family: 'Outfit', sans-serif;
font-size: 2.4rem;
font-weight: 800;
background: linear-gradient(135deg, #ffffff 40%, var(--accent-mint) 80%, #76ecd4 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
letter-spacing: -0.5px;
}
.brand-badge {
font-size: 0.75rem;
font-weight: 600;
background: rgba(60, 208, 162, 0.1);
color: var(--accent-mint);
border: 1px solid rgba(60, 208, 162, 0.2);
padding: 3px 8px;
border-radius: 30px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.subtitle {
font-size: 0.95rem;
color: var(--text-secondary);
font-weight: 400;
}
.ltx-banner {
background: rgba(22, 28, 45, 0.3);
border: 1px solid var(--panel-border);
border-left: 3px solid var(--accent-mint);
border-radius: var(--radius-md);
padding: 12px 18px;
color: #cbd5e1;
font-size: 0.82rem;
line-height: 1.5;
text-align: left;
backdrop-filter: blur(10px);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
width: 100%;
}
.ltx-banner a {
color: var(--accent-mint);
font-weight: 600;
text-decoration: none;
transition: var(--transition);
}
.ltx-banner a:hover {
color: #ffffff;
text-decoration: underline;
}
/* Sliding Toggle Controls Button */
.btn-toggle-sidebar {
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--panel-border);
color: #ffffff;
font-size: 0.85rem;
font-weight: 600;
padding: 10px 16px;
border-radius: 30px;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
transition: var(--transition);
outline: none;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn-toggle-sidebar:hover {
background: rgba(60, 208, 162, 0.05);
border-color: var(--accent-mint);
transform: translateY(-1px);
}
/* ── Modern Script Panels (Main Area) ── */
.main-panel {
background: var(--panel-bg);
border: 1px solid var(--panel-border);
border-radius: var(--radius-lg);
padding: 24px;
backdrop-filter: blur(20px);
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
display: flex;
flex-direction: column;
gap: 20px;
transition: var(--transition);
}
.form-group {
display: flex;
flex-direction: column;
gap: 8px;
}
.form-label {
font-size: 0.78rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
color: var(--text-secondary);
display: flex;
justify-content: space-between;
align-items: center;
}
.label-badge {
font-size: 0.75rem;
color: var(--accent-mint);
text-transform: none;
font-weight: 400;
letter-spacing: 0;
}
.textarea-custom {
width: 100%;
background: rgba(5, 7, 12, 0.8);
border: 1px solid var(--panel-border);
border-radius: var(--radius-md);
padding: 16px;
color: var(--text-primary);
font-family: 'Inter', sans-serif;
font-size: 1rem;
line-height: 1.6;
resize: vertical;
min-height: 140px;
outline: none;
transition: var(--transition);
}
.textarea-custom:focus {
border-color: var(--accent-mint);
box-shadow: 0 0 15px var(--accent-mint-glow);
background: rgba(5, 7, 12, 0.95);
}
/* Reference Uploader Inside Sidebar */
.upload-zone {
border: 2px dashed rgba(60, 208, 162, 0.2);
border-radius: var(--radius-md);
padding: 18px;
text-align: center;
cursor: pointer;
background: rgba(60, 208, 162, 0.01);
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
transition: var(--transition);
min-height: 90px;
justify-content: center;
}
.upload-zone:hover, .upload-zone.dragover {
border-color: var(--accent-mint);
background: rgba(60, 208, 162, 0.04);
}
.upload-icon {
font-size: 1.6rem;
color: var(--accent-mint);
transition: var(--transition);
}
.upload-text {
font-size: 0.8rem;
color: var(--text-secondary);
}
.upload-text strong {
color: #ffffff;
font-weight: 500;
}
.hidden-input {
display: none !important;
}
.file-capsule {
display: flex;
align-items: center;
justify-content: space-between;
background: rgba(60, 208, 162, 0.06);
border: 1px solid rgba(60, 208, 162, 0.2);
padding: 10px 14px;
border-radius: var(--radius-md);
width: 100%;
}
.file-info {
display: flex;
align-items: center;
gap: 10px;
font-size: 0.82rem;
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.btn-clear {
background: none;
border: none;
color: var(--text-secondary);
font-size: 0.95rem;
cursor: pointer;
transition: var(--transition);
padding: 2px;
display: flex;
align-items: center;
justify-content: center;
}
.btn-clear:hover {
color: #ffffff;
transform: scale(1.1);
}
/* Modernized Sidebar Dashboard Items */
.settings-block {
display: flex;
flex-direction: column;
gap: 16px;
background: rgba(255, 255, 255, 0.01);
border: 1px solid rgba(255, 255, 255, 0.03);
padding: 16px;
border-radius: var(--radius-md);
}
.settings-block-title {
font-family: 'Outfit', sans-serif;
font-size: 0.85rem;
font-weight: 700;
letter-spacing: 0.5px;
text-transform: uppercase;
color: #ffffff;
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
padding-bottom: 8px;
margin-bottom: 4px;
}
.slider-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.slider-meta {
display: flex;
justify-content: space-between;
font-size: 0.8rem;
color: var(--text-secondary);
font-weight: 500;
}
.slider-value {
color: var(--accent-mint);
font-weight: 700;
font-family: monospace;
}
input[type="range"] {
-webkit-appearance: none;
width: 100%;
height: 4px;
background: rgba(255, 255, 255, 0.06);
border-radius: 2px;
outline: none;
cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--accent-mint);
box-shadow: 0 0 8px var(--accent-mint-glow);
transition: var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover {
transform: scale(1.2);
background: #ffffff;
}
/* Seed Elements */
.seed-row {
display: flex;
gap: 8px;
align-items: center;
}
.input-seed {
flex: 1;
background: rgba(5, 7, 12, 0.8);
border: 1px solid rgba(255, 255, 255, 0.04);
border-radius: var(--radius-sm);
padding: 8px 12px;
color: var(--text-primary);
font-family: monospace;
outline: none;
font-size: 0.85rem;
transition: var(--transition);
height: 38px;
}
.input-seed:focus {
border-color: var(--accent-mint);
}
.btn-seed-random {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.04);
border-radius: var(--radius-sm);
color: var(--text-primary);
height: 38px;
width: 38px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: var(--transition);
font-size: 0.9rem;
}
.btn-seed-random:hover {
background: rgba(60, 208, 162, 0.05);
border-color: var(--accent-mint);
}
/* Glowing Resemble Green Button */
.btn-generate {
background: linear-gradient(135deg, var(--accent-mint) 0%, #2ac596 100%);
border: none;
border-radius: var(--radius-md);
color: #07090e;
font-family: 'Outfit', sans-serif;
font-size: 1.05rem;
font-weight: 800;
padding: 14px;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
box-shadow: 0 6px 20px var(--accent-mint-glow);
min-height: 48px;
letter-spacing: 0.3px;
}
.btn-generate:hover:not(:disabled) {
transform: translateY(-1.5px);
box-shadow: 0 10px 25px rgba(60, 208, 162, 0.4);
background: linear-gradient(135deg, var(--accent-mint-hover) 0%, var(--accent-mint) 100%);
}
.btn-generate:active:not(:disabled) {
transform: translateY(0);
}
.btn-generate:disabled {
background: #161a24;
color: #3b4255;
cursor: not-allowed;
box-shadow: none;
}
/* ── Output Lounge (Visual Player Deck) ── */
.output-wrapper {
background: rgba(5, 7, 12, 0.5);
border: 1px solid var(--panel-border);
border-radius: var(--radius-md);
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 140px;
position: relative;
}
.empty-placeholder {
color: var(--text-secondary);
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.empty-icon {
font-size: 2.2rem;
opacity: 0.4;
color: var(--accent-mint);
}
.empty-text {
font-size: 0.85rem;
}
/* Glowing Custom Player Layout */
.audio-player {
width: 100%;
display: flex;
flex-direction: column;
gap: 14px;
}
.visualizer-box {
width: 100%;
height: 44px;
background: linear-gradient(90deg, rgba(60, 208, 162, 0.05) 0%, rgba(139, 92, 246, 0.03) 100%);
border-radius: var(--radius-sm);
display: flex;
align-items: center;
justify-content: center;
border: 1px solid rgba(60, 208, 162, 0.04);
overflow: hidden;
}
.visualizer-wave {
display: flex;
align-items: center;
gap: 3px;
height: 100%;
}
.wave-bar {
width: 3px;
height: 5px;
background: var(--accent-mint);
border-radius: 1px;
transition: var(--transition);
}
.audio-player.playing .wave-bar {
animation: playWave 1.2s infinite ease-in-out alternate;
}
@keyframes playWave {
0% { height: 5px; }
100% { height: 28px; }
}
.wave-bar:nth-child(2n) { background: #5fe2b9; animation-delay: 0.15s; }
.wave-bar:nth-child(3n) { animation-delay: 0.3s; }
.wave-bar:nth-child(4n) { animation-delay: 0.45s; }
.wave-bar:nth-child(5n) { background: var(--accent-mint); animation-delay: 0.6s; }
.player-row {
display: flex;
align-items: center;
gap: 12px;
width: 100%;
}
.btn-play {
background: #ffffff;
border: none;
color: var(--bg-color);
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
cursor: pointer;
transition: var(--transition);
box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
flex-shrink: 0;
}
.btn-play:hover {
transform: scale(1.05);
box-shadow: 0 6px 18px rgba(255, 255, 255, 0.3);
}
.progress-box {
flex: 1;
display: flex;
align-items: center;
gap: 8px;
}
.time-lbl {
font-size: 0.72rem;
color: var(--text-secondary);
font-family: monospace;
min-width: 32px;
}
/* Secondary progress slider bar track styling */
.progress-box input[type="range"]::-webkit-slider-thumb {
background: #ffffff;
box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}
.deck-footer {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
border-top: 1px solid rgba(255, 255, 255, 0.04);
padding-top: 12px;
gap: 12px;
flex-wrap: wrap;
}
.vol-slider {
display: flex;
align-items: center;
gap: 6px;
max-width: 90px;
flex-shrink: 0;
}
.vol-icon {
font-size: 0.8rem;
color: var(--text-secondary);
}
.vol-slider input[type="range"]::-webkit-slider-thumb {
background: var(--text-secondary);
}
.speed-deck {
display: flex;
align-items: center;
gap: 4px;
}
.btn-speed {
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.04);
border-radius: 6px;
color: var(--text-secondary);
font-size: 0.68rem;
font-weight: 600;
padding: 3px 6px;
cursor: pointer;
transition: var(--transition);
}
.btn-speed.active, .btn-speed:hover {
background: rgba(60, 208, 162, 0.06);
color: var(--accent-mint);
border-color: rgba(60, 208, 162, 0.2);
}
.btn-download-wav {
background: rgba(255, 255, 255, 0.04);
border: 1px solid var(--panel-border);
border-radius: var(--radius-sm);
color: #ffffff;
font-size: 0.78rem;
font-weight: 600;
padding: 6px 12px;
text-decoration: none;
display: flex;
align-items: center;
gap: 6px;
transition: var(--transition);
}
.btn-download-wav:hover {
background: var(--accent-mint);
color: #07090e;
border-color: var(--accent-mint);
transform: translateY(-1px);
}
@media (max-width: 480px) {
.deck-footer {
flex-direction: column;
align-items: stretch;
gap: 12px;
}
.vol-slider {
max-width: 100%;
}
.speed-deck {
justify-content: space-between;
}
.btn-download-wav {
justify-content: center;
}
}
/* Synchronizer Status Alert */
.status-alert {
display: flex;
align-items: center;
gap: 10px;
font-size: 0.82rem;
font-weight: 500;
padding: 10px 14px;
border-radius: var(--radius-md);
border: 1px solid transparent;
display: none;
margin-bottom: 12px;
width: 100%;
}
.status-alert.success {
background: rgba(16, 185, 129, 0.04);
border-color: rgba(16, 185, 129, 0.15);
color: var(--accent-green);
}
.status-alert.info {
background: rgba(60, 208, 162, 0.04);
border-color: rgba(60, 208, 162, 0.15);
color: #8bead0;
}
.status-alert.error {
background: rgba(239, 68, 68, 0.04);
border-color: rgba(239, 68, 68, 0.15);
color: #f87171;
}
.alert-spinner {
width: 14px;
height: 14px;
border: 2px solid rgba(255, 255, 255, 0.1);
border-top: 2px solid currentColor;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Demo deck scrollable inside sidebar */
.demo-capsules {
display: flex;
flex-direction: column;
gap: 8px;
}
.demo-pill {
background: rgba(255, 255, 255, 0.01);
border: 1px solid rgba(255, 255, 255, 0.04);
border-radius: var(--radius-md);
padding: 10px 14px;
cursor: pointer;
transition: var(--transition);
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
text-align: left;
}
.demo-pill:hover {
background: rgba(60, 208, 162, 0.02);
border-color: rgba(60, 208, 162, 0.15);
transform: translateX(2px);
}
.demo-pill.active {
border-color: var(--accent-mint);
background: rgba(60, 208, 162, 0.03);
}
.demo-pill-title {
font-size: 0.82rem;
font-weight: 600;
color: #ffffff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 170px;
}
.pill-labels {
display: flex;
gap: 4px;
flex-shrink: 0;
}
.pill-badge {
font-size: 0.65rem;
font-weight: 700;
padding: 1px 5px;
border-radius: 4px;
text-transform: uppercase;
}
.pill-badge-male { background: rgba(59, 130, 246, 0.08); color: #60a5fa; }
.pill-badge-female { background: rgba(236, 72, 153, 0.08); color: #f472b6; }
.pill-badge-long { background: rgba(139, 92, 246, 0.08); color: #c084fc; }
/* Guide container inside sidebar */
.guide-header {
font-size: 0.82rem;
font-weight: 700;
color: #ffffff;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
user-select: none;
text-transform: uppercase;
letter-spacing: 0.5px;
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
padding-bottom: 8px;
margin-bottom: 4px;
}
.guide-body {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
font-size: 0.78rem;
color: var(--text-secondary);
display: flex;
flex-direction: column;
gap: 12px;
line-height: 1.55;
}
.guide-body.open {
max-height: 380px;
margin-top: 12px;
}
.guide-block-title {
color: #ffffff;
font-weight: 600;
margin-bottom: 2px;
font-size: 0.78rem;
}
.guide-list {
padding-left: 14px;
display: flex;
flex-direction: column;
gap: 3px;
}
/* ── Sidebar backdrop overlay (mobile and smaller desktops) ── */
.sidebar-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);
z-index: 90;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
opacity: 1;
pointer-events: auto;
}
footer {
margin-top: auto;
text-align: center;
padding: 30px 20px;
font-size: 0.75rem;
color: var(--text-secondary);
border-top: 1px solid rgba(255, 255, 255, 0.03);
}
/* ── Mobile and Tablet Adaptations ── */
@media (max-width: 992px) {
.sidebar {
position: fixed;
top: 0;
left: 0;
height: 100%;
z-index: 1000;
}
.sidebar.collapsed {
margin-left: 0;
transform: translateX(-100%);
}
h1 {
font-size: 2rem;
}
.logo-emoji {
font-size: 1.8rem;
}
}
@media (min-width: 993px) {
.sidebar-close-btn {
display: none; /* Only show toggle trigger on desktop */
}
}
</style>
</head>
<body>
<div class="app-layout">
<!-- Left collapsing sidebar with configuration parameters & demos -->
<aside id="app-sidebar" class="sidebar">
<div class="sidebar-header">
<span class="sidebar-title">🎛️ Control Deck</span>
<button id="btn-close-sidebar" class="sidebar-close-btn" title="Close Panel">✕</button>
</div>
<div class="sidebar-scrollable">
<!-- Reference Audio Uploader -->
<div class="form-group">
<span class="form-label">Voice Reference (Optional)</span>
<div id="dropzone" class="upload-zone">
<span class="upload-icon">📤</span>
<div class="upload-text">
<strong>Drop file</strong> or click to choose<br>
<span>WAV, MP3, etc. (10s+)</span>
</div>
</div>
<input type="file" id="audio-file" class="hidden-input" accept="audio/*">
</div>
<!-- Settings Dashboard Parameters -->
<div class="settings-block">
<div class="settings-block-title">Synthesis Parameters</div>
<!-- CFG Scale -->
<div class="slider-group">
<div class="slider-meta">
<span>CFG Scale</span>
<span class="slider-value" id="val-cfg">2.5</span>
</div>
<input type="range" id="cfg" min="1.0" max="10.0" step="0.5" value="2.5">
</div>
<!-- STG Scale -->
<div class="slider-group">
<div class="slider-meta">
<span>STG Scale</span>
<span class="slider-value" id="val-stg">1.5</span>
</div>
<input type="range" id="stg" min="0.0" max="5.0" step="0.5" value="1.5">
</div>
<!-- Duration Scale Factor -->
<div class="slider-group">
<div class="slider-meta">
<span>Breathing Factor</span>
<span class="slider-value" id="val-dur">1.10</span>
</div>
<input type="range" id="dur" min="0.8" max="2.0" step="0.05" value="1.1">
</div>
<!-- Target Generation Time -->
<div class="slider-group">
<div class="slider-meta">
<span>Fixed duration (s) - 0 = Auto</span>
<span class="slider-value" id="val-gendur">0.0</span>
</div>
<input type="range" id="gendur" min="0.0" max="60.0" step="1.0" value="0.0">
</div>
<!-- Reference Window -->
<div class="slider-group">
<div class="slider-meta">
<span>Reference Window (s)</span>
<span class="slider-value" id="val-refdur">10.0</span>
</div>
<input type="range" id="refdur" min="3.0" max="30.0" step="1.0" value="10.0">
</div>
<!-- Seed Controls -->
<div class="form-group">
<span class="form-label">Seed Value</span>
<div class="seed-row">
<input type="number" id="seed" class="input-seed" value="42">
<button type="button" id="btn-random-seed" class="btn-seed-random" title="Randomize Seed">🎲</button>
</div>
</div>
</div>
<!-- Quick Examples Selector -->
<div class="form-group">
<span class="form-label">Quick Demos</span>
<div class="demo-capsules" id="examples-container">
<!-- Loaded dynamically -->
</div>
</div>
<!-- Accordion Guide -->
<div class="form-group">
<div class="guide-header" id="guide-toggle">
<span>📖 Prompt Guide</span>
<span class="accordion-icon" id="guide-arrow">▼</span>
</div>
<div class="guide-body" id="guide-body">
<div>
<div class="guide-block-title">Format Structure</div>
<p><code><description>, "<dialogue>" <movement/breath> "<more dialogue>"</code></p>
</div>
<div>
<div class="guide-block-title">Inside Quotes (Spoken)</div>
<ul class="guide-list">
<li>Dialogue transcript: <code>"We are in position."</code></li>
<li>Phonetic expressions: <code>"Hahaha"</code>, <code>"Mmmm"</code>, <code>"Ugh"</code>, <code>"Argh"</code></li>
</ul>
</div>
<div>
<div class="guide-block-title">Outside Quotes (Pacing)</div>
<ul class="guide-list">
<li>Action details: <code>She sighs deeply.</code>, <code>A long pause.</code></li>
<li>Tonal delivery: <code>His voice cracks.</code>, <code>He clears his throat.</code></li>
</ul>
</div>
</div>
</div>
</div>
</aside>
<!-- Sidebar backdrop overlay (mobile and smaller screen viewports) -->
<div id="sidebar-overlay" class="sidebar-overlay"></div>
<!-- Main workspace containing editing space and glowing outputs -->
<div class="content-area">
<div class="content-container">
<header>
<div class="logo-area">
<span class="logo-emoji">🎭</span>
<h1>DramaBox</h1>
<span class="brand-badge">Resemble.AI</span>
</div>
<div class="subtitle">Expressive TTS with Voice Cloning</div>
<!-- Sliding Collapsible Trigger -->
<button id="btn-toggle-sidebar" class="btn-toggle-sidebar" title="Toggle Dashboard Panel">
<span class="toggle-icon">🎛️</span>
<span class="toggle-text">Show Control Deck & Demos</span>
</button>
</header>
<!-- State Alerts (Connecting / Queuing states) -->
<div id="status-box" class="status-alert">
<div class="alert-spinner"></div>
<span id="status-text">Connecting to DramaBox API...</span>
</div>
<main class="main-panel">
<!-- Script Prompt Input -->
<div class="form-group">
<div class="form-label">
<span>Script Prompt</span>
<span class="label-badge">Double quotes for dialogue, standard text for style</span>
</div>
<textarea
id="scene-prompt"
class="textarea-custom"
placeholder='A shadowy villain speaks with cold menace, "You have entered my domain, mortal." He chuckles darkly, "Such arrogance will be your undoing."'
></textarea>
</div>
<!-- Synthesize Trigger -->
<button id="btn-generate" class="btn-generate">
<span>⚡</span> Generate Speech
</button>
<!-- Output Deck -->
<div class="output-wrapper">
<audio id="audio-element" style="display:none;"></audio>
<!-- Empty Placeholder -->
<div id="output-empty-state" class="empty-placeholder">
<span class="empty-icon">🎛️</span>
<span class="empty-text">Formulate a script above to voice speech</span>
</div>
<!-- Elegant Audio Deck -->
<div id="custom-player" class="audio-player" style="display: none;">
<div class="visualizer-box">
<div class="visualizer-wave">
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
</div>
</div>
<div class="player-row">
<button type="button" id="player-play" class="btn-play">▶</button>
<div class="progress-box">
<span id="player-current-time" class="time-lbl">00:00</span>
<input type="range" id="player-progress" min="0" max="100" value="0">
<span id="player-duration" class="time-lbl">00:00</span>
</div>
</div>
<div class="deck-footer">
<!-- Volume -->
<div class="vol-slider">
<span class="vol-icon">🔊</span>
<input type="range" id="player-volume" min="0" max="1" step="0.1" value="0.8">
</div>
<!-- Speed control indicators -->
<div class="speed-deck">
<button type="button" class="btn-speed" data-speed="0.8">0.8x</button>
<button type="button" class="btn-speed active" data-speed="1.0">1.0x</button>
<button type="button" class="btn-speed" data-speed="1.2">1.2x</button>
<button type="button" class="btn-speed" data-speed="1.5">1.5x</button>
</div>
<!-- Downloader WAV -->
<a id="player-download" class="btn-download-wav" href="#" download="dramabox_audio.wav">
<span>📥</span> Download
</a>
</div>
</div>
</div>
</main>
<div class="ltx-banner" style="margin-top: 12px;">
🏗️ Built on <a href="https://github.com/Lightricks/LTX-2" target="_blank">LTX-2</a> by
<a href="https://huggingface.co/Lightricks" target="_blank">Lightricks</a>.
<strong>DramaBox</strong> is <strong>Resemble AI's</strong> expressive TTS,
trained on top of the LTX-2.3 audio branch under the LTX-2 Community License.
Huge thanks to the Lightricks team for open-sourcing the base.
</div>
<footer>
© 2026 DramaBox. Audio output watermarked with Resemble Perth.
</footer>
</div>
</div>
</div>
<!-- Gradio API script module -->
<script type="module">
import { Client, handle_file } from "https://cdn.jsdelivr.net/npm/@gradio/client/dist/index.min.js";
const EXAMPLES = [
{
name: "Villain monologue",
gender: "male",
badge: "Male voice",
voice: "/assets/voices/male_harvey_keitel.mp3",
prompt: 'A shadowy villain speaks with cold menace, "You have entered my domain, mortal." He chuckles darkly, "Such arrogance will be your undoing." His voice rises with fury, "Kneel, or be destroyed where you stand!"',
duration: 0.0
},
{
name: "Talk-show host wheeze-laugh",
gender: "male",
badge: "Wheeze laugh",
voice: "/assets/voices/male_conan.mp3",
prompt: 'A talk show host gasps with shock, "No! You did NOT just say that!" He bursts into uncontrollable laughter, "Hahaha! Oh my god, oh my god!" He wheezes, "I cannot, I literally cannot breathe right now!"',
duration: 0.0
},
{
name: "Tender goodnight whisper",
gender: "female",
badge: "Whisper",
voice: "/assets/voices/female_shadowheart.wav",
prompt: 'A woman speaks tenderly, "It has been a long day, my love." She whispers, "Close your eyes. I am right here." She hums quietly, "Mmmm-mmm. Sleep now."',
duration: 0.0
},
{
name: "Old-school radio anchor",
gender: "male",
badge: "Anchor",
voice: "/assets/voices/male_old_movie.wav",
prompt: 'A radio host clears his throat, "Excuse me, pardon that." He settles into a warm, professional tone, "Good evening everyone, and welcome back to the show. We have got a wonderful lineup tonight."',
duration: 0.0
},
{
name: "Catgirl uncontrollable giggling",
gender: "female",
badge: "Giggling",
voice: "/assets/voices/female_american.wav",
prompt: 'A playful girl already mid-giggle, "Hehehe, oh my gosh you should see your face!" She gasps for air between giggles, "Oh my, hehe, oh my, I cannot stop!" She tries to compose herself, "Ahhhhh okay okay okay, I will stop, I promise."',
duration: 0.0
},
{
name: "Hero stammering courage",
gender: "male",
badge: "Heroic",
voice: "/assets/voices/male_arnie.mp3",
prompt: 'A young warrior speaks with a trembling voice, "I... I do not know if I can do this." He takes a shaky breath, "But someone has to try." His voice steadies with growing fire, "No more running. I WILL fight!"',
duration: 0.0
},
{
name: "Exhausted dad, fraying patience",
gender: "male",
badge: "Frustrated",
voice: "/assets/voices/male_petergriffin.wav",
prompt: 'An exhausted father speaks with fraying patience, "Sweetie, daddy is asking very nicely." He sighs deeply, "Ohhhh my goodness." He puts on an overly cheerful voice, "Hey buddy! Look at the shiny thing!" Then he laughs helplessly, "Hahaha, I am losing my mind."',
duration: 0.0
},
{
name: "Smug-confident announcer",
gender: "male",
badge: "Announcer",
voice: "/assets/voices/male_samuel_j.mp3",
prompt: 'A confident announcer speaks proudly, "And now, the moment you have all been waiting for." He chuckles knowingly, "Heheh, trust me, this one is going to blow you away."',
duration: 0.0
},
{
name: "30s • Villain soliloquy",
gender: "male",
badge: "30s clip",
voice: "/assets/voices/male_harvey_keitel.mp3",
prompt: 'A shadowy villain stands at the edge of his throne room, gazing into the dark. He speaks with slow, measured menace, "So, the little hero has come to finish me, has he?" He chuckles low and humourless, "Hehe, oh how delightfully predictable you mortals are." His voice hardens into ice, "I have lived ten thousand years. I have seen empires rise and fall like the tide." He scoffs, "And you think you, with your borrowed sword and your trembling hands, will be the one to end me?" A long pause. He whispers, almost tenderly, "I will give you a single chance to turn around and walk away." Then his voice rises with crushing finality, "Choose, child. The door behind you, or the grave at your feet."',
duration: 30.0
},
{
name: "30s • Late-night radio monologue",
gender: "male",
badge: "30s clip",
voice: "/assets/voices/male_old_movie.wav",
prompt: 'A radio host clears his throat softly into the microphone in the late hours of the night. He settles into a warm, smoky tone, "Good evening, dear listeners, and welcome back to the After Hours Hour." He sighs contentedly, "Mmm, what a night it has been. The rain is tapping at my window like an old friend." He chuckles softly, "Heheh, you know the kind of friend, the one that always shows up unannounced." His voice drops, intimate, "I want you to lean back, wherever you are. Pour yourself something warm." He pauses, breath audible, "Tonight we are going to talk about love, and loss, and the songs that hold us together." A smile in his voice, "And I have got the perfect record cued up to start us off, so stay right where you are."',
duration: 30.0
},
{
name: "30s • Bedtime story",
gender: "female",
badge: "30s clip",
voice: "/assets/voices/female_shadowheart.wav",
prompt: 'A mother sits at the edge of her child\'s bed in the dim glow of a single lamp. She speaks softly, "Once upon a time, in a kingdom by the sea, there lived a small dragon named Pip." She lowers her voice playfully, "Now Pip was not like the other dragons. Pip was afraid of fire." She smiles warmly, "Mmm, can you imagine? A dragon who was afraid of his own breath?" A gentle pause, "But Pip had something the other dragons did not have. Pip had courage in his heart." She hums softly, "Mmmmm. And one cold winter night, when the village below ran out of warmth..." Her voice drops to a whisper, "Pip closed his eyes, took a deep, deep breath, and remembered who he was."',
duration: 30.0
}
];
let client = null;
let selectedAudioFile = null;
let selectedAudioFilename = "";
// UI nodes
const sidebar = document.getElementById("app-sidebar");
const sidebarOverlay = document.getElementById("sidebar-overlay");
const btnToggleSidebar = document.getElementById("btn-toggle-sidebar");
const btnCloseSidebar = document.getElementById("btn-close-sidebar");
const statusBox = document.getElementById("status-box");
const statusText = document.getElementById("status-text");
const btnGenerate = document.getElementById("btn-generate");
const scenePrompt = document.getElementById("scene-prompt");
const dropzone = document.getElementById("dropzone");
const audioFileInput = document.getElementById("audio-file");
// Settings sliders
const sliderCfg = document.getElementById("cfg");
const valCfg = document.getElementById("val-cfg");
const sliderStg = document.getElementById("stg");
const valStg = document.getElementById("val-stg");
const sliderDur = document.getElementById("dur");
const valDur = document.getElementById("val-dur");
const sliderGenDur = document.getElementById("gendur");
const valGenDur = document.getElementById("val-gendur");
const sliderRefDur = document.getElementById("refdur");
const valRefDur = document.getElementById("val-refdur");
const inputSeed = document.getElementById("seed");
const btnRandomSeed = document.getElementById("btn-random-seed");
// Player elements
const audioElement = document.getElementById("audio-element");
const outputEmptyState = document.getElementById("output-empty-state");
const customPlayer = document.getElementById("custom-player");
const playerPlay = document.getElementById("player-play");
const playerProgress = document.getElementById("player-progress");
const playerCurrentTime = document.getElementById("player-current-time");
const playerDuration = document.getElementById("player-duration");
const playerVolume = document.getElementById("player-volume");
const playerDownload = document.getElementById("player-download");
const speedButtons = document.querySelectorAll(".btn-speed");
// Guide togglers
const guideToggle = document.getElementById("guide-toggle");
const guideBody = document.getElementById("guide-body");
const guideArrow = document.getElementById("guide-arrow");
// --- Sidebar collapsers ---
function toggleSidebar() {
const isCollapsed = sidebar.classList.toggle("collapsed");
sidebarOverlay.classList.toggle("active", !isCollapsed);
const btnText = btnToggleSidebar.querySelector(".toggle-text");
btnText.innerText = isCollapsed ? "Show Control Deck & Demos" : "Hide Control Deck & Demos";
}
btnToggleSidebar.addEventListener("click", toggleSidebar);
btnCloseSidebar.addEventListener("click", toggleSidebar);
sidebarOverlay.addEventListener("click", toggleSidebar);
// Collapse by default on load under 992px
if (window.innerWidth <= 992) {
sidebar.classList.add("collapsed");
sidebarOverlay.classList.remove("active");
} else {
// Start open on desktop
sidebar.classList.remove("collapsed");
const btnText = btnToggleSidebar.querySelector(".toggle-text");
btnText.innerText = "Hide Control Deck & Demos";
}
// Simple alert helper
function updateStatus(message, type = "info", showSpinner = true) {
statusBox.style.display = "flex";
statusBox.className = `status-alert ${type}`;
statusText.innerText = message;
const spinner = statusBox.querySelector(".alert-spinner");
if (showSpinner) {
spinner.style.display = "block";
} else {
spinner.style.display = "none";
}
}
function hideStatus() {
statusBox.style.display = "none";
}
// Establish Gradio Connection
async function connectClient() {
try {
updateStatus("Connecting to DramaBox API...", "info");
client = await Client.connect(window.location.origin);
updateStatus("Engine online and ready", "success", false);
setTimeout(hideStatus, 2500);
} catch (err) {
console.error(err);
updateStatus("API synchronization failed. Please refresh.", "error", false);
}
}
// Accordion animations
guideToggle.addEventListener("click", () => {
const isOpen = guideBody.classList.toggle("open");
guideArrow.innerText = isOpen ? "▲" : "▼";
});
// Sliders updates
sliderCfg.addEventListener("input", (e) => valCfg.innerText = parseFloat(e.target.value).toFixed(1));
sliderStg.addEventListener("input", (e) => valStg.innerText = parseFloat(e.target.value).toFixed(1));
sliderDur.addEventListener("input", (e) => valDur.innerText = parseFloat(e.target.value).toFixed(2));
sliderGenDur.addEventListener("input", (e) => valGenDur.innerText = parseFloat(e.target.value).toFixed(1));
sliderRefDur.addEventListener("input", (e) => valRefDur.innerText = parseFloat(e.target.value).toFixed(1));
// Seed randomizer
btnRandomSeed.addEventListener("click", () => {
const randomVal = Math.floor(Math.random() * 99999999);
inputSeed.value = randomVal;
btnRandomSeed.style.transform = "rotate(360deg)";
setTimeout(() => btnRandomSeed.style.transform = "none", 300);
});
// Upload triggers
dropzone.addEventListener("click", () => audioFileInput.click());
dropzone.addEventListener("dragover", (e) => {
e.preventDefault();
dropzone.classList.add("dragover");
});
dropzone.addEventListener("dragleave", () => {
dropzone.classList.remove("dragover");
});
dropzone.addEventListener("drop", (e) => {
e.preventDefault();
dropzone.classList.remove("dragover");
const files = e.dataTransfer.files;
if (files.length > 0) {
handleUploadedFile(files[0]);
}
});
audioFileInput.addEventListener("change", (e) => {
if (e.target.files.length > 0) {
handleUploadedFile(e.target.files[0]);
}
});
function handleUploadedFile(file) {
selectedAudioFile = file;
selectedAudioFilename = file.name;
renderUploadedUI(file.name);
}
function renderUploadedUI(filename) {
dropzone.innerHTML = `
<div class="file-capsule">
<div class="file-info">
<span>🎵</span>
<span style="overflow: hidden; text-overflow: ellipsis; max-width: 190px;">${filename}</span>
</div>
<button type="button" class="btn-clear" id="btn-clear-upload" title="Remove voice file">✕</button>
</div>
`;
document.getElementById("btn-clear-upload").addEventListener("click", (e) => {
e.stopPropagation();
clearUploadedFile();
});
}
function clearUploadedFile() {
selectedAudioFile = null;
selectedAudioFilename = "";
audioFileInput.value = "";
dropzone.innerHTML = `
<span class="upload-icon">📤</span>
<div class="upload-text">
<strong>Drop file</strong> or click to choose<br>
<span>WAV, MP3, etc. (10s+)</span>
</div>
`;
}
// Fetch preloaded voices as File
async function loadExampleVoice(voicePath, originalFilename) {
try {
updateStatus("Buffering reference voice...", "info");
const response = await fetch(voicePath);
if (!response.ok) throw new Error("Could not fetch remote resource.");
const blob = await response.blob();
selectedAudioFile = new File([blob], originalFilename, { type: blob.type || "audio/mpeg" });
selectedAudioFilename = originalFilename;
renderUploadedUI(originalFilename);
updateStatus("Reference voice mapped", "success", false);
setTimeout(hideStatus, 1500);
} catch (err) {
console.error(err);
updateStatus("Unable to map the voice example.", "error", false);
}
}
// Dynamically build Example Capsules
const examplesContainer = document.getElementById("examples-container");
EXAMPLES.forEach((ex) => {
const pill = document.createElement("div");
pill.className = "demo-pill";
const isLong = ex.name.startsWith("30s");
const badgeHtml = `
<span class="pill-badge ${ex.gender === "male" ? "pill-badge-male" : "pill-badge-female"}">${ex.gender}</span>
${isLong ? '<span class="pill-badge pill-badge-long">30s</span>' : ''}
`;
pill.innerHTML = `
<span class="demo-pill-title">${ex.name}</span>
<div class="pill-labels">${badgeHtml}</div>
`;
pill.addEventListener("click", () => {
document.querySelectorAll(".demo-pill").forEach(el => el.classList.remove("active"));
pill.classList.add("active");
scenePrompt.value = ex.prompt;
sliderGenDur.value = ex.duration;
valGenDur.innerText = ex.duration.toFixed(1);
const filename = ex.voice.substring(ex.voice.lastIndexOf('/') + 1);
loadExampleVoice(ex.voice, filename);
// On mobile, automatically collapse sidebar when selecting a demo so they see the generator
if (window.innerWidth <= 992) {
toggleSidebar();
}
});
examplesContainer.appendChild(pill);
});
// Custom HTML5 Audio controllers
let isAudioReady = false;
function setupAudioSource(src) {
audioElement.src = src;
audioElement.load();
isAudioReady = true;
outputEmptyState.style.display = "none";
customPlayer.style.display = "flex";
playerPlay.innerText = "▶";
customPlayer.classList.remove("playing");
playerProgress.value = 0;
playerDownload.href = src;
}
audioElement.addEventListener("loadedmetadata", () => {
playerDuration.innerText = formatTime(audioElement.duration);
});
audioElement.addEventListener("timeupdate", () => {
if (audioElement.duration) {
const percent = (audioElement.currentTime / audioElement.duration) * 100;
playerProgress.value = percent;
playerCurrentTime.innerText = formatTime(audioElement.currentTime);
}
});
audioElement.addEventListener("ended", () => {
playerPlay.innerText = "▶";
customPlayer.classList.remove("playing");
playerProgress.value = 0;
playerCurrentTime.innerText = "00:00";
});
playerPlay.addEventListener("click", () => {
if (!isAudioReady) return;
if (audioElement.paused) {
audioElement.play();
playerPlay.innerText = "⏸";
customPlayer.classList.add("playing");
} else {
audioElement.pause();
playerPlay.innerText = "▶";
customPlayer.classList.remove("playing");
}
});
playerProgress.addEventListener("input", (e) => {
if (!isAudioReady || !audioElement.duration) return;
const newTime = (e.target.value / 100) * audioElement.duration;
audioElement.currentTime = newTime;
});
playerVolume.addEventListener("input", (e) => {
audioElement.volume = e.target.value;
});
speedButtons.forEach(btn => {
btn.addEventListener("click", () => {
speedButtons.forEach(b => b.classList.remove("active"));
btn.classList.add("active");
audioElement.playbackRate = parseFloat(btn.dataset.speed);
});
});
function formatTime(secs) {
const minutes = Math.floor(secs / 60);
const seconds = Math.floor(secs % 60);
return `${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
}
// Process Speech Trigger
btnGenerate.addEventListener("click", async () => {
const prompt = scenePrompt.value.trim();
if (!prompt) {
updateStatus("Please enter a script prompt.", "error", false);
return;
}
if (!client) {
updateStatus("DramaBox is still configuring, please wait.", "error", false);
return;
}
const cfg = parseFloat(sliderCfg.value);
const stg = parseFloat(sliderStg.value);
const durMult = parseFloat(sliderDur.value);
const genDur = parseFloat(sliderGenDur.value);
const refDur = parseFloat(sliderRefDur.value);
const seed = parseInt(inputSeed.value);
try {
btnGenerate.disabled = true;
btnGenerate.innerHTML = `<div class="alert-spinner"></div> Synthesizing...`;
updateStatus("Checking models & processing queues...", "info");
let uploadedFileData = null;
if (selectedAudioFile) {
uploadedFileData = handle_file(selectedAudioFile);
}
// Execute Gradio Client request
const predictResponse = await client.predict("/generate_audio", {
prompt: prompt,
audio_ref: uploadedFileData,
cfg: cfg,
stg: stg,
dur_mult: durMult,
gen_dur: genDur,
ref_dur: refDur,
seed: seed
});
if (predictResponse && predictResponse.data && predictResponse.data.length > 0) {
const audioUrl = predictResponse.data[0].url;
setupAudioSource(audioUrl);
updateStatus("Speech generation complete!", "success", false);
setTimeout(hideStatus, 2500);
} else {
throw new Error("No output returned from the generation server.");
}
} catch (err) {
console.error(err);
updateStatus(err.message || "Speech generation failed. Please try again.", "error", false);
} finally {
btnGenerate.disabled = false;
btnGenerate.innerHTML = `<span>⚡</span> Generate Speech`;
}
});
// Initialize connection
connectClient();
</script>
</body>
</html>
|