import { Mulberry32 } from "../utils.js"; import React, { useState, useEffect } from "react"; import AudioVisualizer from "./audioVisualizer.js"; export function Dashboard({ isRecording, onRecord, transcriptionText, finalSummary, topics, stream, }) { const [openIndex, setOpenIndex] = useState(null); const [liveTranscript, setLiveTranscript] = useState(""); topics = topics.map((topic, i) => { topic["decibel"] = generateDecibelData(i + 1 + 333); // for looks only return topic; }); const generateDecibelData = (x) => { let data = []; let random = Mulberry32(123456789 + x); for (let i = 0; i < 50; i++) { data.push(Math.floor(random() * 30) + 10); // generate random values between 10 and 40 } return data; }; const generateDecibelGraph = (decibelData) => { return decibelData.map((decibel, i) => (
Capture The Signal, Not The Noise
Duration: {finalSummary.duration}
{finalSummary.summary}