Add 3 files
Browse filesFiles changed (3)
- README.md+7-5
- index.html+680-19
- prompts.txtAdded+1
123452345678910111012---title: Evaiemoji: 📈colorFrom: yellowcolorTo: pinktitle: evaiemoji: 🐳colorFrom: pinkcolorTo: redsdk: staticpinned: falsetags: - deepsite---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-referenceCheck out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference12345678910111213141516171819123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680<!doctype html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="card"> <h1>Welcome to your static Space!</h1> <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p> <p> Also don't forget to check the <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>. </p> </div> </body></html><!DOCTYPE html><html lang="en" class="dark"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>EverythingAI | EVAI Text-to-Speech</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap'); body { font-family: 'Poppins', sans-serif; transition: background-color 0.3s, color 0.3s; } .highlight-word { background-color: rgba(99, 102, 241, 0.3); transition: background-color 0.2s; } .waveform { height: 60px; background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%); mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 20" xmlns="http://www.w3.org/2000/svg"><path d="M0 10 Q 5 5 10 10 T 20 10 T 30 10 T 40 10 T 50 10 T 60 10 T 70 10 T 80 10 T 90 10 T 100 10" stroke="none" fill="black"/></svg>'); mask-size: 100% 100%; animation: wave 2s linear infinite; } @keyframes wave { 0% { mask-position: 0% 0%; } 100% { mask-position: 100% 0%; } } .file-upload:hover .upload-icon { transform: translateY(-5px); } .voice-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); } .progress-bar { transition: width 0.5s ease; } /* Custom scrollbar */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: #f1f1f1; } ::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #555; } .dark ::-webkit-scrollbar-track { background: #374151; } .dark ::-webkit-scrollbar-thumb { background: #6b7280; } .dark ::-webkit-scrollbar-thumb:hover { background: #9ca3af; } </style></head><body class="bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-gray-100 min-h-screen"> <div class="container mx-auto px-4 py-8 max-w-7xl"> <!-- Header --> <header class="flex justify-between items-center mb-8"> <div class="flex items-center space-x-2"> <div class="w-10 h-10 rounded-full bg-gradient-to-r from-indigo-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl">E</div> <h1 class="text-2xl font-bold bg-gradient-to-r from-indigo-500 to-purple-600 bg-clip-text text-transparent">EverythingAI <span class="text-xs bg-gray-200 dark:bg-gray-700 px-2 py-1 rounded-full ml-2 text-gray-700 dark:text-gray-300">EVAI</span></h1> </div> <div class="flex items-center space-x-4"> <button id="darkModeToggle" class="p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition"> <i class="fas fa-moon dark:hidden"></i> <i class="fas fa-sun hidden dark:block"></i> </button> <button class="px-4 py-2 rounded-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white hover:from-indigo-600 hover:to-purple-700 transition"> Sign In </button> </div> </header>
<!-- Main Content --> <main> <div class="grid grid-cols-1 lg:grid-cols-3 gap-8"> <!-- Left Panel - Input & Controls --> <div class="lg:col-span-2 space-y-6"> <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6"> <h2 class="text-xl font-semibold mb-4">Text Input</h2> <div class="flex space-x-2 mb-4"> <button id="pasteBtn" class="px-3 py-1.5 text-sm rounded-lg bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition"> <i class="fas fa-paste mr-1"></i> Paste </button> <div class="file-upload relative flex-1"> <input type="file" id="fileInput" class="absolute inset-0 w-full h-full opacity-0 cursor-pointer" accept=".txt,.pdf,.docx"> <label for="fileInput" class="block px-3 py-1.5 text-sm rounded-lg bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition cursor-pointer flex items-center justify-between"> <span><i class="fas fa-upload mr-1 upload-icon transition"></i> Upload File</span> <span class="text-xs text-gray-500 dark:text-gray-400">.txt, .pdf, .docx</span> </label> </div> <button id="clearBtn" class="px-3 py-1.5 text-sm rounded-lg bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition"> <i class="fas fa-trash-alt mr-1"></i> Clear </button> </div> <div class="relative"> <textarea id="textInput" rows="10" class="w-full px-4 py-3 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition" placeholder="Enter or paste your text here..."></textarea> <div class="absolute bottom-3 right-3 flex items-center space-x-2"> <span id="charCount" class="text-xs text-gray-500 dark:text-gray-400">0 characters</span> <button id="sampleBtn" class="text-xs px-2 py-1 rounded bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition"> Sample Text </button> </div> </div> </div>
<!-- Voice Selection --> <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6"> <h2 class="text-xl font-semibold mb-4">Voice Settings</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <div> <label for="languageSelect" class="block text-sm font-medium mb-1">Language</label> <select id="languageSelect" class="w-full px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition"> <option value="en">English</option> <option value="es">Spanish</option> <option value="fr">French</option> <option value="de">German</option> <option value="zh">Chinese</option> <option value="ja">Japanese</option> <option value="ru">Russian</option> <option value="ar">Arabic</option> <option value="pt">Portuguese</option> <option value="hi">Hindi</option> </select> </div> <div> <label for="voiceSelect" class="block text-sm font-medium mb-1">Voice</label> <select id="voiceSelect" class="w-full px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition"> <option value="female1">Female 1 (Natural)</option> <option value="female2">Female 2 (Soft)</option> <option value="male1">Male 1 (Deep)</option> <option value="male2">Male 2 (Clear)</option> <option value="neutral">Neutral (Professional)</option> </select> </div> </div>
<!-- Advanced Controls --> <div class="space-y-4"> <div> <label class="flex justify-between items-center"> <span class="text-sm font-medium">Speed: <span id="speedValue">1.0</span>x</span> <span class="text-xs text-gray-500 dark:text-gray-400">(0.5x - 2.0x)</span> </label> <input type="range" id="speedSlider" min="0.5" max="2.0" step="0.1" value="1.0" class="w-full h-2 bg-gray-200 dark:bg-gray-600 rounded-lg appearance-none cursor-pointer accent-indigo-500"> </div> <div> <label class="flex justify-between items-center"> <span class="text-sm font-medium">Pitch: <span id="pitchValue">0</span></span> <span class="text-xs text-gray-500 dark:text-gray-400">(-20 to +20)</span> </label> <input type="range" id="pitchSlider" min="-20" max="20" step="1" value="0" class="w-full h-2 bg-gray-200 dark:bg-gray-600 rounded-lg appearance-none cursor-pointer accent-indigo-500"> </div> <div> <label class="flex justify-between items-center"> <span class="text-sm font-medium">Volume: <span id="volumeValue">100</span>%</span> <span class="text-xs text-gray-500 dark:text-gray-400">(0% to 100%)</span> </label> <input type="range" id="volumeSlider" min="0" max="100" step="1" value="100" class="w-full h-2 bg-gray-200 dark:bg-gray-600 rounded-lg appearance-none cursor-pointer accent-indigo-500"> </div> </div>
<!-- SSML Controls --> <div class="mt-6"> <div class="flex items-center justify-between mb-2"> <h3 class="text-sm font-medium">SSML Enhancements</h3> <button id="ssmlHelpBtn" class="text-xs px-2 py-1 rounded bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition"> <i class="fas fa-question-circle mr-1"></i> Help </button> </div> <div class="flex flex-wrap gap-2"> <button class="ssml-btn px-3 py-1 text-xs rounded-lg bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition" data-tag="emphasis" data-level="strong"> <i class="fas fa-bold mr-1"></i> Strong </button> <button class="ssml-btn px-3 py-1 text-xs rounded-lg bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition" data-tag="break" data-time="500ms"> <i class="fas fa-pause mr-1"></i> Pause </button> <button class="ssml-btn px-3 py-1 text-xs rounded-lg bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition" data-tag="say-as" data-interpret="cardinal"> <i class="fas fa-hashtag mr-1"></i> Number </button> <button class="ssml-btn px-3 py-1 text-xs rounded-lg bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition" data-tag="phoneme" data-alphabet="ipa" data-phoneme=""> <i class="fas fa-language mr-1"></i> Phoneme </button> <button class="ssml-btn px-3 py-1 text-xs rounded-lg bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition" data-tag="prosody" data-rate="slow"> <i class="fas fa-tachometer-alt mr-1"></i> Slow </button> </div> </div> </div> </div>
<!-- Right Panel - Output & Preview --> <div class="space-y-6"> <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6"> <h2 class="text-xl font-semibold mb-4">Audio Output</h2> <!-- Audio Player --> <div class="mb-6"> <div class="waveform mb-4 rounded-lg overflow-hidden"></div> <div class="flex items-center justify-center space-x-4"> <button id="playBtn" class="w-12 h-12 rounded-full bg-indigo-500 text-white flex items-center justify-center hover:bg-indigo-600 transition"> <i class="fas fa-play"></i> </button> <button id="pauseBtn" class="w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200 flex items-center justify-center hover:bg-gray-300 dark:hover:bg-gray-600 transition"> <i class="fas fa-pause"></i> </button> <button id="stopBtn" class="w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200 flex items-center justify-center hover:bg-gray-300 dark:hover:bg-gray-600 transition"> <i class="fas fa-stop"></i> </button> </div> <div class="mt-4 flex items-center justify-between text-sm"> <span id="currentTime">0:00</span> <span id="durationTime">0:00</span> </div> <input type="range" id="progressBar" min="0" max="100" value="0" class="w-full h-2 bg-gray-200 dark:bg-gray-600 rounded-lg appearance-none cursor-pointer mt-2 accent-indigo-500"> </div> <!-- Output Options --> <div class="space-y-4"> <div> <label for="outputFormat" class="block text-sm font-medium mb-1">Output Format</label> <select id="outputFormat" class="w-full px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition"> <option value="mp3">MP3 (Recommended)</option> <option value="wav">WAV (High Quality)</option> <option value="ogg">OGG (Smaller Size)</option> </select> </div> <div class="flex space-x-2"> <button id="downloadBtn" class="flex-1 px-4 py-2 rounded-lg bg-indigo-500 text-white hover:bg-indigo-600 transition flex items-center justify-center"> <i class="fas fa-download mr-2"></i> Download </button> <button id="shareBtn" class="flex-1 px-4 py-2 rounded-lg bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 transition flex items-center justify-center"> <i class="fas fa-share-alt mr-2"></i> Share </button> </div> <div id="shareLinkContainer" class="hidden mt-4"> <label class="block text-sm font-medium mb-1">Shareable Link</label> <div class="flex"> <input type="text" id="shareLink" class="flex-1 px-3 py-2 rounded-l-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition" readonly> <button id="copyLinkBtn" class="px-3 py-2 rounded-r-lg bg-indigo-500 text-white hover:bg-indigo-600 transition"> <i class="fas fa-copy"></i> </button> </div> </div> </div> </div> <!-- Preview & Highlight --> <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6"> <h2 class="text-xl font-semibold mb-4">Text Preview</h2> <div id="textPreview" class="h-64 overflow-y-auto p-3 bg-gray-50 dark:bg-gray-700 rounded-lg text-sm leading-relaxed"> <p class="text-gray-500 dark:text-gray-400 italic">Your text will appear here with word-by-word highlighting as it's spoken...</p> </div> </div> <!-- API Status --> <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6"> <h2 class="text-xl font-semibold mb-4">System Status</h2> <div class="space-y-3"> <div> <div class="flex justify-between text-sm mb-1"> <span>Google TTS</span> <span id="googleQuota">4,000,000 chars remaining</span> </div> <div class="w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2"> <div id="googleProgress" class="bg-green-500 h-2 rounded-full progress-bar" style="width: 100%"></div> </div> </div> <div> <div class="flex justify-between text-sm mb-1"> <span>IBM Watson TTS</span> <span id="ibmQuota">10,000 chars remaining</span> </div> <div class="w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2"> <div id="ibmProgress" class="bg-blue-500 h-2 rounded-full progress-bar" style="width: 100%"></div> </div> </div> <div> <div class="flex justify-between text-sm mb-1"> <span>Coqui TTS</span> <span>Self-hosted (unlimited)</span> </div> <div class="w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2"> <div class="bg-purple-500 h-2 rounded-full" style="width: 100%"></div> </div> </div> </div> </div> </div> </div> </main>
<!-- Footer --> <footer class="mt-12 pt-6 border-t border-gray-200 dark:border-gray-700"> <div class="flex flex-col md:flex-row justify-between items-center"> <div class="flex items-center space-x-2 mb-4 md:mb-0"> <div class="w-8 h-8 rounded-full bg-gradient-to-r from-indigo-500 to-purple-600 flex items-center justify-center text-white font-bold text-sm">E</div> <span class="text-sm">EverythingAI (EVAI) Text-to-Speech</span> </div> <div class="flex space-x-4"> <a href="#" class="text-sm hover:text-indigo-500 transition">Terms</a> <a href="#" class="text-sm hover:text-indigo-500 transition">Privacy</a> <a href="#" class="text-sm hover:text-indigo-500 transition">API Docs</a> <a href="#" class="text-sm hover:text-indigo-500 transition">Contact</a> </div> </div> <div class="mt-4 text-center md:text-left text-xs text-gray-500 dark:text-gray-400"> <p>© 2023 EverythingAI. All rights reserved. This demo uses free-tier TTS APIs with rate limits.</p> </div> </footer> </div>
<!-- SSML Help Modal --> <div id="ssmlHelpModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> <div class="bg-white dark:bg-gray-800 rounded-xl shadow-xl p-6 max-w-2xl w-full max-h-[90vh] overflow-y-auto"> <div class="flex justify-between items-center mb-4"> <h3 class="text-xl font-semibold">SSML (Speech Synthesis Markup Language) Help</h3> <button id="closeSsmlHelp" class="p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition"> <i class="fas fa-times"></i> </button> </div> <div class="space-y-4 text-sm"> <p>SSML allows you to control how your text is spoken with special tags and attributes.</p> <div class="bg-gray-50 dark:bg-gray-700 p-4 rounded-lg"> <h4 class="font-medium mb-2">Available SSML Features:</h4> <ul class="space-y-2"> <li><strong>Emphasis:</strong> Make specific words stand out with different levels of emphasis.</li> <li><strong>Pauses/Breaks:</strong> Insert pauses between words or sentences.</li> <li><strong>Numbers/Dates:</strong> Control how numbers, dates, and times are spoken.</li> <li><strong>Phonetic Pronunciation:</strong> Specify exact pronunciation using IPA.</li> <li><strong>Prosody:</strong> Adjust rate, pitch, and volume of speech.</li> </ul> </div> <div> <h4 class="font-medium mb-2">How to use:</h4> <ol class="list-decimal pl-5 space-y-2"> <li>Select the text you want to modify</li> <li>Click the appropriate SSML button</li> <li>The SSML tags will be inserted automatically</li> </ol> </div> <div class="bg-gray-50 dark:bg-gray-700 p-4 rounded-lg"> <h4 class="font-medium mb-2">Example:</h4> <pre class="bg-white dark:bg-gray-800 p-2 rounded text-xs overflow-x-auto"><speak> This is a <emphasis level="strong">very important</emphasis> point. <break time="500ms"/> The number <say-as interpret-as="cardinal">12345</say-as> is large.</speak></pre> </div> </div> </div> </div>
<script> // Dark Mode Toggle const darkModeToggle = document.getElementById('darkModeToggle'); const html = document.documentElement; darkModeToggle.addEventListener('click', () => { html.classList.toggle('dark'); localStorage.setItem('darkMode', html.classList.contains('dark')); }); // Check for saved dark mode preference if (localStorage.getItem('darkMode') === 'true') { html.classList.add('dark'); } else if (localStorage.getItem('darkMode') === 'false') { html.classList.remove('dark'); } else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { html.classList.add('dark'); } // Character Count const textInput = document.getElementById('textInput'); const charCount = document.getElementById('charCount'); textInput.addEventListener('input', () => { const count = textInput.value.length; charCount.textContent = `${count} characters`; // Update preview document.getElementById('textPreview').innerHTML = `<p>${textInput.value.replace(/\n/g, '<br>')}</p>`; }); // Sample Text Button document.getElementById('sampleBtn').addEventListener('click', () => { const sampleText = `Welcome to EverythingAI Text-to-Speech. This is a sample text demonstrating the capabilities of our advanced speech synthesis technology.
You can paste your own text, upload documents, or type directly into this field.
Try adjusting the voice settings to find the perfect tone for your needs. The system supports multiple languages and voice styles.
Remember to use SSML tags for enhanced control over pronunciation and emphasis.`; textInput.value = sampleText; textInput.dispatchEvent(new Event('input')); }); // Clear Button document.getElementById('clearBtn').addEventListener('click', () => { textInput.value = ''; textInput.dispatchEvent(new Event('input')); }); // Paste Button document.getElementById('pasteBtn').addEventListener('click', async () => { try { const text = await navigator.clipboard.readText(); textInput.value = text; textInput.dispatchEvent(new Event('input')); } catch (err) { alert('Failed to paste from clipboard. Please paste manually.'); } }); // File Upload document.getElementById('fileInput').addEventListener('change', (e) => { const file = e.target.files[0]; if (!file) return; const reader = new FileReader(); reader.onload = (event) => { textInput.value = event.target.result; textInput.dispatchEvent(new Event('input')); }; if (file.name.endsWith('.txt')) { reader.readAsText(file); } else { alert('Only plain text (.txt) files are supported in this demo. For PDF and DOCX support, please sign up.'); } }); // Voice Settings Sliders const speedSlider = document.getElementById('speedSlider'); const pitchSlider = document.getElementById('pitchSlider'); const volumeSlider = document.getElementById('volumeSlider'); speedSlider.addEventListener('input', () => { document.getElementById('speedValue').textContent = speedSlider.value; }); pitchSlider.addEventListener('input', () => { document.getElementById('pitchValue').textContent = pitchSlider.value; }); volumeSlider.addEventListener('input', () => { document.getElementById('volumeValue').textContent = volumeSlider.value; }); // SSML Help Modal const ssmlHelpModal = document.getElementById('ssmlHelpModal'); const ssmlHelpBtn = document.getElementById('ssmlHelpBtn'); const closeSsmlHelp = document.getElementById('closeSsmlHelp'); ssmlHelpBtn.addEventListener('click', () => { ssmlHelpModal.classList.remove('hidden'); }); closeSsmlHelp.addEventListener('click', () => { ssmlHelpModal.classList.add('hidden'); }); // SSML Buttons document.querySelectorAll('.ssml-btn').forEach(btn => { btn.addEventListener('click', () => { const tag = btn.dataset.tag; const value = Object.keys(btn.dataset).filter(k => k !== 'tag').map(k => `${k}="${btn.dataset[k]}"`).join(' '); const start = textInput.selectionStart; const end = textInput.selectionEnd; const selectedText = textInput.value.substring(start, end); if (selectedText) { let newText; if (tag === 'phoneme') { const phoneme = prompt('Enter IPA phonetic pronunciation:'); if (phoneme) { newText = `<phoneme alphabet="ipa" ph="${phoneme}">${selectedText}</phoneme>`; } else { return; } } else { newText = `<${tag} ${value}>${selectedText}</${tag}>`; } textInput.value = textInput.value.substring(0, start) + newText + textInput.value.substring(end); textInput.dispatchEvent(new Event('input')); } else { alert('Please select some text first to apply SSML tags.'); } }); }); // Audio Player Controls (simulated) const playBtn = document.getElementById('playBtn'); const pauseBtn = document.getElementById('pauseBtn'); const stopBtn = document.getElementById('stopBtn'); const progressBar = document.getElementById('progressBar'); const currentTime = document.getElementById('currentTime'); const durationTime = document.getElementById('durationTime'); let isPlaying = false; let progressInterval; playBtn.addEventListener('click', () => { if (!textInput.value.trim()) { alert('Please enter some text first.'); return; } isPlaying = true; playBtn.innerHTML = '<i class="fas fa-play"></i>'; // Simulate audio playback with word highlighting const words = textInput.value.split(/\s+/); let currentWord = 0; // Highlight words one by one const highlightInterval = setInterval(() => { if (currentWord >= words.length || !isPlaying) { clearInterval(highlightInterval); return; } // Update preview with highlighting const preview = document.getElementById('textPreview'); let html = '<p>'; for (let i = 0; i < words.length; i++) { if (i === currentWord) { html += `<span class="highlight-word">${words[i]}</span> `; } else { html += `${words[i]} `; } } html += '</p>'; preview.innerHTML = html; // Scroll to highlighted word const highlighted = preview.querySelector('.highlight-word'); if (highlighted) { highlighted.scrollIntoView({ behavior: 'smooth', block: 'center' }); } currentWord++; }, 300); // Adjust speed based on actual speech rate // Simulate progress bar let progress = 0; progressInterval = setInterval(() => { if (progress >= 100 || !isPlaying) { clearInterval(progressInterval); isPlaying = false; playBtn.innerHTML = '<i class="fas fa-play"></i>'; return; } progress += 1; progressBar.value = progress; currentTime.textContent = formatTime(progress); }, 300); // Set duration (simulated) durationTime.textContent = '1:30'; }); pauseBtn.addEventListener('click', () => { isPlaying = false; playBtn.innerHTML = '<i class="fas fa-play"></i>'; }); stopBtn.addEventListener('click', () => { isPlaying = false; progressBar.value = 0; currentTime.textContent = '0:00'; playBtn.innerHTML = '<i class="fas fa-play"></i>'; document.getElementById('textPreview').innerHTML = `<p>${textInput.value.replace(/\n/g, '<br>')}</p>`; }); function formatTime(percent) { const totalSeconds = 90; // 1:30 in seconds const seconds = Math.floor(totalSeconds * percent / 100); const mins = Math.floor(seconds / 60); const secs = seconds % 60; return `${mins}:${secs < 10 ? '0' : ''}${secs}`; } // Download Button document.getElementById('downloadBtn').addEventListener('click', () => { if (!textInput.value.trim()) { alert('Please enter some text first.'); return; } alert('In a real implementation, this would generate and download the audio file. This is a demo.'); }); // Share Button document.getElementById('shareBtn').addEventListener('click', () => { if (!textInput.value.trim()) { alert('Please enter some text first.'); return; } const shareLinkContainer = document.getElementById('shareLinkContainer'); const shareLink = document.getElementById('shareLink'); shareLink.value = `https://everythingai.com/tts/share/${btoa(textInput.value).substring(0, 20)}`; shareLinkContainer.classList.remove('hidden'); }); // Copy Link Button document.getElementById('copyLinkBtn').addEventListener('click', () => { const shareLink = document.getElementById('shareLink'); shareLink.select(); document.execCommand('copy'); const copyBtn = document.getElementById('copyLinkBtn'); copyBtn.innerHTML = '<i class="fas fa-check"></i>'; setTimeout(() => { copyBtn.innerHTML = '<i class="fas fa-copy"></i>'; }, 2000); }); // Simulate API quotas function updateQuotas() { const googleUsed = Math.floor(Math.random() * 500000); const googleTotal = 4000000; const googleRemaining = googleTotal - googleUsed; const ibmUsed = Math.floor(Math.random() * 2000); const ibmTotal = 10000; const ibmRemaining = ibmTotal - ibmUsed; document.getElementById('googleQuota').textContent = `${googleRemaining.toLocaleString()} chars remaining`; document.getElementById('ibmQuota').textContent = `${ibmRemaining.toLocaleString()} chars remaining`; document.getElementById('googleProgress').style.width = `${(googleRemaining / googleTotal) * 100}%`; document.getElementById('ibmProgress').style.width = `${(ibmRemaining / ibmTotal) * 100}%`; } updateQuotas(); setInterval(updateQuotas, 10000); </script><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=Lawancy/evai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>1**Project Title** EverythingAI (Ticker: EVAI) Text‑to‑Speech Web Application **Project Overview** EverythingAI (Ticker: EVAI) seeks a modern, mobile‑friendly web application that converts user‑supplied text into high‑quality spoken audio under the EverythingAI brand. The interface should guide users through pasting or uploading text, selecting voices and settings, and downloading or sharing the resulting audio seamlessly. **Key Features** 1. **Multi‑API Voice Engine** - Integrate at least two **free** or freemium TTS APIs (e.g., Google Cloud Text‑to‑Speech free tier, IBM Watson TTS Lite, Mozilla/Coqui TTS) - Automatic fallback if one API rate‑limits or fails 2. **Voice & Language Selection** - Support for a minimum of 10 languages (en, es, fr, de, zh, ja, ru, ar, pt, hi) - Multiple voice personas (male, female, neutral) per language 3. **SSML & Advanced Controls** - SSML tag support for emphasis, pauses, and pronunciation hints - Real‑time sliders for **speed**, **pitch**, and **volume** adjustments 4. **User Interface & Experience** - EverythingAI branding and color scheme - Drag‑and‑drop or file‑upload of `.txt`, `.docx`, or `.pdf` - Live transcript highlighting as audio plays - Download in MP3 or WAV format, plus shareable link option - Dark mode toggle 5. **Usage Limits & Authentication** - Optional user sign‑up via OAuth (Google/GitHub) to track usage - IP‑based rate‑limiting and per‑user quotas to prevent abuse 6. **Accessibility & Performance** - Keyboard navigation and screen‑reader compatibility - Lazy‑load voices and chunk large texts for smooth performance 7. **Analytics & Monitoring** - Basic dashboard showing daily characters processed and most‑used voices - Error logging and alerting for API failures **Technical Requirements** - **Frontend:** React or Vue (with Tailwind CSS or Bootstrap for responsive UI) - **Backend:** Node.js/Express or Python/Flask (stateless microservice design) - **APIs:** - **Google Cloud TTS** (free tier: 4 million chars/month) - **IBM Watson TTS** (Lite plan: 10 000 chars/month) - **Mozilla/Coqui TTS** as an open‑source fallback (self‑hostable) - **Storage:** AWS S3 (or DigitalOcean Spaces) for audio files - **Deployment:** Dockerized, deployable on AWS ECS, Heroku, or Vercel - **CI/CD:** GitHub Actions or GitLab CI for automated testing/deployment **Deliverables** - Fully functional source code in a public or private Git repository - Deployment scripts and documentation (README, API usage guide) - Demo URL of a live staging site under `everythingai.com` subdomain - Post‑deployment support: 2 weeks of bug‑fix window **Timeline & Budget** - **Proposal Due:** [Date, e.g. May 1, 2025] - **Project Kickoff:** Within 1 week of proposal acceptance - **Phase 1 (MVP):** 3 weeks - **Phase 2 (Enhancements & Polishing):** 2 weeks - **Budget Range:** $3,000–$5,000 (negotiable based on scope) **Evaluation Criteria** - Proven experience building TTS or audio‑processing web apps - Clear use of free API quotas to minimize hosting costs - Strong UI/UX portfolio demonstrating responsive design - Familiarity with EverythingAI (EVAI) brand guidelines and willingness to self‑host open‑source fallback if paid APIs throttleREADME.md+7-5
index.html+680-19
prompts.txtAdded+1