Aungkyawlinn1999/Myanmarvoice
Update index.html
<!DOCTYPE html> <html lang="my"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Myanmar Voice Generator</title> <style> body { font-family: sans-serif; background: #0f172a; color: #fff; text-align: center; padding: 50px; } textarea { width: 80%; height: 100px; padding: 10px; font-size: 16px; border-radius: 8px; background: #1e293b; color: white; border: 1px solid #475569; } button { background: #2563eb; color: white; border: none; padding: 12px 24px; font-size: 16px; border-radius: 8px; cursor: pointer; margin-top: 20px; } button:hover { background: #1d4ed8; } audio { margin-top: 20px; width: 80%; } </style> </head> <body> <h1>🎙️ မြန်မာ AI Voice Generator</h1> <p>စာသားကို အသံဖိုင်ပြောင်းရန် အောက်တွင် ရိုက်ထည့်ပါ</p> <textarea id="userInput" placeholder="မင်္ဂလာပါ သားရီး..."></textarea><br> <button onclick="generateVoice()">အသံထုတ်ယူရန်</button><br> <audio id="audioPlayer" controls style="display:none;"></audio> <script> function generateVoice() { const text = document.getElementById('userInput').value; if (!text.trim()) { alert('ကျေးဇူးပြု၍ စာ အရင်ရိုက်ထည့်ပါ!'); return; } // Google Translate ရဲ့ အခမဲ့ Text-to-Speech API ကို သုံးခြင်း const encodedText = encodeURIComponent(text); const audioUrl = `https://translate.google.com/translate_tts?ie=UTF-8&q=${encodedText}&tl=my&client=tw-ob`; const player = document.getElementById('audioPlayer'); player.src = audioUrl; player.style.display = 'block'; player.play().catch(e => { alert('အသံဖွင့်ရန် ခလုတ်ကို နှိပ်ပါ'); }); } </script> </body> </html>
Update index.html
Update index.html
initial commit
Duplicate from gradio/gradio-lite-template
