UNPKG

use-audio-capture

Version:

🎙️ A lightweight React hook for audio recording using native Web APIs (MediaRecorder, getUserMedia). Start, stop, pause, resume audio recordings with customizable callbacks. Perfect for voice notes, interviews, podcasts, and real-time audio processing in

5 lines (4 loc) 504 B
import { useAudioCapture } from './hooks/useAudioCapture.tsx'; import type { UseAudioCaptureProps, UseAudioCaptureChunkCb, UseAudioCaptureErrorCb, UseAudioCaptureStartCb, UseAudioCaptureCb, UseAudioCaptureErrorCbOptions, UseAudioCaptureCbOptions } from './hooks/useAudioCapture.types.ts'; export { useAudioCapture }; export type { UseAudioCaptureProps, UseAudioCaptureChunkCb, UseAudioCaptureErrorCb, UseAudioCaptureStartCb, UseAudioCaptureCb, UseAudioCaptureErrorCbOptions, UseAudioCaptureCbOptions, };