https://github.com/jgthms/record-audio
A simple audio recording API
https://github.com/jgthms/record-audio
Last synced: 3 months ago
JSON representation
A simple audio recording API
- Host: GitHub
- URL: https://github.com/jgthms/record-audio
- Owner: jgthms
- License: mit
- Fork: true (bryanjenningz/record-audio)
- Created: 2022-09-25T07:45:11.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2021-11-06T20:29:06.000Z (over 3 years ago)
- Last Synced: 2024-10-01T01:23:08.327Z (7 months ago)
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Record Audio
A simple audio recording function.
### How to use
The following code will record audio for 3 seconds, then play back the audio that it recorded.
```javascript
(async () => {
const recorder = await recordAudio();
recorder.start();
await sleep(3000);
const audio = await recorder.stop();
audio.play();
})();
```### Instructions for running example
Make sure your browser is up to date.
Clone the repo, then open index.html, then press action button and start talking. You will be recorded for 3 seconds, then your recording will be played back.