{"dist":{"shasum":"2b86910433d03e281318bd90b2092ed468393430","tarball":"https://registry.npmjs.org/react-speech-kit/-/react-speech-kit-2.0.0-beta.0.tgz","fileCount":6,"integrity":"sha512-00ecct9yw5MTNWy5cBqgDh91yBYEqEC8zVdwPTzvCm4caybZtAbhclQg0xyxyc+yHFXjqRELlcjy3UMxfEZxCw==","signatures":[{"sig":"MEQCIHDeDmvgnKzgUI9cazwEfCSNJyswmYF62aUXe53LUOxTAiBhHnKPJ+EvMSlO0jbRjnBDFsYdhQSz4S3p1R5iWZLE+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":343365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjbkZCRA9TVsSAnZWagAAxakP/Rqowt8+y+XR5aEeNUFP\nuc8F8SvUEvh7mYZAu/wY8PyBV7HtOH4ZLwuZH8Ui4ptn6lMHtf9SnbJ6kDFR\nMWwjDmmjsyZizc+ZKqNFm3fpxYNEMwM1Fs/046WFVn3l0VTj2c7x4A2i6iKh\naKL5OHS++xK4tRDrOdUa6+K4zOP+beWoW+Qrq/D2s2zU2OOOMLoMKcowyCON\njYToOsqwHaZ9YmpSuCIg2Uu7PKC/852/b+V5OL+KUVs+qajF2cqG1HbqYQ4y\nxTd6FzmIk06/r8DpGsH5/7KeaZCEyjwbD98ZveXs206RbNrAKWCyMU93dEKR\nYSM7sgDHZfHPEJh73X3LLBmExuEP5p8qslhwEsccRpzDb9NvJkz9T9G17t/L\nKEm4B55KAk/g9eTiGihzccPMzHfq2Es0kx21VcPYU8mWccRtnOsedfWirhhP\nLaUTiXaoqc7GEL4xEwQOwLu732qAevQKB8gV7oKK5YlB/BGCQ0R0njcDvSAX\nIz6ja5E6YjCafqOwnOAE+uNx6FdftDQWjn8U5GXRMtsKzo7q07ya3fSt2Wbq\nA82GT0YzfudD+iD7xsHC1Xi+tlWO8HzRV6hUPVL1yGBT93nPjZf2pPJtfj2/\nbstx4z4TdlJ6LuhhNNy1sNrPNHHHMNxvpVWvcOr2eAUpiAXx83+nQufLwgvk\nbrUG\r\n=xULv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"setupFiles":["<rootDir>/jest.setup.js"],"collectCoverage":true,"coverageDirectory":"./coverage/","moduleFileExtensions":["jsx","js"]},"main":"dist/index.js","name":"react-speech-kit","author":{"name":"Michael Parton"},"readme":"# react-speech-kit 🎤&nbsp;&nbsp;&nbsp;&nbsp;[![CircleCI](https://circleci.com/gh/MikeyParton/react-speech-kit/tree/master.svg?style=shield)](https://circleci.com/gh/MikeyParton/react-speech-kit/tree/master) [![codecov](https://codecov.io/gh/MikeyParton/react-speech-kit/branch/master/graph/badge.svg)](https://codecov.io/gh/MikeyParton/react-speech-kit)\nReact components for in-browser Speech Recognition and Speech Synthesis.\n[Demo here](https://mikeyparton.github.io/react-speech-kit/)\n\n## Table of Contents\n\n- [Install](#install)\n- [Examples and Demo](#examples-and-demo)\n- [SpeechSynthesis](#speechsynthesis)\n  - [Props](#props)\n  - [Render prop args](#render-prop-args)\n- [SpeechRecognition](#speechrecognition)\n  - [Props](#props-1)\n  - [Render prop args](#render-prop-args-1)\n\n## Install\n```bash\nyarn add react-speech-kit\n```\n\n## Examples and Demo\nA full example can be found [here](https://mikeyparton.github.io/react-speech-kit/). The source code is in the [examples directory](https://github.com/MikeyParton/react-speech-kit/tree/master/examples/src).\n\n## SpeechSynthesis\nA react wrapper for the browser's [SpeechSynthesis API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis). It doesn't render anything itself, it just exposes the options and controls to the underlying SpeechSynthesis in the browser. You can use the children render prop to use these however you like.\n\n### Props\n\n#### onEnd\n`function()`\n\nCalled when SpeechSynthesis finishes reading the text or is cancelled. It is called with no argumnents. Very useful for triggering a state change after something has been read.\n\n#### children\n`function({ Render prop args })` _(required)_\n\nRender prop function to consume the arguments from SpeechSynthesis and render your own controls. It is called with an object containing render prop args.\n\n### Render prop args\n\n#### speak\n`function({ text: string, voice: SpeechSynthesisVoice })`\n\nCall to make the browser read some text. You can change the voice by passing an available SpeechSynthesisVoice (provided in the voices prop). Note that some browsers require a direct user action to start using SpeechSynthesis. To make sure it works, it is recommended that you call speak for the first time in a click event handler.\n\n#### cancel\n`function()`\n\nCall to make SpeechSynthesis stop reading.\n\n#### speaking\n`boolean`\n\nTrue when SpeechSynthesis is actively speaking.\n\n#### supported\n`boolean`\n\nWill be true if the browser supports SpeechSynthesis. Keep this in mind and use this as a guard before rendering any control that allow a user to call speak.\n\n#### voices\n`[SpeechSynthesisVoice]`\n\nAn array of available voices which can be passed to the speak function. An example SpeechSynthesisVoice voice has the following properties.\n```\n{\n  default: true\n  lang: \"en-AU\"\n  localService: true\n  name: \"Karen\"\n  voiceURI: \"Karen\"\n}\n```\nIn some browsers voices load asynchronously. In these cases, the array will be empty until they are available. To manage the selected voice, you should store the index of the voice you would like to use in state.\n\n## SpeechRecognition\nA react wrapper for the browser's [SpeechRecognition API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition). Again, it doesn't render anything itself, it just exposes the options and controls to the underlying SpeechRecognition in the browser. You can use the children render prop to use these however you like.\n\n### Props\n\n#### onEnd\n`function()`\n\nCalled when SpeechRecognition stops listening.\n\n#### onResult\n`function(string)`\n\nCalled when SpeechRecognition has a result. It is called with a string containing a transcript of the recognized speech.\n\n#### children\n`function({ Render prop args })` _(required)_\n\nRender prop function to consume the arguments from SpeechRecognition and render your own controls. It is called with an object containing the following values.\n\n### Render prop args\n\n#### listen\n`function({ interimResults: boolean, lang: string })`\n\nCall to make the browser start listening for input. Every time it processes a result, it will forward a transcript to the provided onResult function. You can modify behavior by passing the following arguments:\n\n- **lang**  \n   `string`  \n   The language the SpeechRecognition will try to interpret the input in. Use the languageCode from this list of languages that Chrome supports ([here](https://cloud.google.com/speech-to-text/docs/languages)) e.g: \"en-AU\". If not specified, this defaults to the HTML lang attribute value, or the user agent's language setting if that isn't set either.\n\n- **interimResults**  \n   `boolean` _(default: true)_   \n   SpeechRecognition can provide realtime results as it's trying to figure out the best match for the input. Set to false if you only want the final result.\n\n#### stop\n`function()`\n\nCall to make SpeechRecognition stop listening. This will call the provided onEnd function as well.\n\n#### listening\n`boolean`\n\nTrue when SpeechRecognition is actively listening.\n\n#### supported\n`boolean`\n\nWill be true if the browser supports SpeechRecognition. Keep this in mind and use this as a guard before rendering any control that allow a user to call listen.\n","gitHead":"368b672fa49f54bb9756d301f08ff8a95777eff7","license":"MIT","scripts":{"lint":"eslint src examples/src --ext .js,.jsx","test":"jest","build":"babel src -d dist --copy-files","start":"webpack-dev-server --mode development","build-demo":"webpack --mode production","deploy-demo":"gh-pages -d examples/dist","publish-demo":"npm run build-demo && npm run deploy-demo"},"_npmUser":{"name":"bigmike","email":"mikerelated@gmail.com"},"_npmVersion":"6.4.1","description":"React components for in-browser Speech Recognition and Speech Synthesis.","directories":{},"maintainers":[{"name":"bigmike","email":"mikerelated@gmail.com"}],"_nodeVersion":"8.14.0","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.0.0","react":"^16.8.0","enzyme":"^3.9.0","eslint":"^5.15.0","codecov":"^3.2.0","webpack":"^4.29.6","gh-pages":"^2.0.1","babel-cli":"^6.26.0","react-dom":"^16.8.3","babel-core":"^6.26.3","babel-jest":"^23.0.0","prop-types":"^15.7.2","file-loader":"^3.0.1","html-loader":"^0.5.5","webpack-cli":"^3.2.3","babel-eslint":"^10.0.1","babel-loader":"7","babel-preset-env":"^1.7.0","styled-components":"^4.1.3","babel-preset-react":"^6.24.1","eslint-plugin-jest":"^22.3.2","webpack-dev-server":"^3.2.1","eslint-plugin-babel":"^5.3.0","eslint-plugin-react":"^7.12.4","html-webpack-plugin":"^3.2.0","eslint-config-airbnb":"^17.1.0","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^6.2.1","enzyme-adapter-react-16":"^1.11.2"},"peerDependencies":{"react":"^16.8.0","prop-types":"^15.7.2"},"_npmOperationalInternal":{"tmp":"tmp/react-speech-kit_2.0.0-beta.0_1552791833212_0.6458651846154992","host":"s3://npm-registry-packages"},"_id":"react-speech-kit@2.0.0-beta.0","version":"2.0.0-beta.0"}