@pmate/mic
v0.2.0
Published
Reusable PMate microphone recorder components and hooks
Readme
@pmate/mic
Reusable PMate microphone recording primitives for React apps.
What it includes
MicRecorderButtonMicStateManageRecorder
The package records mono PCM audio through an AudioWorklet at 16kHz, which matches the current PMate ASR demo path.
Install
npm install @pmate/micExample
import { MicRecorderButton } from "@pmate/mic"
export function Demo() {
return (
<MicRecorderButton
onFinish={(blob) => {
console.log("recorded blob", blob)
}}
onError={(error) => {
console.error(error)
}}
/>
)
}Notes
- The package is UI-light on purpose. Apps can style around it or wrap it.
- ASR transport is intentionally not built into the package. Callers own upload or streaming behavior.
