{"id":19762652,"url":"https://github.com/opensooq/react-mic-record","last_synced_at":"2025-04-30T14:31:04.020Z","repository":{"id":57147014,"uuid":"134133885","full_name":"OpenSooq/react-mic-record","owner":"OpenSooq","description":"Record a user's voice and display as an oscillation.  Works via the HTML5 MediaRecorder API (currently only available in Chrome \u0026 Firefox).","archived":false,"fork":false,"pushed_at":"2019-05-09T07:17:39.000Z","size":389,"stargazers_count":13,"open_issues_count":1,"forks_count":5,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-19T01:21:57.498Z","etag":null,"topics":["audio","pwa","react","voice"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenSooq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-20T08:45:45.000Z","updated_at":"2022-07-22T13:15:13.000Z","dependencies_parsed_at":"2022-09-05T16:41:39.442Z","dependency_job_id":null,"html_url":"https://github.com/OpenSooq/react-mic-record","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSooq%2Freact-mic-record","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSooq%2Freact-mic-record/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSooq%2Freact-mic-record/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSooq%2Freact-mic-record/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenSooq","download_url":"https://codeload.github.com/OpenSooq/react-mic-record/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251721383,"owners_count":21632827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","pwa","react","voice"],"created_at":"2024-11-12T04:06:07.159Z","updated_at":"2025-04-30T14:31:03.717Z","avatar_url":"https://github.com/OpenSooq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-mic-record #\n\nRecord a user's voice and display as an osscilation. Audio is saved as WebM audio file format.\n\n\nWorks via the HTML5 MediaRecorder API ([currently only available in Chrome \u0026 Firefox](https://caniuse.com/#search=MediaRecorder)).\n\n## Demo ##\n\nCheck out the demo.\n\n\n## Installation ##\n\n`npm install --save react-mic-record`\n\n## Features ##\n\n- Record audio from microphone\n- Display sound wave as voice is being recorded\n- Get audio as BLOB\n\n## Usage ##\n\n```js\n\n\u003cReactMicRecord\n  record={boolean}         // defaults -\u003e false.  Set to true to begin recording\n  className={string}       // provide css class name\n  onData={function}        // callback to execute when chunk of audio data is available\n  onStop={function}        // callback to execute when audio stops recording\n  strokeColor={string}     // sound wave color\n  backgroundColor={string} // background color\n/\u003e\n\n```\n\n## Example ##\n\n![react-mic-record Demo](gif-demo.gif)\n\n```js\nimport ReactMicRecord from 'react-mic-record';\n\nexport class Example extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      record: false\n    }\n\n  }\n\n  startRecording = () =\u003e {\n    this.setState({\n      record: true\n    });\n  }\n\n  stopRecording = () =\u003e {\n    this.setState({\n      record: false\n    });\n  }\n\n  onData(recordedBlob) {\n    console.log('chunk of real-time data is: ', recordedBlob);\n  }\n\n  onStop(recordedBlob) {\n    console.log('recordedBlob is: ', recordedBlob);\n  }\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cReactMicRecord\n          record={this.state.record}\n          className=\"sound-wave\"\n          onStop={this.onStop}\n          strokeColor=\"#000000\"\n          backgroundColor=\"#FF4081\" /\u003e\n        \u003cbutton onTouchTap={this.startRecording} type=\"button\"\u003eStart\u003c/button\u003e\n        \u003cbutton onTouchTap={this.stopRecording} type=\"button\"\u003eStop\u003c/button\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n```\n\n## Credits ##\n\nThis package uses code from ([react-mic](https://github.com/hackingbeauty/react-mic)).\n\n## License ##\n\nApache 2.0\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensooq%2Freact-mic-record","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensooq%2Freact-mic-record","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensooq%2Freact-mic-record/lists"}