Spaces:
Running
Running
make it working please.
Browse files- README.md +9 -5
- index.html +255 -18
README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: EchoMimic Magic Mic 🎤
|
| 3 |
+
colorFrom: gray
|
| 4 |
+
colorTo: blue
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://deepsite.hf.co).
|
| 14 |
+
|
index.html
CHANGED
|
@@ -1,19 +1,256 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>EchoMimic - Voice Cloning Wizardry</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
|
| 11 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/RecordRTC/5.6.2/RecordRTC.min.js"></script>
|
| 12 |
+
<style>
|
| 13 |
+
.gradient-bg {
|
| 14 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 15 |
+
}
|
| 16 |
+
.voice-visualizer {
|
| 17 |
+
height: 100px;
|
| 18 |
+
background: rgba(255,255,255,0.1);
|
| 19 |
+
border-radius: 10px;
|
| 20 |
+
position: relative;
|
| 21 |
+
overflow: hidden;
|
| 22 |
+
}
|
| 23 |
+
.voice-bar {
|
| 24 |
+
position: absolute;
|
| 25 |
+
bottom: 0;
|
| 26 |
+
width: 4px;
|
| 27 |
+
background: white;
|
| 28 |
+
border-radius: 2px;
|
| 29 |
+
animation: equalizer 1s infinite alternate;
|
| 30 |
+
}
|
| 31 |
+
@keyframes equalizer {
|
| 32 |
+
0% { height: 10%; }
|
| 33 |
+
100% { height: 100%; }
|
| 34 |
+
}
|
| 35 |
+
</style>
|
| 36 |
+
</head>
|
| 37 |
+
<body class="gradient-bg min-h-screen text-white">
|
| 38 |
+
<div id="waves-bg" class="absolute inset-0"></div>
|
| 39 |
+
<div class="container mx-auto px-4 py-12 relative z-10">
|
| 40 |
+
<header class="text-center mb-12">
|
| 41 |
+
<h1 class="text-5xl font-bold mb-2">EchoMimic</h1>
|
| 42 |
+
<p class="text-xl opacity-90">Your voice cloning wizard ✨</p>
|
| 43 |
+
<div class="w-24 h-1 bg-white mx-auto mt-4 rounded-full"></div>
|
| 44 |
+
</header>
|
| 45 |
+
|
| 46 |
+
<main class="max-w-3xl mx-auto bg-white/10 backdrop-blur-md rounded-xl shadow-2xl overflow-hidden">
|
| 47 |
+
<div class="p-8">
|
| 48 |
+
<div class="flex flex-col md:flex-row gap-8">
|
| 49 |
+
<div class="flex-1">
|
| 50 |
+
<h2 class="text-2xl font-semibold mb-4">Record Your Voice</h2>
|
| 51 |
+
<div class="voice-visualizer mb-6" id="visualizer">
|
| 52 |
+
<!-- Bars will be added via JS -->
|
| 53 |
+
</div>
|
| 54 |
+
<div class="flex gap-4 mb-6">
|
| 55 |
+
<button id="recordBtn" class="flex-1 bg-red-500 hover:bg-red-600 text-white py-3 px-6 rounded-lg flex items-center justify-center gap-2 transition">
|
| 56 |
+
<i data-feather="mic"></i> Record
|
| 57 |
+
</button>
|
| 58 |
+
<button id="stopBtn" disabled class="flex-1 bg-gray-600 text-white py-3 px-6 rounded-lg flex items-center justify-center gap-2 transition opacity-50">
|
| 59 |
+
<i data-feather="square"></i> Stop
|
| 60 |
+
</button>
|
| 61 |
+
</div>
|
| 62 |
+
<div class="mb-6">
|
| 63 |
+
<label class="block mb-2">Voice Name</label>
|
| 64 |
+
<input type="text" placeholder="My Awesome Voice" class="w-full bg-white/20 border border-white/30 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-white">
|
| 65 |
+
</div>
|
| 66 |
+
</div>
|
| 67 |
+
<div class="flex-1">
|
| 68 |
+
<h2 class="text-2xl font-semibold mb-4">Clone Settings</h2>
|
| 69 |
+
<div class="space-y-4 mb-6">
|
| 70 |
+
<div>
|
| 71 |
+
<label class="block mb-1">Pitch</label>
|
| 72 |
+
<input type="range" min="0" max="100" value="50" class="w-full">
|
| 73 |
+
</div>
|
| 74 |
+
<div>
|
| 75 |
+
<label class="block mb-1">Speed</label>
|
| 76 |
+
<input type="range" min="50" max="150" value="100" class="w-full">
|
| 77 |
+
</div>
|
| 78 |
+
<div>
|
| 79 |
+
<label class="block mb-1">Emotion</label>
|
| 80 |
+
<select class="w-full bg-white/20 border border-white/30 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-white">
|
| 81 |
+
<option>Neutral</option>
|
| 82 |
+
<option>Happy</option>
|
| 83 |
+
<option>Sad</option>
|
| 84 |
+
<option>Angry</option>
|
| 85 |
+
<option>Excited</option>
|
| 86 |
+
</select>
|
| 87 |
+
</div>
|
| 88 |
+
</div>
|
| 89 |
+
<button class="w-full bg-purple-600 hover:bg-purple-700 text-white py-3 px-6 rounded-lg flex items-center justify-center gap-2 transition">
|
| 90 |
+
<i data-feather="copy"></i> Clone Voice
|
| 91 |
+
</button>
|
| 92 |
+
</div>
|
| 93 |
+
</div>
|
| 94 |
+
</div>
|
| 95 |
+
</main>
|
| 96 |
+
|
| 97 |
+
<section class="mt-16 max-w-4xl mx-auto">
|
| 98 |
+
<h2 class="text-2xl font-semibold mb-6 text-center">Your Voice Library</h2>
|
| 99 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
| 100 |
+
<div class="bg-white/10 backdrop-blur-md rounded-lg p-4 hover:bg-white/20 transition cursor-pointer">
|
| 101 |
+
<div class="flex items-center gap-3 mb-3">
|
| 102 |
+
<div class="w-12 h-12 rounded-full bg-purple-500 flex items-center justify-center">
|
| 103 |
+
<i data-feather="user"></i>
|
| 104 |
+
</div>
|
| 105 |
+
<div>
|
| 106 |
+
<h3 class="font-medium">My Normal Voice</h3>
|
| 107 |
+
<p class="text-sm opacity-80">Recorded: 2 days ago</p>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
<audio controls class="w-full mt-2">
|
| 111 |
+
<source src="#" type="audio/mpeg">
|
| 112 |
+
</audio>
|
| 113 |
+
</div>
|
| 114 |
+
<div class="bg-white/10 backdrop-blur-md rounded-lg p-4 hover:bg-white/20 transition cursor-pointer">
|
| 115 |
+
<div class="flex items-center gap-3 mb-3">
|
| 116 |
+
<div class="w-12 h-12 rounded-full bg-blue-500 flex items-center justify-center">
|
| 117 |
+
<i data-feather="user"></i>
|
| 118 |
+
</div>
|
| 119 |
+
<div>
|
| 120 |
+
<h3 class="font-medium">Deep Voice</h3>
|
| 121 |
+
<p class="text-sm opacity-80">Recorded: 1 week ago</p>
|
| 122 |
+
</div>
|
| 123 |
+
</div>
|
| 124 |
+
<audio controls class="w-full mt-2">
|
| 125 |
+
<source src="#" type="audio/mpeg">
|
| 126 |
+
</audio>
|
| 127 |
+
</div>
|
| 128 |
+
<div class="bg-white/10 backdrop-blur-md rounded-lg p-4 hover:bg-white/20 transition cursor-pointer">
|
| 129 |
+
<div class="flex items-center gap-3 mb-3">
|
| 130 |
+
<div class="w-12 h-12 rounded-full bg-green-500 flex items-center justify-center">
|
| 131 |
+
<i data-feather="user"></i>
|
| 132 |
+
</div>
|
| 133 |
+
<div>
|
| 134 |
+
<h3 class="font-medium">Happy Voice</h3>
|
| 135 |
+
<p class="text-sm opacity-80">Recorded: 3 days ago</p>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
<audio controls class="w-full mt-2">
|
| 139 |
+
<source src="#" type="audio/mpeg">
|
| 140 |
+
</audio>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
</section>
|
| 144 |
+
</div>
|
| 145 |
+
|
| 146 |
+
<footer class="py-6 text-center text-sm opacity-80 mt-16">
|
| 147 |
+
<p>© 2023 EchoMimic - Clone voices like magic ✨</p>
|
| 148 |
+
</footer>
|
| 149 |
+
|
| 150 |
+
<script>
|
| 151 |
+
// Initialize Vanta.js waves background
|
| 152 |
+
VANTA.WAVES({
|
| 153 |
+
el: "#waves-bg",
|
| 154 |
+
mouseControls: true,
|
| 155 |
+
touchControls: true,
|
| 156 |
+
gyroControls: false,
|
| 157 |
+
minHeight: 200.00,
|
| 158 |
+
minWidth: 200.00,
|
| 159 |
+
scale: 1.00,
|
| 160 |
+
scaleMobile: 1.00,
|
| 161 |
+
color: 0x7b72d0,
|
| 162 |
+
shininess: 77.00,
|
| 163 |
+
waveHeight: 15.00,
|
| 164 |
+
waveSpeed: 0.75,
|
| 165 |
+
zoom: 1.00
|
| 166 |
+
});
|
| 167 |
+
|
| 168 |
+
// Create visualizer bars
|
| 169 |
+
const visualizer = document.getElementById('visualizer');
|
| 170 |
+
for (let i = 0; i < 50; i++) {
|
| 171 |
+
const bar = document.createElement('div');
|
| 172 |
+
bar.className = 'voice-bar';
|
| 173 |
+
bar.style.left = `${i * 6}px`;
|
| 174 |
+
bar.style.animationDelay = `${i * 0.05}s`;
|
| 175 |
+
visualizer.appendChild(bar);
|
| 176 |
+
}
|
| 177 |
+
// Audio recording functionality
|
| 178 |
+
let mediaRecorder;
|
| 179 |
+
let audioChunks = [];
|
| 180 |
+
const recordBtn = document.getElementById('recordBtn');
|
| 181 |
+
const stopBtn = document.getElementById('stopBtn');
|
| 182 |
+
|
| 183 |
+
recordBtn.addEventListener('click', async () => {
|
| 184 |
+
try {
|
| 185 |
+
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
| 186 |
+
mediaRecorder = new MediaRecorder(stream);
|
| 187 |
+
|
| 188 |
+
mediaRecorder.ondataavailable = (e) => {
|
| 189 |
+
audioChunks.push(e.data);
|
| 190 |
+
};
|
| 191 |
+
|
| 192 |
+
mediaRecorder.onstop = () => {
|
| 193 |
+
const audioBlob = new Blob(audioChunks, { type: 'audio/wav' });
|
| 194 |
+
const audioUrl = URL.createObjectURL(audioBlob);
|
| 195 |
+
|
| 196 |
+
// Create new voice entry
|
| 197 |
+
const voiceLibrary = document.querySelector('.grid');
|
| 198 |
+
const newVoice = document.createElement('div');
|
| 199 |
+
newVoice.className = 'bg-white/10 backdrop-blur-md rounded-lg p-4 hover:bg-white/20 transition cursor-pointer';
|
| 200 |
+
newVoice.innerHTML = `
|
| 201 |
+
<div class="flex items-center gap-3 mb-3">
|
| 202 |
+
<div class="w-12 h-12 rounded-full bg-pink-500 flex items-center justify-center">
|
| 203 |
+
<i data-feather="user"></i>
|
| 204 |
+
</div>
|
| 205 |
+
<div>
|
| 206 |
+
<h3 class="font-medium">New Recording</h3>
|
| 207 |
+
<p class="text-sm opacity-80">Recorded: Just now</p>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
<audio controls class="w-full mt-2">
|
| 211 |
+
<source src="${audioUrl}" type="audio/wav">
|
| 212 |
+
</audio>
|
| 213 |
+
`;
|
| 214 |
+
voiceLibrary.prepend(newVoice);
|
| 215 |
+
feather.replace();
|
| 216 |
+
audioChunks = [];
|
| 217 |
+
};
|
| 218 |
+
|
| 219 |
+
mediaRecorder.start();
|
| 220 |
+
recordBtn.disabled = true;
|
| 221 |
+
recordBtn.classList.add('opacity-50');
|
| 222 |
+
stopBtn.disabled = false;
|
| 223 |
+
stopBtn.classList.remove('opacity-50');
|
| 224 |
+
|
| 225 |
+
// Animate visualizer while recording
|
| 226 |
+
const bars = document.querySelectorAll('.voice-bar');
|
| 227 |
+
bars.forEach(bar => {
|
| 228 |
+
bar.style.animationDuration = '0.1s';
|
| 229 |
+
bar.style.animationIterationCount = 'infinite';
|
| 230 |
+
});
|
| 231 |
+
|
| 232 |
+
} catch (err) {
|
| 233 |
+
console.error('Error accessing microphone:', err);
|
| 234 |
+
alert('Could not access microphone. Please check permissions.');
|
| 235 |
+
}
|
| 236 |
+
});
|
| 237 |
+
|
| 238 |
+
stopBtn.addEventListener('click', () => {
|
| 239 |
+
mediaRecorder.stop();
|
| 240 |
+
recordBtn.disabled = false;
|
| 241 |
+
recordBtn.classList.remove('opacity-50');
|
| 242 |
+
stopBtn.disabled = true;
|
| 243 |
+
stopBtn.classList.add('opacity-50');
|
| 244 |
+
|
| 245 |
+
// Reset visualizer animation
|
| 246 |
+
const bars = document.querySelectorAll('.voice-bar');
|
| 247 |
+
bars.forEach(bar => {
|
| 248 |
+
bar.style.animationDuration = '1s';
|
| 249 |
+
bar.style.animationIterationCount = 'infinite';
|
| 250 |
+
});
|
| 251 |
+
});
|
| 252 |
+
// Initialize feather icons
|
| 253 |
+
feather.replace();
|
| 254 |
+
</script>
|
| 255 |
+
</body>
|
| 256 |
</html>
|