Skip to content

Instantly share code, notes, and snippets.

@ifindev
Last active April 24, 2025 13:45
Show Gist options
  • Save ifindev/337e30a48f9ccde7a11a45a93311b17c to your computer and use it in GitHub Desktop.
Save ifindev/337e30a48f9ccde7a11a45a93311b17c to your computer and use it in GitHub Desktop.
AI Transcriber App
import { useState, useRef } from 'react';
type AudioRecorderProps = {
onRetryRecording: () => void;
onRecordingComplete: (audioBlob: Blob) => void;
}
export function AudioRecorder({
onRetryRecording,
onRecordingComplete,
}: AudioRecorderProps) {
const [isRecording, setIsRecording] = useState(false);
const [recordedAudioUrl, setRecordedAudioUrl] = useState<string | null>(null);
const audioChunksRef = useRef<Blob[]>([]);
const mediaRecorderRef = useRef<MediaRecorder | null>(null);
const handleStartRecording = async () => {
};
const handleStopRecording = () => {
};
const handleRecordAgain = () => {
};
return (
<div>
Audio Recorder
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment