@lw6/recorder
v0.3.0
Published
A simple browser recording tool.
Downloads
11
Maintainers
Readme
Features
- Support recording via the browser.
- Support for specifying recording devices.
- Functions for simple processing of PCM and WAV data.
- Support for multi-channel PCM data and WAV conversion.
Getting Started
pnpm add @lw6/recorder
Usage
import { Recorder, getAudioInputDevices } from '@lw6/recorder'
const devices = await getAudioInputDevices();
const recorder = new Recorder({
numberOfChannels: 1,
// "undefined" represents using the system default device.
// deviceId: devices[0].deviceId,
deviceId: undefined,
})
recorder.open()
.then(([sampleRate, channels]) => {
console.log('channels:', channels, 'sampleRate:', sampleRate)
})
.catch((error) => {
alert(error)
})
recorder.pause();
recorder.resume();
recorder.stop();
recorder.getDuration();
Roadmap
- [ ] Speech To Text
Contributing
License
Contact
Email: [email protected]
Project Link: https://github.com/liuw5367/recorder