Spaces:
Running
Running
Download index.html from rgxdev/sonic-spectrum-voyager: direct link, hf CLI and curl.
- Browser
- Download file 4.99 kB
-
https://huggingface.co/spaces/rgxdev/sonic-spectrum-voyager/resolve/main/index.html
- Command line
-
hf download hf://spaces/rgxdev/sonic-spectrum-voyager/index.html
-
curl -L -o index.html https://huggingface.co/spaces/rgxdev/sonic-spectrum-voyager/resolve/main/index.html
4.99 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Sonic Spectrum Voyager</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| </head> | |
| <body class="bg-gray-900 text-white min-h-screen"> | |
| <custom-navbar></custom-navbar> | |
| <main class="container mx-auto px-4 py-8"> | |
| <section class="text-center mb-12"> | |
| <h1 class="text-5xl font-bold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-purple-400 to-pink-600">Sonic Spectrum Voyager</h1> | |
| <p class="text-xl text-gray-300 max-w-2xl mx-auto">Visualize your voice or any sound in stunning 3D and 2D representations</p> | |
| </section> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-12"> | |
| <div class="bg-gray-800 rounded-xl p-6 shadow-lg"> | |
| <h2 class="text-2xl font-semibold mb-4">Audio Controls</h2> | |
| <div class="space-y-4"> | |
| <button id="startBtn" class="w-full bg-purple-600 hover:bg-purple-700 text-white py-3 px-6 rounded-lg font-medium transition-colors"> | |
| <i data-feather="mic" class="inline mr-2"></i> Start Listening | |
| </button> | |
| <button id="stopBtn" disabled class="w-full bg-gray-600 text-gray-400 py-3 px-6 rounded-lg font-medium"> | |
| <i data-feather="mic-off" class="inline mr-2"></i> Stop | |
| </button> | |
| <div class="pt-4"> | |
| <label for="visualizerType" class="block text-sm font-medium text-gray-300 mb-2">Visualizer Style</label> | |
| <select id="visualizerType" class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 text-white focus:ring-2 focus:ring-purple-500 focus:border-transparent"> | |
| <option value="bars">Bars</option> | |
| <option value="wave">Waveform</option> | |
| <option value="circle">Circular</option> | |
| <option value="3d">3D Particles</option> | |
| <option value="sphere">3D Audio Sphere</option> | |
| </select> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-800 rounded-xl p-6 shadow-lg"> | |
| <h2 class="text-2xl font-semibold mb-4">Audio Information</h2> | |
| <div class="space-y-4"> | |
| <div> | |
| <p class="text-gray-400">Volume Level</p> | |
| <div class="w-full bg-gray-700 rounded-full h-2.5 mt-2"> | |
| <div id="volumeLevel" class="bg-purple-600 h-2.5 rounded-full" style="width: 0%"></div> | |
| </div> | |
| </div> | |
| <div> | |
| <p class="text-gray-400">Frequency Data</p> | |
| <div class="text-purple-400" id="frequencyData">Waiting for input...</div> | |
| </div> | |
| <div> | |
| <p class="text-gray-400">Status</p> | |
| <p id="statusText" class="text-pink-400">Microphone inactive</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-800 rounded-xl p-6 shadow-lg mb-8"> | |
| <h2 class="text-2xl font-semibold mb-4">Visualizer</h2> | |
| <div class="relative"> | |
| <canvas id="2dCanvas" class="w-full h-64 bg-gray-900 rounded-lg"></canvas> | |
| <div id="3dContainer" class="hidden w-full h-96 bg-gray-900 rounded-lg"></div> | |
| </div> | |
| </div> | |
| </main> | |
| <custom-footer></custom-footer> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/footer.js"></script> | |
| <script src="script.js"></script> | |
| <script> | |
| feather.replace(); | |
| </script> | |
| <!-- Add a permissions check before loading the app --> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', () => { | |
| if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) { | |
| document.getElementById('statusText').textContent = | |
| "Your browser doesn't support microphone access or this feature is blocked."; | |
| document.getElementById('statusText').className = "text-red-400"; | |
| document.getElementById('startBtn').disabled = true; | |
| } | |
| }); | |
| </script> | |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> | |
| </body> | |
| </html> |