Spaces:
Running
Running
it have Text to Generate
Browse files- index.html +15 -9
index.html
CHANGED
|
@@ -82,11 +82,14 @@
|
|
| 82 |
<h2 class="text-2xl font-semibold text-gray-800">Your Transcription</h2>
|
| 83 |
<p class="text-gray-600">See your text appear in real-time</p>
|
| 84 |
<div class="bg-gray-100 rounded-lg p-6 min-h-40 flex flex-col items-center justify-center">
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
| 90 |
<label class="block text-sm text-gray-600 mb-1">Voice Similarity</label>
|
| 91 |
<input type="range" min="0" max="100" value="75" class="w-full accent-indigo-500">
|
| 92 |
</div>
|
|
@@ -262,12 +265,15 @@ const recordingStatus = document.getElementById('recordingStatus');
|
|
| 262 |
updateVoicePreview();
|
| 263 |
}, 5000);
|
| 264 |
});
|
| 265 |
-
|
| 266 |
document.getElementById('generateBtn').addEventListener('click', () => {
|
| 267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 268 |
});
|
| 269 |
-
|
| 270 |
-
document.getElementById('downloadBtn').addEventListener('click', () => {
|
| 271 |
alert('Voice model download started');
|
| 272 |
});
|
| 273 |
</script>
|
|
|
|
| 82 |
<h2 class="text-2xl font-semibold text-gray-800">Your Transcription</h2>
|
| 83 |
<p class="text-gray-600">See your text appear in real-time</p>
|
| 84 |
<div class="bg-gray-100 rounded-lg p-6 min-h-40 flex flex-col items-center justify-center">
|
| 85 |
+
<div id="voicePreview" class="text-center text-gray-500 w-full">
|
| 86 |
+
<i data-feather="user" class="w-8 h-8 mx-auto mb-2"></i>
|
| 87 |
+
<p class="mb-4">Your voice clone will be generated here</p>
|
| 88 |
+
<div class="w-full mb-4">
|
| 89 |
+
<textarea id="textToGenerate" class="w-full p-3 border border-gray-300 rounded-lg resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" rows="3" placeholder="Enter text to generate with your voice clone"></textarea>
|
| 90 |
+
</div>
|
| 91 |
+
<div id="voiceParams" class="w-full space-y-3 hidden">
|
| 92 |
+
<div>
|
| 93 |
<label class="block text-sm text-gray-600 mb-1">Voice Similarity</label>
|
| 94 |
<input type="range" min="0" max="100" value="75" class="w-full accent-indigo-500">
|
| 95 |
</div>
|
|
|
|
| 265 |
updateVoicePreview();
|
| 266 |
}, 5000);
|
| 267 |
});
|
|
|
|
| 268 |
document.getElementById('generateBtn').addEventListener('click', () => {
|
| 269 |
+
const text = document.getElementById('textToGenerate').value.trim();
|
| 270 |
+
if (!text) {
|
| 271 |
+
alert('Please enter some text to generate');
|
| 272 |
+
return;
|
| 273 |
+
}
|
| 274 |
+
alert(`Generating audio from your voice clone: "${text}"`);
|
| 275 |
});
|
| 276 |
+
document.getElementById('downloadBtn').addEventListener('click', () => {
|
|
|
|
| 277 |
alert('Voice model download started');
|
| 278 |
});
|
| 279 |
</script>
|