Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>MeetMinutes AI | Smart Meeting Notes</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .gradient-bg { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| } | |
| .pulse-animation { | |
| animation: pulse 2s infinite; | |
| } | |
| @keyframes pulse { | |
| 0% { transform: scale(1); } | |
| 50% { transform: scale(1.05); } | |
| 100% { transform: scale(1); } | |
| } | |
| .fade-in { | |
| animation: fadeIn 0.5s ease-in; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; } | |
| to { opacity: 1; } | |
| } | |
| .transcript-container { | |
| max-height: 300px; | |
| overflow-y: auto; | |
| scrollbar-width: thin; | |
| background: rgba(249, 250, 251, 0.8); | |
| backdrop-filter: blur(5px); | |
| border-radius: 0.75rem; | |
| box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); | |
| } | |
| .transcript-container::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| .transcript-container::-webkit-scrollbar-thumb { | |
| background-color: rgba(156, 163, 175, 0.5); | |
| border-radius: 3px; | |
| } | |
| .highlight-decision { | |
| background-color: rgba(167, 243, 208, 0.2); | |
| border-left: 4px solid #10b981; | |
| box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1); | |
| } | |
| .highlight-task { | |
| background-color: rgba(191, 219, 254, 0.2); | |
| border-left: 4px solid #3b82f6; | |
| box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1); | |
| } | |
| .highlight-question { | |
| background-color: rgba(253, 230, 138, 0.2); | |
| border-left: 4px solid #f59e0b; | |
| box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1); | |
| } | |
| .highlight-deadline { | |
| background-color: rgba(252, 231, 243, 0.2); | |
| border-left: 4px solid #ec4899; | |
| box-shadow: 0 2px 4px rgba(236, 72, 153, 0.1); | |
| } | |
| .speaker-bubble { | |
| border-radius: 1rem; | |
| padding: 0.75rem 1rem; | |
| margin-bottom: 0.75rem; | |
| max-width: 85%; | |
| position: relative; | |
| opacity: 0; | |
| animation: fadeIn 0.3s ease-in forwards; | |
| } | |
| .speaker-you { | |
| background-color: #6366f1; | |
| color: white; | |
| align-self: flex-end; | |
| margin-left: 15%; | |
| } | |
| .speaker-other { | |
| background-color: #f3f4f6; | |
| color: #1f2937; | |
| align-self: flex-start; | |
| margin-right: 15%; | |
| } | |
| .speaker-name { | |
| font-weight: 600; | |
| font-size: 0.875rem; | |
| margin-bottom: 0.25rem; | |
| } | |
| .real-time-indicator { | |
| position: absolute; | |
| top: -8px; | |
| right: -8px; | |
| width: 16px; | |
| height: 16px; | |
| background-color: #ef4444; | |
| border-radius: 50%; | |
| animation: pulse 1.5s infinite; | |
| border: 2px solid white; | |
| } | |
| .language-selector.active { | |
| background-color: #6366f1 ; | |
| color: white ; | |
| } | |
| .glow-effect { | |
| box-shadow: 0 0 10px rgba(99, 102, 241, 0.7); | |
| } | |
| .recording-animation { | |
| animation: recordingPulse 1.5s infinite; | |
| } | |
| @keyframes recordingPulse { | |
| 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } | |
| 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } | |
| 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } | |
| } | |
| .typing-indicator { | |
| display: inline-block; | |
| width: 12px; | |
| height: 12px; | |
| background-color: #9ca3af; | |
| border-radius: 50%; | |
| margin-right: 4px; | |
| animation: typingAnimation 1.4s infinite ease-in-out; | |
| } | |
| .typing-indicator:nth-child(2) { | |
| animation-delay: 0.2s; | |
| } | |
| .typing-indicator:nth-child(3) { | |
| animation-delay: 0.4s; | |
| } | |
| @keyframes typingAnimation { | |
| 0%, 60%, 100% { transform: translateY(0); } | |
| 30% { transform: translateY(-5px); } | |
| } | |
| .typewriter { | |
| overflow: hidden; | |
| border-right: .15em solid #6366f1; | |
| white-space: nowrap; | |
| margin: 0 auto; | |
| letter-spacing: .15em; | |
| animation: | |
| typing 3.5s steps(40, end), | |
| blink-caret .75s step-end infinite; | |
| } | |
| @keyframes typing { | |
| from { width: 0 } | |
| to { width: 100% } | |
| } | |
| @keyframes blink-caret { | |
| from, to { border-color: transparent } | |
| 50% { border-color: #6366f1; } | |
| } | |
| .highlight-icon { | |
| font-size: 1.25rem; | |
| margin-right: 0.75rem; | |
| min-width: 24px; | |
| text-align: center; | |
| } | |
| .highlight-item { | |
| transition: all 0.2s ease; | |
| margin-bottom: 0.75rem; | |
| padding: 1rem; | |
| border-radius: 0.5rem; | |
| display: flex; | |
| align-items: flex-start; | |
| } | |
| .highlight-item:hover { | |
| transform: translateX(5px); | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen"> | |
| <div class="gradient-bg text-white"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center space-x-2"> | |
| <i class="fas fa-clock text-2xl"></i> | |
| <h1 class="text-2xl font-bold">MeetMinutes AI</h1> | |
| </div> | |
| <button id="auth-btn" class="bg-white text-indigo-600 px-4 py-2 rounded-lg font-medium hover:bg-gray-100 transition flex items-center space-x-2"> | |
| <i class="fab fa-google mr-1"></i> | |
| <span>Connect Google Meet</span> | |
| </button> | |
| </div> | |
| <div class="mt-12 text-center"> | |
| <h2 class="text-4xl font-bold mb-4">Never Miss Important Meeting Details Again</h2> | |
| <p class="text-xl max-w-2xl mx-auto">AI-powered transcription, translation, and smart summarization for your Google Meet calls</p> | |
| </div> | |
| <div class="mt-8 max-w-4xl mx-auto bg-white rounded-xl shadow-lg overflow-hidden" id="meeting-container"> | |
| <div class="p-6"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <div class="flex items-center space-x-3"> | |
| <h3 class="text-xl font-semibold text-gray-800">Current Meeting</h3> | |
| <div id="meeting-timer" class="text-sm bg-gray-100 px-2 py-1 rounded-md text-gray-600 hidden"> | |
| <i class="fas fa-clock mr-1"></i> | |
| <span>00:00:00</span> | |
| </div> | |
| </div> | |
| <div class="flex space-x-2"> | |
| <button id="start-btn" class="bg-green-500 text-white px-4 py-2 rounded-lg hover:bg-green-600 transition flex items-center space-x-2"> | |
| <i class="fas fa-microphone"></i> | |
| <span>Start Recording</span> | |
| </button> | |
| <button id="stop-btn" class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition hidden flex items-center space-x-2 recording-animation"> | |
| <i class="fas fa-stop"></i> | |
| <span>Stop</span> | |
| </button> | |
| </div> | |
| </div> | |
| <div id="recording-status" class="hidden mb-6 bg-blue-50 text-blue-800 p-4 rounded-lg flex items-center"> | |
| <div class="pulse-animation mr-3"> | |
| <i class="fas fa-circle text-red-500"></i> | |
| </div> | |
| <span>Recording meeting in progress...</span> | |
| </div> | |
| <div id="transcription-container" class="hidden"> | |
| <div class="mb-6"> | |
| <label class="block text-gray-700 mb-2">Select Output Language:</label> | |
| <div class="flex space-x-4"> | |
| <button id="english-btn" class="language-btn bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 transition flex items-center space-x-2 active"> | |
| <i class="fas fa-language"></i> | |
| <span>English</span> | |
| </button> | |
| <button id="swahili-btn" class="language-btn bg-indigo-100 text-indigo-700 px-4 py-2 rounded-lg hover:bg-indigo-200 transition flex items-center space-x-2"> | |
| <i class="fas fa-language"></i> | |
| <span>Swahili</span> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <div class="flex justify-between items-center mb-2"> | |
| <label class="block text-gray-700">Meeting Transcript:</label> | |
| <div id="typing-status" class="text-sm text-gray-500 flex items-center hidden"> | |
| <span class="mr-2">AI is processing</span> | |
| <div class="typing-indicator"></div> | |
| <div class="typing-indicator"></div> | |
| <div class="typing-indicator"></div> | |
| </div> | |
| </div> | |
| <div id="transcript" class="transcript-container p-4 flex flex-col space-y-3"> | |
| <!-- Transcript will appear here --> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <div> | |
| <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center"> | |
| <i class="fas fa-star mr-2 text-yellow-500"></i> | |
| Key Highlights | |
| </h4> | |
| <div id="highlights" class="space-y-3"> | |
| <!-- Enhanced highlights will appear here --> | |
| </div> | |
| </div> | |
| <div> | |
| <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center"> | |
| <i class="fas fa-file-alt mr-2 text-indigo-500"></i> | |
| Meeting Summary | |
| </h4> | |
| <div id="summary" class="bg-indigo-50 p-4 rounded-lg text-gray-700 min-h-[150px]"> | |
| <!-- Summary will appear here --> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mt-6 flex justify-end space-x-3"> | |
| <button id="copy-btn" class="bg-gray-200 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-300 transition flex items-center space-x-2"> | |
| <i class="fas fa-copy"></i> | |
| <span>Copy Notes</span> | |
| </button> | |
| <button id="download-btn" class="bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 transition flex items-center space-x-2"> | |
| <i class="fas fa-download"></i> | |
| <span>Download</span> | |
| </button> | |
| <button id="share-btn" class="bg-green-500 text-white px-4 py-2 rounded-lg hover:bg-green-600 transition flex items-center space-x-2"> | |
| <i class="fas fa-share-alt"></i> | |
| <span>Share</span> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="container mx-auto px-4 py-12"> | |
| <h2 class="text-3xl font-bold text-center text-gray-800 mb-8">How It Works</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-8"> | |
| <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition transform hover:-translate-y-1"> | |
| <div class="text-indigo-600 mb-4"> | |
| <i class="fas fa-microphone text-4xl"></i> | |
| </div> | |
| <h3 class="text-xl font-semibold mb-2">1. Record Your Meeting</h3> | |
| <p class="text-gray-600">Simply click "Start Recording" when your Google Meet begins. Our AI will automatically capture all audio.</p> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition transform hover:-translate-y-1"> | |
| <div class="text-indigo-600 mb-4"> | |
| <i class="fas fa-language text-4xl"></i> | |
| </div> | |
| <h3 class="text-xl font-semibold mb-2">2. Choose Your Language</h3> | |
| <p class="text-gray-600">Select between English or Swahili for your transcript. The AI will translate naturally while preserving meaning.</p> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition transform hover:-translate-y-1"> | |
| <div class="text-indigo-600 mb-4"> | |
| <i class="fas fa-lightbulb text-4xl"></i> | |
| </div> | |
| <h3 class="text-xl font-semibold mb-2">3. Get Smart Insights</h3> | |
| <p class="text-gray-600">Automatically highlights decisions, tasks, questions, and deadlines with a concise 30-second summary.</p> | |
| </div> | |
| </div> | |
| </div> | |
| <footer class="bg-gray-800 text-white py-8"> | |
| <div class="container mx-auto px-4"> | |
| <div class="flex flex-col md:flex-row justify-between items-center"> | |
| <div class="mb-4 md:mb-0"> | |
| <div class="flex items-center space-x-2"> | |
| <i class="fas fa-clock text-2xl"></i> | |
| <h2 class="text-xl font-bold">MeetMinutes AI</h2> | |
| </div> | |
| <p class="text-gray-400 mt-2">Powered by Gemini AI</p> | |
| </div> | |
| <div class="flex space-x-6"> | |
| <a href="#" class="hover:text-indigo-300 transition"><i class="fab fa-twitter"></i></a> | |
| <a href="#" class="hover:text-indigo-300 transition"><i class="fab fa-linkedin"></i></a> | |
| <a href="#" class="hover:text-indigo-300 transition"><i class="fab fa-github"></i></a> | |
| </div> | |
| </div> | |
| <div class="mt-8 text-center text-gray-400 text-sm"> | |
| © 2023 MeetMinutes AI. All rights reserved. | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Mock data for demonstration | |
| const mockTranscript = [ | |
| { speaker: "John", text: "Good morning team. Let's start with the Q2 results. We exceeded our targets by 15% which is great news.", time: "00:00:12" }, | |
| { speaker: "Sarah", text: "That's fantastic! Should we plan a team celebration for next Friday?", time: "00:00:32" }, | |
| { speaker: "Mark", text: "Before we decide on that, we need to address the server issues that caused downtime last week. Who's responsible for implementing the fix?", time: "00:00:48" }, | |
| { speaker: "Lisa", text: "That would be me. I'll have the patch ready by Wednesday EOD.", time: "00:01:15" }, | |
| { speaker: "John", text: "Excellent. Also, regarding the new client project, when can we expect the first prototype?", time: "00:01:32" }, | |
| { speaker: "Sarah", text: "The design team will complete it by next Monday. Do we need to present it to the client?", time: "00:01:55" }, | |
| { speaker: "Mark", text: "Yes, let's schedule a demo for next Wednesday at 2 PM. Lisa, can you handle the technical aspects?", time: "00:02:18" }, | |
| { speaker: "Lisa", text: "Sure, I'll prepare the demo environment.", time: "00:02:35" }, | |
| { speaker: "John", text: "Great. Any other questions before we wrap up?", time: "00:02:48" }, | |
| { speaker: "Sarah", text: "Just one - what's the budget for the team celebration?", time: "00:03:02" }, | |
| { speaker: "John", text: "Let's cap it at $500. Sarah, you can coordinate with finance.", time: "00:03:15" }, | |
| { speaker: "Mark", text: "Sounds good. Meeting adjourned.", time: "00:03:32" } | |
| ]; | |
| const mockSwahiliTranscript = [ | |
| { speaker: "John", text: "Habari za asubuhi timu. Wacha tuanze na matokeo ya Q2. Tulizidi malengo yetu kwa 15% ambayo ni habari njema.", time: "00:00:12" }, | |
| { speaker: "Sarah", text: "Hiyo ni nzuri! Je, tunapaswa kupanga sherehe ya timu kwa Ijumaa ijayo?", time: "00:00:32" }, | |
| { speaker: "Mark", text: "Kabla ya kuamua juu ya hilo, tunahitaji kushughulikia matatizo ya seva ambayo yalisababisha kushuka kwa wakati wa kazi wiki iliyopita. Nani anahusika na utekelezaji wa kurekebisha?", time: "00:00:48" }, | |
| { speaker: "Lisa", text: "Hiyo itakuwa mimi. Nitakuwa na kiraka tayari kwa Jumatano mwisho wa siku.", time: "00:01:15" }, | |
| { speaker: "John", text: "Bora. Pia, kuhusu mradi mpya wa mteja, lini tunaweza kutarajia mfano wa kwanza?", time: "00:01:32" }, | |
| { speaker: "Sarah", text: "Timu ya kubuni itakamilisha kwa Jumatatu ijayo. Je, tunahitaji kuwasilisha kwa mteja?", time: "00:01:55" }, | |
| { speaker: "Mark", text: "Ndio, wacha tuweke ratiba ya onyesho kwa Jumatano ijayo saa 2 asubuhi. Lisa, unaweza kushughulikia mambo ya kiufundi?", time: "00:02:18" }, | |
| { speaker: "Lisa", text: "Hakika, nitatayarisha mazingira ya onyesho.", time: "00:02:35" }, | |
| { speaker: "John", text: "Vizuri. Maswali mengine yoyote kabla ya kumaliza?", time: "00:02:48" }, | |
| { speaker: "Sarah", text: "Moja tu - ni bajeti gani ya sherehe ya timu?", time: "00:03:02" }, | |
| { speaker: "John", text: "Wacha tuweke kikomo cha $500. Sarah, unaweza kuratibu na fedha.", time: "00:03:15" }, | |
| { speaker: "Mark", text: "Inasikika vizuri. Mkutano umekwisha.", time: "00:03:32" } | |
| ]; | |
| const mockHighlights = [ | |
| { type: "decision", text: "Team celebration approved for next Friday with $500 budget" }, | |
| { type: "task", text: "Lisa to implement server fix by Wednesday EOD" }, | |
| { type: "task", text: "Sarah to coordinate team celebration with finance" }, | |
| { type: "question", text: "When will the new client project prototype be ready?" }, | |
| { type: "deadline", text: "Design team to complete prototype by next Monday" }, | |
| { type: "decision", text: "Client demo scheduled for next Wednesday at 2 PM" }, | |
| { type: "task", text: "Lisa to prepare demo environment for client presentation" } | |
| ]; | |
| const mockSummary = "The team discussed Q2 results which exceeded targets by 15%. Approved a team celebration for next Friday with $500 budget. Lisa will fix server issues by Wednesday. New client prototype due Monday with demo scheduled for Wednesday at 2 PM."; | |
| // DOM elements | |
| const startBtn = document.getElementById('start-btn'); | |
| const stopBtn = document.getElementById('stop-btn'); | |
| const recordingStatus = document.getElementById('recording-status'); | |
| const transcriptionContainer = document.getElementById('transcription-container'); | |
| const transcriptEl = document.getElementById('transcript'); | |
| const highlightsEl = document.getElementById('highlights'); | |
| const summaryEl = document.getElementById('summary'); | |
| const englishBtn = document.getElementById('english-btn'); | |
| const swahiliBtn = document.getElementById('swahili-btn'); | |
| const copyBtn = document.getElementById('copy-btn'); | |
| const downloadBtn = document.getElementById('download-btn'); | |
| const shareBtn = document.getElementById('share-btn'); | |
| const authBtn = document.getElementById('auth-btn'); | |
| const meetingTimer = document.getElementById('meeting-timer'); | |
| const typingStatus = document.getElementById('typing-status'); | |
| const meetingContainer = document.getElementById('meeting-container'); | |
| // State variables | |
| let currentLanguage = 'english'; | |
| let isRecording = false; | |
| let timerInterval; | |
| let seconds = 0; | |
| let currentTranscriptIndex = 0; | |
| let transcriptInterval; | |
| let isProcessing = false; | |
| // Event listeners | |
| startBtn.addEventListener('click', startRecording); | |
| stopBtn.addEventListener('click', stopRecording); | |
| englishBtn.addEventListener('click', () => switchLanguage('english')); | |
| swahiliBtn.addEventListener('click', () => switchLanguage('swahili')); | |
| copyBtn.addEventListener('click', copyNotes); | |
| downloadBtn.addEventListener('click', downloadNotes); | |
| shareBtn.addEventListener('click', shareNotes); | |
| authBtn.addEventListener('click', connectGoogleMeet); | |
| // Functions | |
| function startRecording() { | |
| isRecording = true; | |
| startBtn.classList.add('hidden'); | |
| stopBtn.classList.remove('hidden'); | |
| recordingStatus.classList.remove('hidden'); | |
| meetingTimer.classList.remove('hidden'); | |
| // Start timer | |
| seconds = 0; | |
| updateTimer(); | |
| timerInterval = setInterval(updateTimer, 1000); | |
| // Start simulating real-time transcription | |
| currentTranscriptIndex = 0; | |
| transcriptEl.innerHTML = ''; | |
| transcriptInterval = setInterval(addTranscriptLine, 2000); | |
| // Add glow effect to meeting container | |
| meetingContainer.classList.add('glow-effect'); | |
| // Enable language buttons | |
| englishBtn.disabled = false; | |
| swahiliBtn.disabled = false; | |
| } | |
| function stopRecording() { | |
| isRecording = false; | |
| startBtn.classList.remove('hidden'); | |
| stopBtn.classList.add('hidden'); | |
| recordingStatus.classList.add('hidden'); | |
| clearInterval(timerInterval); | |
| clearInterval(transcriptInterval); | |
| // Show transcription UI | |
| transcriptionContainer.classList.remove('hidden'); | |
| transcriptionContainer.classList.add('fade-in'); | |
| // Remove glow effect | |
| meetingContainer.classList.remove('glow-effect'); | |
| // Process highlights and summary | |
| processHighlightsAndSummary(); | |
| } | |
| function updateTimer() { | |
| seconds++; | |
| const hours = Math.floor(seconds / 3600); | |
| const minutes = Math.floor((seconds % 3600) / 60); | |
| const secs = seconds % 60; | |
| meetingTimer.innerHTML = ` | |
| <i class="fas fa-clock mr-1"></i> | |
| <span>${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(secs).padStart(2, '0')}</span> | |
| `; | |
| } | |
| function addTranscriptLine() { | |
| if (currentTranscriptIndex >= mockTranscript.length) { | |
| clearInterval(transcriptInterval); | |
| return; | |
| } | |
| const transcript = currentLanguage === 'english' ? mockTranscript : mockSwahiliTranscript; | |
| const line = transcript[currentTranscriptIndex]; | |
| const speakerDiv = document.createElement('div'); | |
| speakerDiv.className = `speaker-bubble ${line.speaker === 'You' ? 'speaker-you' : 'speaker-other'}`; | |
| speakerDiv.innerHTML = ` | |
| <div class="speaker-name">${line.speaker} <span class="text-xs opacity-70">${line.time}</span></div> | |
| <div>${line.text}</div> | |
| ${currentTranscriptIndex === mockTranscript.length - 1 ? '<div class="real-time-indicator"></div>' : ''} | |
| `; | |
| transcriptEl.appendChild(speakerDiv); | |
| transcriptEl.scrollTop = transcriptEl.scrollHeight; | |
| currentTranscriptIndex++; | |
| } | |
| function switchLanguage(language) { | |
| if (isProcessing || currentLanguage === language) return; | |
| isProcessing = true; | |
| currentLanguage = language; | |
| // Update active button state | |
| if (language === 'english') { | |
| englishBtn.classList.add('active'); | |
| swahiliBtn.classList.remove('active'); | |
| } else { | |
| englishBtn.classList.remove('active'); | |
| swahiliBtn.classList.add('active'); | |
| } | |
| // Show processing state | |
| const originalTranscript = transcriptEl.innerHTML; | |
| transcriptEl.innerHTML = ` | |
| <div class="flex justify-center items-center h-full py-8"> | |
| <div class="text-center"> | |
| <i class="fas fa-language text-4xl text-indigo-500 mb-3"></i> | |
| <p class="text-gray-600">Translating to ${language === 'english' ? 'English' : 'Swahili'}...</p> | |
| </div> | |
| </div> | |
| `; | |
| // Simulate translation delay | |
| setTimeout(() => { | |
| transcriptEl.innerHTML = ''; | |
| currentTranscriptIndex = 0; | |
| // Rebuild transcript in new language | |
| const newTranscriptInterval = setInterval(() => { | |
| if (currentTranscriptIndex >= mockTranscript.length) { | |
| clearInterval(newTranscriptInterval); | |
| isProcessing = false; | |
| return; | |
| } | |
| const transcript = language === 'english' ? mockTranscript : mockSwahiliTranscript; | |
| const line = transcript[currentTranscriptIndex]; | |
| const speakerDiv = document.createElement('div'); | |
| speakerDiv.className = `speaker-bubble ${line.speaker === 'You' ? 'speaker-you' : 'speaker-other'}`; | |
| speakerDiv.innerHTML = ` | |
| <div class="speaker-name">${line.speaker} <span class="text-xs opacity-70">${line.time}</span></div> | |
| <div>${line.text}</div> | |
| ${currentTranscriptIndex === mockTranscript.length - 1 ? '<div class="real-time-indicator"></div>' : ''} | |
| `; | |
| transcriptEl.appendChild(speakerDiv); | |
| transcriptEl.scrollTop = transcriptEl.scrollHeight; | |
| currentTranscriptIndex++; | |
| }, 100); | |
| }, 1500); | |
| } | |
| function processHighlightsAndSummary() { | |
| typingStatus.classList.remove('hidden'); | |
| // Simulate AI processing delay | |
| setTimeout(() => { | |
| typingStatus.classList.add('hidden'); | |
| // Display highlights | |
| displayHighlights(); | |
| // Display summary with typewriter effect | |
| displaySummary(); | |
| }, 3000); | |
| } | |
| function displayHighlights() { | |
| highlightsEl.innerHTML = ''; | |
| mockHighlights.forEach(item => { | |
| const highlightDiv = document.createElement('div'); | |
| highlightDiv.className = `highlight-item fade-in ${ | |
| item.type === 'decision' ? 'highlight-decision' : | |
| item.type === 'task' ? 'highlight-task' : | |
| item.type === 'question' ? 'highlight-question' : | |
| 'highlight-deadline' | |
| }`; | |
| let iconClass, iconColor; | |
| switch(item.type) { | |
| case 'decision': | |
| iconClass = 'fa-check-circle'; | |
| iconColor = 'text-green-500'; | |
| break; | |
| case 'task': | |
| iconClass = 'fa-tasks'; | |
| iconColor = 'text-blue-500'; | |
| break; | |
| case 'question': | |
| iconClass = 'fa-question-circle'; | |
| iconColor = 'text-yellow-500'; | |
| break; | |
| case 'deadline': | |
| iconClass = 'fa-calendar-day'; | |
| iconColor = 'text-pink-500'; | |
| break; | |
| } | |
| highlightDiv.innerHTML = ` | |
| <div class="highlight-icon ${iconColor}"> | |
| <i class="fas ${iconClass}"></i> | |
| </div> | |
| <div class="flex-1"> | |
| <div class="font-medium text-gray-800">${item.text}</div> | |
| <div class="text-xs text-gray-500 mt-1">${item.type.charAt(0).toUpperCase() + item.type.slice(1)}</div> | |
| </div> | |
| `; | |
| highlightsEl.appendChild(highlightDiv); | |
| }); | |
| } | |
| function displaySummary() { | |
| summaryEl.innerHTML = ''; | |
| const summaryDiv = document.createElement('div'); | |
| summaryDiv.className = 'typewriter'; | |
| summaryDiv.textContent = mockSummary; | |
| summaryEl.appendChild(summaryDiv); | |
| // Remove typewriter effect after animation completes | |
| setTimeout(() => { | |
| summaryDiv.classList.remove('typewriter'); | |
| summaryDiv.style.borderRight = 'none'; | |
| }, 3500); | |
| } | |
| function copyNotes() { | |
| const transcriptText = Array.from(transcriptEl.querySelectorAll('div > div:nth-child(2)')) | |
| .map(el => el.textContent) | |
| .join('\n\n'); | |
| const highlightsText = Array.from(highlightsEl.querySelectorAll('div > div > div:first-child')) | |
| .map(el => `• ${el.textContent}`) | |
| .join('\n'); | |
| const fullText = `MEETING NOTES\n\nTRANSCRIPT:\n${transcriptText}\n\nHIGHLIGHTS:\n${highlightsText}\n\nSUMMARY:\n${mockSummary}`; | |
| navigator.clipboard.writeText(fullText).then(() => { | |
| const originalText = copyBtn.querySelector('span').textContent; | |
| copyBtn.querySelector('span').textContent = 'Copied!'; | |
| copyBtn.classList.add('bg-green-100', 'text-green-700'); | |
| copyBtn.classList.remove('bg-gray-200', 'text-gray-700'); | |
| setTimeout(() => { | |
| copyBtn.querySelector('span').textContent = originalText; | |
| copyBtn.classList.remove('bg-green-100', 'text-green-700'); | |
| copyBtn.classList.add('bg-gray-200', 'text-gray-700'); | |
| }, 2000); | |
| }); | |
| } | |
| function downloadNotes() { | |
| const transcriptText = Array.from(transcriptEl.querySelectorAll('div > div:nth-child(2)')) | |
| .map(el => el.textContent) | |
| .join('\n\n'); | |
| const highlightsText = Array.from(highlightsEl.querySelectorAll('div > div > div:first-child')) | |
| .map(el => `• ${el.textContent}`) | |
| .join('\n'); | |
| const fullText = `MEETING NOTES\n\nTRANSCRIPT:\n${transcriptText}\n\nHIGHLIGHTS:\n${highlightsText}\n\nSUMMARY:\n${mockSummary}`; | |
| const blob = new Blob([fullText], { type: 'text/plain' }); | |
| const url = URL.createObjectURL(blob); | |
| const a = document.createElement('a'); | |
| a.href = url; | |
| a.download = `meeting_notes_${new Date().toISOString().slice(0, 10)}.txt`; | |
| document.body.appendChild(a); | |
| a.click(); | |
| document.body.removeChild(a); | |
| URL.revokeObjectURL(url); | |
| // Show download confirmation | |
| const originalText = downloadBtn.querySelector('span').textContent; | |
| downloadBtn.querySelector('span').textContent = 'Downloaded!'; | |
| downloadBtn.classList.add('bg-green-100', 'text-green-700'); | |
| downloadBtn.classList.remove('bg-indigo-600', 'text-white'); | |
| setTimeout(() => { | |
| downloadBtn.querySelector('span').textContent = originalText; | |
| downloadBtn.classList.remove('bg-green-100', 'text-green-700'); | |
| downloadBtn.classList.add('bg-indigo-600', 'text-white'); | |
| }, 2000); | |
| } | |
| function shareNotes() { | |
| if (navigator.share) { | |
| const transcriptText = Array.from(transcriptEl.querySelectorAll('div > div:nth-child(2)')) | |
| .map(el => el.textContent) | |
| .join('\n\n'); | |
| const highlightsText = Array.from(highlightsEl.querySelectorAll('div > div > div:first-child')) | |
| .map(el => `• ${el.textContent}`) | |
| .join('\n'); | |
| const fullText = `MEETING NOTES\n\nTRANSCRIPT:\n${transcriptText}\n\nHIGHLIGHTS:\n${highlightsText}\n\nSUMMARY:\n${mockSummary}`; | |
| navigator.share({ | |
| title: 'Meeting Notes', | |
| text: fullText, | |
| url: window.location.href | |
| }).then(() => { | |
| console.log('Shared successfully'); | |
| }).catch(err => { | |
| console.error('Error sharing:', err); | |
| }); | |
| } else { | |
| // Fallback for browsers that don't support Web Share API | |
| copyNotes(); | |
| alert('Notes copied to clipboard. You can now paste them to share.'); | |
| } | |
| } | |
| function connectGoogleMeet() { | |
| // Simulate Google authentication | |
| authBtn.disabled = true; | |
| authBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Connecting...'; | |
| setTimeout(() => { | |
| authBtn.innerHTML = '<i class="fas fa-check-circle mr-2"></i> Connected'; | |
| authBtn.classList.remove('bg-white', 'text-indigo-600'); | |
| authBtn.classList.add('bg-green-100', 'text-green-700'); | |
| // Enable start button | |
| startBtn.disabled = false; | |
| }, 2000); | |
| } | |
| // Initialize | |
| startBtn.disabled = true; | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=THEMONEYHOLLIC/tumaminutes-ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |