{"id":25936181,"url":"https://github.com/untemps/react-vocal","last_synced_at":"2026-05-03T19:06:05.033Z","repository":{"id":38174829,"uuid":"268872496","full_name":"untemps/react-vocal","owner":"untemps","description":"React component and hook to initiate a SpeechRecognition session","archived":false,"fork":false,"pushed_at":"2026-05-03T18:38:49.000Z","size":2200,"stargazers_count":20,"open_issues_count":5,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-03T18:42:26.683Z","etag":null,"topics":["component","hook","javascript","react","reactjs","speech","speech-to-text","speechrecognition","web-speech-api"],"latest_commit_sha":null,"homepage":"https://untemps.github.io/react-vocal","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/untemps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-06-02T18:00:05.000Z","updated_at":"2026-05-03T18:03:44.000Z","dependencies_parsed_at":"2023-02-09T16:30:24.381Z","dependency_job_id":"1297414f-4aab-492a-a54b-97c143a5c564","html_url":"https://github.com/untemps/react-vocal","commit_stats":null,"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"purl":"pkg:github/untemps/react-vocal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untemps%2Freact-vocal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untemps%2Freact-vocal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untemps%2Freact-vocal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untemps%2Freact-vocal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/untemps","download_url":"https://codeload.github.com/untemps/react-vocal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untemps%2Freact-vocal/sbom","scorecard":{"id":911021,"data":{"date":"2025-08-11","repo":{"name":"github.com/untemps/react-vocal","commit":"eabb5525c19e8a9e01212e59df755ea56b4efbe8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/index.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/index.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/untemps/react-vocal/index.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/index.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/untemps/react-vocal/index.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/index.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/untemps/react-vocal/index.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/index.yml:7"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.7.28 not signed: https://api.github.com/repos/untemps/react-vocal/releases/190689507","Warn: release artifact v1.7.27 not signed: https://api.github.com/repos/untemps/react-vocal/releases/186855146","Warn: release artifact v1.7.26 not signed: https://api.github.com/repos/untemps/react-vocal/releases/161547862","Warn: release artifact v1.7.25 not signed: https://api.github.com/repos/untemps/react-vocal/releases/161547537","Warn: release artifact v1.7.24 not signed: https://api.github.com/repos/untemps/react-vocal/releases/150696033","Warn: release artifact v1.7.28 does not have provenance: https://api.github.com/repos/untemps/react-vocal/releases/190689507","Warn: release artifact v1.7.27 does not have provenance: https://api.github.com/repos/untemps/react-vocal/releases/186855146","Warn: release artifact v1.7.26 does not have provenance: https://api.github.com/repos/untemps/react-vocal/releases/161547862","Warn: release artifact v1.7.25 does not have provenance: https://api.github.com/repos/untemps/react-vocal/releases/161547537","Warn: release artifact v1.7.24 does not have provenance: https://api.github.com/repos/untemps/react-vocal/releases/150696033"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T19:12:05.015Z","repository_id":38174829,"created_at":"2025-08-24T19:12:05.015Z","updated_at":"2025-08-24T19:12:05.015Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32581076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["component","hook","javascript","react","reactjs","speech","speech-to-text","speechrecognition","web-speech-api"],"created_at":"2025-03-04T01:50:31.238Z","updated_at":"2026-05-03T19:06:05.025Z","avatar_url":"https://github.com/untemps.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"assets/react-vocal.png\" alt=\"react-vocal\" height=\"150\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    A React component and hook to initiate a SpeechRecognition session\n\u003c/p\u003e\n\n---\n\n[![npm](https://img.shields.io/npm/v/@untemps/react-vocal?style=for-the-badge)](https://www.npmjs.com/package/@untemps/react-vocal)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/untemps/react-vocal/publish.yml?style=for-the-badge)](https://github.com/untemps/react-vocal/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/untemps/react-vocal?style=for-the-badge)](https://codecov.io/gh/untemps/react-vocal)\n\n## Links\n\n:red_circle:\u0026nbsp;\u003cbig\u003e\u003ca href=\"https://untemps.github.io/react-vocal\" target=\"_blank\" rel=\"noopener\"\u003eLIVE\nDEMO\u003c/a\u003e\u003c/big\u003e\u0026nbsp;:red_circle:\n\n## Disclaimer\n\nThe [Web Speech API](https://developer.mozilla.org/fr/docs/Web/API/Web_Speech_API) is only supported by few browsers so\nfar (see [caniuse](https://caniuse.com/#search=SpeechRecognition)). If the API is not available, the `Vocal` component\nwon't display anything.\n\nThis component intends to catch a speech result as soon as possible. This can be a good fit for vocal commands or search\nfield filling. For now on it does not support continuous speech (see [Roadmap](#roadmap) below).  \nThat means either a result is caught and returned or timeout is reached and the recognition is discarded.  \nThe `stop` function returned by children-as-function mechanism allows to prematurely discard the recognition before\ntimeout elapses.\n\n### Special cases\n\nSome browsers supports the `SpeechRecognition` API but not all the related APIs.  \nFor example, browsers on iOS 14.5, the `SpeechGrammar` and `SpeechGrammarList` and `Permissions` APIs are not supported.\n\nAlthough the lack of `SpeechGrammar` and `SpeechGrammarList` is handled by the underlaying `@untemps/vocal` library, you need to deal with `Permissions` by yourself.\n\n## Installation\n\n```bash\nyarn add @untemps/react-vocal\n```\n\n## Usage\n\n### `Vocal` component\n\n#### Basic usage\n\n```javascript\nimport Vocal from '@untemps/react-vocal'\n\nconst App = () =\u003e {\n\tconst [result, setResult] = useState('')\n\n\tconst _onVocalStart = () =\u003e {\n\t\tsetResult('')\n\t}\n\n\tconst _onVocalResult = (result) =\u003e {\n\t\tsetResult(result)\n\t}\n\n\treturn (\n\t\t\u003cdiv className=\"App\"\u003e\n\t\t\t\u003cspan style={{ position: 'relative' }}\u003e\n\t\t\t\t\u003cVocal\n\t\t\t\t\tonStart={_onVocalStart}\n\t\t\t\t\tonResult={_onVocalResult}\n\t\t\t\t\tstyle={{ width: 16, position: 'absolute', right: 10, top: -2 }}\n\t\t\t\t/\u003e\n\t\t\t\t\u003cinput defaultValue={result} style={{ width: 300, height: 40 }} /\u003e\n\t\t\t\u003c/span\u003e\n\t\t\u003c/div\u003e\n\t)\n}\n```\n\n---\n\n#### Custom component\n\nBy default, `Vocal` displays an icon with two states:\n\n-   Idle  \n    ![Idle state](assets/icon-idle.png)\n-   Listening  \n    ![Listening state](assets/icon-listening.png)\n\nBut you can provide your own component.\n\n-   With a simple React element:\n\n```javascript\nimport Vocal from '@untemps/react-vocal'\n\nconst App = () =\u003e {\n\treturn (\n\t\t\u003cVocal\u003e\n\t\t\t\u003cbutton\u003eStart\u003c/button\u003e\n\t\t\u003c/Vocal\u003e\n\t)\n}\n```\n\nIn this case, a `onClick` handler is automatically attached to the component to start a recognition session.  \nOnly the first direct descendant of Vocal will receive the `onClick` handler. If you want to use a more complex\nhierarchy, use the function syntax below.\n\n-   With a function that returns a React element:\n\n```javascript\nimport Vocal from '@untemps/react-vocal'\n\nconst Play = () =\u003e (\n\t\u003cdiv\n\t\tstyle={{\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\tmarginLeft: 1,\n\t\t\tborderStyle: 'solid',\n\t\t\tborderWidth: '4px 0 4px 8px',\n\t\t\tborderColor: 'transparent transparent transparent black',\n\t\t}}\n\t/\u003e\n)\n\nconst Stop = () =\u003e (\n\t\u003cdiv\n\t\tstyle={{\n\t\t\twidth: 8,\n\t\t\theight: 8,\n\t\t\tbackgroundColor: 'black',\n\t\t}}\n\t/\u003e\n)\n\nconst App = () =\u003e {\n\treturn (\n\t\t\u003cVocal\u003e\n\t\t\t{(start, stop, isStarted) =\u003e (\n\t\t\t\t\u003cbutton style={{ padding: 5 }} onClick={isStarted ? stop : start}\u003e\n\t\t\t\t\t{isStarted ? \u003cStop /\u003e : \u003cPlay /\u003e}\n\t\t\t\t\u003c/button\u003e\n\t\t\t)}\n\t\t\u003c/Vocal\u003e\n\t)\n}\n```\n\nThe following parameters are passed to the function:\n\n| Arguments | Type | Description                                                     |\n| --------- | ---- | --------------------------------------------------------------- |\n| start     | func | The function used to start the recognition                      |\n| stop      | func | The function used to stop the recognition                       |\n| isStarted | bool | A flag that indicates whether the recognition is started or not |\n\n---\n\n#### Commands\n\nThe `Vocal` component accepts a `commands` prop to map special recognition results to callbacks.  \nThat means you can define vocal commands to trigger specific functions.\n\n```javascript\nconst App = () =\u003e {\n  return (\n    \u003cVocal commands={{\n      'switch border color': () =\u003e setBorderColor('red'),\n    }}/\u003e\n  )\n}\n```\n\n`commands` object is a key/pair model where the `key` is the command to be caught by the recognition and the `value` is the callback triggered when the command is detected.  \n\n`key` is not case sensitive.\n\n```javascript\nconst commands = {\n    submit: () =\u003e submitForm(),\n    'Change the background color': () =\u003e setBackgroundColor('red'), \n    'PLAY MUSIC': play\n}\n```\n\nThe component utilizes a special hook called `useCommands` to respond to the commands.  \nThe hook performs a fuzzy search to match approximate commands if needed. This allows to fix accidental typos or approximate recognition results.  \nTo do so the hook uses [fuse.js](https://fusejs.io/) which implements an algorithm to find strings that are approximately equal to a given input. The score precision that distinguishes acceptable command-to-callback mapping from negative matching can be customized in the hook instantiantion.\n\n```javascript\nuseCommands(commands, threshold) // threshold is the limit not to exceed to be considered a match\n```\n\nSee [fuze.js scoring theory](https://fusejs.io/concepts/scoring-theory.html) for more details.\n\n\u003e :warning: **The `Vocal` component doesn't expose that score yet.** For now on you have to deal with the default value (*0.4*)\n\n---\n\n#### `Vocal` component API\n\n| Props         | Type              | Default | Description                                                                                     |\n| ------------- | ----------------- | ------- | ----------------------------------------------------------------------------------------------- |\n| commands      | object            | null    | Callbacks to be triggered when specified commands are detected by the recognition               |\n| lang          | string            | 'en-US' | Language understood by the recognition [BCP 47 language tag](https://tools.ietf.org/html/bcp47) |\n| grammars      | SpeechGrammarList | null    | Grammars understood by the recognition [JSpeech Grammar Format](https://www.w3.org/TR/jsgf/)    |\n| timeout       | number            | 3000    | Time in ms to wait before discarding the recognition                                            |\n| style         | object            | null    | Styles of the root element if className is not specified                                        |\n| className     | string            | null    | Class of the root element                                                                       |\n| onStart       | func              | null    | Handler called when the recognition starts                                                      |\n| onEnd         | func              | null    | Handler called when the recognition ends                                                        |\n| onSpeechStart | func              | null    | Handler called when the speech starts                                                           |\n| onSpeechEnd   | func              | null    | Handler called when the speech ends                                                             |\n| onResult      | func              | null    | Handler called when a result is recognized                                                      |\n| onError       | func              | null    | Handler called when an error occurs                                                             |\n| onNoMatch     | func              | null    | Handler called when no result can be recognized                                                 |\n\n### `useVocal` hook\n\n#### Basic usage\n\n```javascript\nimport React, { useState } from 'react'\nimport { useVocal } from '@untemps/react-vocal'\nimport Icon from './Icon'\n\nconst App = () =\u003e {\n\tconst [isListening, setIsListening] = useState(false)\n\tconst [result, setResult] = useState('')\n\n\tconst [, { start, subscribe }] = useVocal('fr_FR')\n\n\tconst _onButtonClick = () =\u003e {\n\t\tsetIsListening(true)\n\n\t\tsubscribe('speechstart', _onVocalStart)\n\t\tsubscribe('result', _onVocalResult)\n\t\tsubscribe('error', _onVocalError)\n\t\tstart()\n\t}\n\n\tconst _onVocalStart = () =\u003e {\n\t\tsetResult('')\n\t}\n\n\tconst _onVocalResult = (result) =\u003e {\n\t\tsetIsListening(false)\n\n\t\tsetResult(result)\n\t}\n\n\tconst _onVocalError = (e) =\u003e {\n\t\tconsole.error(e)\n\t}\n\n\treturn (\n\t\t\u003cdiv\u003e\n\t\t\t\u003cspan style={{ position: 'relative' }}\u003e\n\t\t\t\t\u003cdiv\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\taria-label=\"Vocal\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tstyle={{ width: 16, position: 'absolute', right: 10, top: 2 }}\n\t\t\t\t\tonClick={_onButtonClick}\n\t\t\t\t\u003e\n\t\t\t\t\t\u003cIcon color={isListening ? 'red' : 'blue'} /\u003e\n\t\t\t\t\u003c/div\u003e\n\t\t\t\t\u003cinput defaultValue={result} style={{ width: 300, height: 40 }} /\u003e\n\t\t\t\u003c/span\u003e\n\t\t\u003c/div\u003e\n\t)\n}\n```\n\n---\n\n#### Signature\n\n```\nuseVocal(lang, grammars)\n```\n\n| Args     | Type              | Default | Description                                                                                     |\n| -------- | ----------------- | ------- | ----------------------------------------------------------------------------------------------- |\n| lang     | string            | 'en-US' | Language understood by the recognition [BCP 47 language tag](https://tools.ietf.org/html/bcp47) |\n| grammars | SpeechGrammarList | null    | Grammars understood by the recognition [JSpeech Grammar Format](https://www.w3.org/TR/jsgf/)    |\n\n---\n\n#### Return value\n\n```\nconst [ref, { start, stop, abort, subscribe, unsubscribe, clean }]\n```\n\n| Args        | Type | Description                                          |\n| ----------- | ---- | ---------------------------------------------------- |\n| ref         | Ref  | React ref to the SpeechRecognitionWrapper instance   |\n| start       | func | Function to start the recognition                    |\n| stop        | func | Function to stop the recognition                     |\n| abort       | func | Function to abort the recognition                    |\n| subscribe   | func | Function to subscribe to recognition events          |\n| unsubscribe | func | Function to unsubscribe to recognition events        |\n| clean       | func | Function to clean subscription to recognition events |\n\n### Browser support flag\n\n#### Basic usage\n\n```javascript\nimport Vocal, { isSupported } from '@untemps/react-vocal'\n\nconst App = () =\u003e {\n\treturn isSupported ? \u003cVocal /\u003e : \u003cp\u003eYour browser does not support Web Speech API\u003c/p\u003e\n}\n```\n\n### Events\n\n| Events      | Description                                                                               |\n| ----------- | ----------------------------------------------------------------------------------------- |\n| audioend    | Fired when the user agent has finished capturing audio for recognition                    |\n| audiostart  | Fired when the user agent has started to capture audio for recognition                    |\n| end         | Fired when the recognition service has disconnected                                       |\n| error       | Fired when a recognition error occurs                                                     |\n| nomatch     | Fired when the recognition service returns a final result with no significant recognition |\n| result      | Fired when the recognition service returns a result                                       |\n| soundend    | Fired when any sound — recognisable or not — has stopped being detected                   |\n| soundstart  | Fired when any sound — recognisable or not — has been detected                            |\n| speechend   | Fired when speech recognized by the recognition service has stopped being detected        |\n| speechstart | Fired when sound recognized by the recognition service as speech has been detected        |\n| start       | fired when the recognition service has begun listening to incoming audio                  |\n\n### Notes\n\nThe process to grant microphone access permissions is automatically managed by the hook (internally used by the `Vocal`\ncomponent).\n\n## Development\n\nThe component can be served for development purpose on `http://localhost:10001/` using:\n\n```\nyarn dev\n```\n\n## Contributing\n\nContributions are warmly welcomed:\n\n-   Fork the repository\n-   Create a feature branch (preferred name convention: `[feature type]_[imperative verb]-[description of the feature]`)\n-   Develop the feature AND write the tests (or write the tests AND develop the feature)\n-   Commit your changes\n    using [Angular Git Commit Guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines)\n-   Submit a Pull Request\n\n## Roadmap\n\n-   Add a connector management to plug external speech-to-text services in\n-   Support continuous speech\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtemps%2Freact-vocal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funtemps%2Freact-vocal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtemps%2Freact-vocal/lists"}