Online Meeting & Class Notes Recorder
Step 1: Record Your Audio
Status: Idle
Live Transcription:
Your transcribed text will appear here in real-time...
Step 2: Edit Your Transcribed Notes
Step 3: Export Your Final Notes
${finalTranscript}${interimTranscript}
`; transcriptionPreview.scrollTop = transcriptionPreview.scrollHeight; }; return true; }; window.changeTab = (tabIndex) => { if (tabIndex < 0 || tabIndex >= totalTabs) return; currentTab = tabIndex; tabButtons.forEach((button, index) => { button.classList.toggle('tab-active', index === currentTab); button.classList.toggle('tab-inactive', index !== currentTab); }); tabContents.forEach((content, index) => { content.classList.toggle('hidden', index !== currentTab); }); updateNavButtons(); }; const updateNavButtons = () => { prevBtn.disabled = currentTab === 0; prevBtn.classList.toggle('opacity-50', prevBtn.disabled); nextBtn.disabled = currentTab === totalTabs - 1; nextBtn.classList.toggle('opacity-50', nextBtn.disabled); }; const startRecording = () => { if (isRecording) return; finalTranscript = ''; // Clear previous transcript notesEditor.value = ''; transcriptionPreview.innerHTML = 'Listening...
'; recorderErrorMessage.classList.add('hidden'); recognition.start(); }; const stopRecording = () => { if (!isRecording) return; recognition.stop(); }; const downloadTxtFile = () => { const text = notesEditor.value; const blob = new Blob([text], { type: 'text/plain;charset=utf-8' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'recorded-notes.txt'; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); }; const downloadPdf = () => { if (typeof window.jspdf === 'undefined') { console.error("jsPDF library is not loaded."); return; } const { jsPDF } = window.jspdf; const doc = new jsPDF(); const text = notesEditor.value; doc.setFontSize(18); doc.text('Recorded & Transcribed Notes', 14, 22); doc.setLineWidth(0.5); doc.line(14, 26, 196, 26); doc.setFontSize(12); const lines = doc.splitTextToSize(text, 180); doc.text(lines, 14, 34); doc.save('recorded-notes.pdf'); }; // --- EVENT LISTENERS --- startBtn?.addEventListener('click', startRecording); stopBtn?.addEventListener('click', stopRecording); downloadTxtBtn?.addEventListener('click', downloadTxtFile); downloadPdfBtn?.addEventListener('click', downloadPdf); prevBtn?.addEventListener('click', () => changeTab(currentTab - 1)); nextBtn?.addEventListener('click', () => changeTab(currentTab + 1)); // --- INITIALIZATION --- if (initializeRecorder()) { updateNavButtons(); } });