{"_id":"@fugood/react-native-audio-pcm-stream","_rev":"10-4388982ddd01d86ed6c9727cf915808e","name":"@fugood/react-native-audio-pcm-stream","dist-tags":{"latest":"1.1.4"},"versions":{"1.1.2":{"name":"@fugood/react-native-audio-pcm-stream","version":"1.1.2","keywords":["live stream","react-native","audio","live","recording","voice","pcm"],"author":{"url":"https://www.imxiqi.com/","name":"Qi Xi","email":"me@imxiqi.com"},"license":"MIT","_id":"@fugood/react-native-audio-pcm-stream@1.1.2","maintainers":[{"name":"liao.jason2","email":"liao.jason2@gmail.com"},{"name":"bricks_deployment","email":"jhen@bricks.tools"},{"name":"pepper.yen","email":"pepper.yen@gmail.com"},{"name":"jhen0409","email":"iainst0409@gmail.com"},{"name":"hans00","email":"jy29825377@gmail.com"}],"homepage":"https://github.com/mybigday/react-native-audio-pcm-stream","bugs":{"url":"https://github.com/mybigday/react-native-audio-pcm-stream/issues","email":"dev@bricks.tools"},"dist":{"shasum":"3e7f6f4ec497865b0c991015fccdea59edadd46e","tarball":"https://registry.npmjs.org/@fugood/react-native-audio-pcm-stream/-/react-native-audio-pcm-stream-1.1.2.tgz","fileCount":30,"integrity":"sha512-vFXRI6c+iIrjXU6ejlll2x1JZ4yd5/QwCGVpElAWeCmWW009CRNadfLLF9tcMDwTQJw4EvY0HAOad2Up/7RfXw==","signatures":[{"sig":"MEQCIB5yjEnLjvVhhOlfATpCAf7F0k/mRWteoVGJfwv7v1V0AiAjh4J+55Sn3zghUfjPLtYU1lO4O49FmVAuh5kOLc4Liw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHASxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqhjg/+PS9rMlJo3Ri9DS0B6hibNefU5eQs3k6aJS5VnfcGKZEa9Fd9\r\ndQcMl6FEaO3cZwsblhQNjy0buXuu4gHXjqyaLZCFz8fp25PP1kdSYH187ziG\r\n/4FCxYUTW22/yyp8VhTBf0t3J2fiDOJcf5Ati21I9VELzEMeKoJYFn+ONq2K\r\n18BeE/5NCiHL2fRrlBAs13Qy54FSUWtCnQz8ridoarZZ+rlpHtwRNcuwdWWG\r\nT6DvR+w4BDpJReRtG2kNNNdpYx7zg9fDqOYDjTFncDtb5I15fwwmWO2rH48n\r\nam+Pp1djyMI4bjNKibIWpoQqFY+dPNX+3MRNb2MGGN1t7BE+2yIJKNoxGcDG\r\nsJpo3irpPdX6eHk3H6HH5jFq5UPvm0qd7wvz0cY+vLJMEU4IvuLeAIhnpUMa\r\nfnOrXCe72DIqfgIjSL3qKiKUf7nJUNRaXmoV9KRM8KtqhMI0GWpiL6Dl0Ydl\r\nFC35R+NbNJz4u+V3zq+bPRi8wEosaMBVuwuamAWiaSwSlaSK40gPPywJhCR9\r\nL7p/w3ymwHBmX4FA8/Zjb5HozN9rIOn+Z8o9KDqLU52lTaaQMSplD6j+DUSs\r\nviOAoHDmgucE9A/ZeJb/n5dnfOJmcVH9a2dWAOqLpUmtSpoLuJSTAZC+sNhC\r\ncP/rIihNdYk2zg6RIJFXViomMo2ApsoMvbY=\r\n=8+fu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","_npmUser":{"name":"hans00","email":"jy29825377@gmail.com"},"repository":{"url":"https://github.com/mybigday/react-native-audio-pcm-stream.git","type":"git"},"description":"Get audio PCM stream data for React Native","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2020 Qi Xi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.19.1","prettier":"^1.12.0","babel-eslint":"^8.2.3","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/react-native-audio-pcm-stream_1.1.2_1679557808884_0.4393879937543539","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"@fugood/react-native-audio-pcm-stream","version":"1.1.3","keywords":["live stream","react-native","audio","live","recording","voice","pcm"],"author":{"url":"https://www.imxiqi.com/","name":"Qi Xi","email":"me@imxiqi.com"},"license":"MIT","_id":"@fugood/react-native-audio-pcm-stream@1.1.3","maintainers":[{"name":"liao.jason2","email":"liao.jason2@gmail.com"},{"name":"bricks_deployment","email":"jhen@bricks.tools"},{"name":"pepper.yen","email":"pepper.yen@gmail.com"},{"name":"jhen0409","email":"iainst0409@gmail.com"},{"name":"hans00","email":"jy29825377@gmail.com"}],"homepage":"https://github.com/mybigday/react-native-audio-pcm-stream","bugs":{"url":"https://github.com/mybigday/react-native-audio-pcm-stream/issues","email":"dev@bricks.tools"},"dist":{"shasum":"54698486661b9efe2f20d1b40a59470de00bd144","tarball":"https://registry.npmjs.org/@fugood/react-native-audio-pcm-stream/-/react-native-audio-pcm-stream-1.1.3.tgz","fileCount":30,"integrity":"sha512-m2jimaCfRFY/1z2eiNURnZJ6ufMcdnFKUADaniv1qvKSsD4JnZ3Days450yJjo8Qk81XjqPJOY5JKnovByf6Zw==","signatures":[{"sig":"MEYCIQDrthsomRo/KQyZiRVgHvIdvqWbl0OnlM83q9Z2sjR+jQIhALX4l2K0uJ4Ax7qlOCaDZROs0ZxB0v5WntFYmVj/ijzg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHAY9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbrA//UWsBs9aseLPIjoLn/XSl1wzxu3BR3Ag76T+9cr2+nCkhOcES\r\nCWBMsfy4BSrORSJRvlG4Tf3VuyXpa6Ls8G12uMydCKAdY7tuXCY7EmDpy/UH\r\nVFKrt3PTGomL5i7PZqEisf+iSLPBq3TGxHxqoquba8IjygZHSn+gIfJJWN3Z\r\nrrzhlzYA7xyU3WwVPJi2/mYma43d8KYoZKIaVREvP0XwjEWfqV25H6pVf8ON\r\nCwysG30YRqNwDhCAp33xKzST3KzOQx15y3EcZdumM+4yQi/z3nlI04+PA0uZ\r\nuxEDdaUl7VHZNkPZXwbqDHML3jJupjCFUiM/z46tBmYOG2q2gdBIP78LyPmi\r\nLEB5kSHZd+OdPMPtUEw6fPQZX0Ju+aJNBb/Rx9OG6x26xRd1SKJoytyn9Yey\r\nX4nBSOuNnW2IAD0zmIk1cBlD4AS2o0uWdjG1VXVKTZdhDvElzJ+ntFSqVycH\r\nabJZU6OFOzEu8buTIZ7qu/F0og4yXD/6Z7IUulD1mFKle1t2Z8fUhpNS0mZm\r\nvrziA4BFz46NdJyUD+DcF+AhmtymvD8biZN+Wi/8nxfMfqh9KU1DwMjK9bF5\r\nrOrcssZMH4gm2dfz1fGghJkyVMvLlZT3zmt+GyIzJ3jLAIFDHzH55lUqJvQv\r\n4aqYINtYisRD/yiWQTrjKxx2HLUoewIXqZI=\r\n=FvrC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","_npmUser":{"name":"hans00","email":"jy29825377@gmail.com"},"repository":{"url":"https://github.com/mybigday/react-native-audio-pcm-stream.git","type":"git"},"description":"Get audio PCM stream data for React Native","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2020 Qi Xi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.19.1","prettier":"^1.12.0","babel-eslint":"^8.2.3","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/react-native-audio-pcm-stream_1.1.3_1679558204818_0.6804131054230338","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"@fugood/react-native-audio-pcm-stream","version":"1.1.4","keywords":["live stream","react-native","audio","live","recording","voice","pcm"],"author":{"url":"https://www.imxiqi.com/","name":"Qi Xi","email":"me@imxiqi.com"},"license":"MIT","_id":"@fugood/react-native-audio-pcm-stream@1.1.4","maintainers":[{"name":"liao.jason2","email":"liao.jason2@gmail.com"},{"name":"bricks_deployment","email":"jhen@bricks.tools"},{"name":"pepper.yen","email":"pepper.yen@gmail.com"},{"name":"jhen0409","email":"iainst0409@gmail.com"},{"name":"hans00","email":"jy29825377@gmail.com"}],"homepage":"https://github.com/mybigday/react-native-audio-pcm-stream","bugs":{"url":"https://github.com/mybigday/react-native-audio-pcm-stream/issues","email":"dev@bricks.tools"},"dist":{"shasum":"f7781773fac8a0ad82e60cc6e80d20b4778bd694","tarball":"https://registry.npmjs.org/@fugood/react-native-audio-pcm-stream/-/react-native-audio-pcm-stream-1.1.4.tgz","fileCount":30,"integrity":"sha512-M6H6ay4ea0vpioII9T/C9qXFPeGpxGN24nl0REP2/wtsorZXg3zzHjZbf3UUUwjf6lEEHMlGCJfXUsxwC/vV8w==","signatures":[{"sig":"MEYCIQDpT/yUly9N/wq6VJz8LnnfVZRAKj8L0F6MWYUsDMj/CQIhAKUtbBt3kmXMQlaG2CxRo6Cixy50aw5XPHSWxw1J5YyW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHAwFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoecQ//SSDTN4dWypZpjOgDBpuFgkGD76OpQgsQqazhBrjlWwFMMWuK\r\n/P6SsfnMnihdregWC09oW+d7b5M/b0GgOddIYeh+nO5glCIIlaijzh8c78fv\r\ncwT6N+aMkexb8UgI8WJN3puXs8N6CPewzqJdpe6DYtqMihclkK9K0QH/wdaE\r\n1BuE3RTFeSZSS7Mwm02qouAymoUTpwrsHJVYe+0v6ARrRmk5q70poP5sivR5\r\na/UpRg0Ll5i8J2VQrt4B4WdkIp1kzAHpToy2OUFVRxgqPeGvWjUQaDedvd3D\r\nSHCbtYG0R/0amFWqnvKmiUiAo5FbtQ5/Ro76vxV1XWNBaVX9JYJPry3NY/Z4\r\nICsPCFcMH2cCajgMaDscM4KuiLyG+MMQzyHjomMsOPWOOGGmeL4oMbmf4Af1\r\nxF2p1sivVEejs0bQBc+WScE92Dq6YxmKuP1uPlG5OdF9lWshEIcXrucIFLZ+\r\n1gfQKVCgNV8iXqsslUQ6JuTGZpc3FyXClp4f5J5jZZ4cP3EEUGjI8E7GHRMA\r\n/8zYEVJUoj0ZS2u7LqVNJxDwH1IfjIWzfr+Y7r25F0EfpDAsRFIh4Ynn7ERH\r\n1xmp1MyX2bP1rPMVo61dP0QTd4WDI0VMkiX2EiZ2xSIjo4w/wx8BoxGHvWfj\r\ngesOFXjqZIc/IO3cVeXd9R9vkQU3Mn+L+yo=\r\n=mvod\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","_npmUser":{"name":"hans00","email":"jy29825377@gmail.com"},"repository":{"url":"https://github.com/mybigday/react-native-audio-pcm-stream.git","type":"git"},"description":"Get audio PCM stream data for React Native","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2020 Qi Xi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.19.1","prettier":"^1.12.0","babel-eslint":"^8.2.3","eslint-plugin-prettier":"^2.6.0"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/react-native-audio-pcm-stream_1.1.4_1679559684884_0.8095608158034695","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-03-23T07:50:08.883Z","modified":"2025-10-21T06:00:52.282Z","1.1.2":"2023-03-23T07:50:09.035Z","1.1.3":"2023-03-23T07:56:45.043Z","1.1.4":"2023-03-23T08:21:25.053Z"},"bugs":{"url":"https://github.com/mybigday/react-native-audio-pcm-stream/issues","email":"dev@bricks.tools"},"author":{"url":"https://www.imxiqi.com/","name":"Qi Xi","email":"me@imxiqi.com"},"license":"MIT","homepage":"https://github.com/mybigday/react-native-audio-pcm-stream","keywords":["live stream","react-native","audio","live","recording","voice","pcm"],"repository":{"url":"https://github.com/mybigday/react-native-audio-pcm-stream.git","type":"git"},"description":"Get audio PCM stream data for React Native","maintainers":[{"email":"pepper.yen@gmail.com","name":"pepper.yen"},{"email":"iainst0409@gmail.com","name":"jhen0409"},{"email":"jy29825377@gmail.com","name":"hans00"},{"email":"jhen@bricks.tools","name":"bricks_deployment"},{"email":"gwaieiae@gmail.com","name":"shanecsw"}],"readme":"\n# react-native-live-audio-stream\n[![npm](https://img.shields.io/npm/v/react-native-live-audio-stream)](https://www.npmjs.com/package/react-native-live-audio-stream)\n\nGet live audio stream data for React Native. Ideal for live voice recognition (transcribing).\n\nThis module is modified from [react-native-audio-record](https://github.com/goodatlas/react-native-audio-record). Instead of saving to an audio file, it only emit events with live data. By doing this, it can reduce memory usage and eliminate file operation overheads in the case that an audio file is not necessary (e.g. live transcribing).\n\nMost of the code was written by the respective original authors.\n\n## Install\n```\nyarn add react-native-live-audio-stream\ncd ios\npod install\n```\n\n## Add Microphone Permissions\n\n### iOS\nAdd these lines to ```ios/[YOU_APP_NAME]/info.plist```\n```xml\n<key>NSMicrophoneUsageDescription</key>\n<string>We need your permission to use the microphone.</string>\n```\n\n### Android\nAdd the following line to ```android/app/src/main/AndroidManifest.xml```\n```xml\n<uses-permission android:name=\"android.permission.RECORD_AUDIO\" />\n```\n\n## Usage\n```javascript\nimport LiveAudioStream from 'react-native-live-audio-stream';\n\nconst options = {\n  sampleRate: 32000,  // default is 44100 but 32000 is adequate for accurate voice recognition\n  channels: 1,        // 1 or 2, default 1\n  bitsPerSample: 16,  // 8 or 16, default 16\n  audioSource: 6,     // android only (see below)\n  bufferSize: 4096    // default is 2048\n};\n\nLiveAudioStream.init(options);\nLiveAudioStream.on('data', data => {\n  // base64-encoded audio data chunks\n});\n  ...\nLiveAudioStream.start();\n  ...\nLiveAudioStream.stop();\n  ...\n```\n\n`audioSource` should be one of the constant values from [here](https://developer.android.com/reference/android/media/MediaRecorder.AudioSource). Default value is `6` (`VOICE_RECOGNITION`).\n\nUse 3rd-party modules like [buffer](https://www.npmjs.com/package/buffer) to decode base64 data. Example:\n```javascript\n// yarn add buffer\nimport { Buffer } from 'buffer';\n  ...\nLiveAudioStream.on('data', data => {\n  var chunk = Buffer.from(data, 'base64');\n});\n```\n\n## Credits/References\n- [react-native-audio-record](https://github.com/goodatlas/react-native-audio-record)\n- iOS [Audio Queues](https://developer.apple.com/library/content/documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide)\n- Android [AudioRecord](https://developer.android.com/reference/android/media/AudioRecord.html)\n- [cordova-plugin-audioinput](https://github.com/edimuj/cordova-plugin-audioinput)\n- [react-native-recording](https://github.com/qiuxiang/react-native-recording)\n- [SpeakHere](https://github.com/shaojiankui/SpeakHere)\n- [ringdroid](https://github.com/google/ringdroid)\n\n## License \nMIT\n","readmeFilename":"README.md"}