multi-ai / voice-chat.html
aking96's picture
buat Multiple AI dengan tampilan :
05cceec verified
Raw History Blame Contribute Delete
11.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Voice Chat - AI Hub</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
}
.voice-wave {
height: 60px;
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjYwIj48cGF0aCBkPSJNMCwzMCBMMTAsNDAgTDIwLDEwIEwzMCw1MCBMNDAsMTAgTDUwLDQwIEw2MCwxMCBMNzAsMzAgTDgwLDIwIiBzdHJva2U9IiM2ZThlZmIiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0ibm9uZSIgLz48L3N2Zz4=');
background-repeat: repeat-x;
background-position: 0 50%;
}
.pulse-animation {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(110, 142, 251, 0.7); }
70% { box-shadow: 0 0 0 15px rgba(110, 142, 251, 0); }
100% { box-shadow: 0 0 0 0 rgba(110, 142, 251, 0); }
}
</style>
</head>
<body class="bg-gray-50">
<header class="gradient-bg text-white">
<div class="container mx-auto px-6 py-8">
<nav class="flex justify-between items-center">
<a href="index.html" class="text-2xl font-bold">AI Hub</a>
<div class="hidden md:flex space-x-8">
<a href="index.html" class="hover:text-gray-200 transition-all">Home</a>
<a href="index.html#features" class="hover:text-gray-200 transition-all">Features</a>
<a href="index.html#about" class="hover:text-gray-200 transition-all">About</a>
</div>
<button class="md:hidden">
<i data-feather="menu"></i>
</button>
</nav>
<div class="mt-12 text-center pb-12">
<h1 class="text-3xl md:text-5xl font-bold mb-6" data-aos="fade-down">Voice Chat AI</h1>
<p class="text-xl mb-8 max-w-2xl mx-auto" data-aos="fade-up" data-aos-delay="100">
Natural voice conversations with our intelligent AI assistant
</p>
</div>
</div>
</header>
<section class="py-12 bg-white">
<div class="container mx-auto px-6">
<div class="max-w-4xl mx-auto">
<div class="bg-gray-50 rounded-xl shadow-md overflow-hidden mb-8" data-aos="fade-up">
<div class="voice-wave"></div>
<div class="p-6">
<div class="flex items-center justify-center mb-6">
<button class="w-20 h-20 gradient-bg text-white rounded-full flex items-center justify-center pulse-animation" id="voice-button">
<i data-feather="mic" class="w-8 h-8"></i>
</button>
</div>
<div class="text-center">
<p class="text-gray-600 mb-4" id="status-text">Press and hold the microphone button to speak</p>
<p class="text-sm text-gray-500" id="transcript-text"></p>
</div>
</div>
</div>
<div class="bg-gray-50 p-6 rounded-xl shadow-sm mb-12">
<h3 class="font-bold text-lg mb-4">Voice Chat Settings</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Voice</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2">
<option>Female (Natural)</option>
<option>Male (Natural)</option>
<option>Female (Professional)</option>
<option>Male (Professional)</option>
<option>Custom Voice</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Language</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2">
<option>English</option>
<option>Spanish</option>
<option>French</option>
<option>German</option>
<option>Japanese</option>
<option>Chinese</option>
</select>
</div>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">Conversation Style</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2">
<option>Friendly</option>
<option>Professional</option>
<option>Concise</option>
<option>Detailed</option>
<option>Humorous</option>
</select>
</div>
<div class="flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-4">
<button class="gradient-bg text-white px-8 py-3 rounded-lg font-bold hover:opacity-90 transition-all flex-1">
Start Conversation
</button>
<button class="border border-purple-500 text-purple-600 px-8 py-3 rounded-lg font-bold hover:bg-purple-50 transition-all flex-1">
Voice Training
</button>
</div>
</div>
<div class="mb-16">
<h2 class="text-2xl font-bold text-center mb-8">Use Cases</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="bg-gray-100 rounded-xl p-6 shadow-sm" data-aos="fade-up">
<div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center mb-4">
<i data-feather="headphones" class="text-white"></i>
</div>
<h3 class="font-bold text-lg mb-2">Language Learning</h3>
<p class="text-gray-600">Practice conversations in different languages with our AI tutor.</p>
</div>
<div class="bg-gray-100 rounded-xl p-6 shadow-sm" data-aos="fade-up" data-aos-delay="100">
<div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center mb-4">
<i data-feather="shopping-cart" class="text-white"></i>
</div>
<h3 class="font-bold text-lg mb-2">Voice Shopping</h3>
<p class="text-gray-600">Browse and purchase products using just your voice commands.</p>
</div>
<div class="bg-gray-100 rounded-xl p-6 shadow-sm" data-aos="fade-up" data-aos-delay="200">
<div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center mb-4">
<i data-feather="help-circle" class="text-white"></i>
</div>
<h3 class="font-bold text-lg mb-2">Customer Support</h3>
<p class="text-gray-600">Get instant help through natural voice interactions with our AI.</p>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="bg-gray-900 text-white py-12">
<div class="container mx-auto px-6">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-6 md:mb-0">
<h3 class="text-xl font-bold">AI Hub</h3>
<p class="text-gray-400 mt-2">Empowering creativity through artificial intelligence.</p>
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-400 hover:text-white transition-all"><i data-feather="twitter"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition-all"><i data-feather="facebook"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition-all"><i data-feather="instagram"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition-all"><i data-feather="linkedin"></i></a>
</div>
</div>
<div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400">
<p>© 2023 AI Hub. All rights reserved.</p>
</div>
</div>
</footer>
<script>
AOS.init();
feather.replace();
// Demo voice chat functionality
const voiceButton = document.getElementById('voice-button');
const statusText = document.getElementById('status-text');
const transcriptText = document.getElementById('transcript-text');
voiceButton.addEventListener('mousedown', function() {
statusText.textContent = "Listening... Speak now";
transcriptText.textContent = "";
});
voiceButton.addEventListener('mouseup', function() {
statusText.textContent = "Processing your request...";
// Simulate AI response after a delay
setTimeout(() => {
statusText.textContent = "Press and hold the microphone button to speak";
transcriptText.textContent = "You said: Hello, how are you today? | AI Response: I'm doing well, thank you for asking! How can I assist you today?";
}, 1500);
});
// For touch devices
voiceButton.addEventListener('touchstart', function(e) {
e.preventDefault();
statusText.textContent = "Listening... Speak now";
transcriptText.textContent = "";
});
voiceButton.addEventListener('touchend', function(e) {
e.preventDefault();
statusText.textContent = "Processing your request...";
// Simulate AI response after a delay
setTimeout(() => {
statusText.textContent = "Press and hold the microphone button to speak";
transcriptText.textContent = "You said: Hello, how are you today? | AI Response: I'm doing well, thank you for asking! How can I assist you today?";
}, 1500);
});
</script>
</body>
</html>