{"_id":"@alphaspeech/asr_kit","_rev":"13-8b1ed8f396cade2e6bd8bbb91a7d2b39","name":"@alphaspeech/asr_kit","dist-tags":{"latest":"2.0.9"},"versions":{"1.0.5":{"name":"@alphaspeech/asr_kit","version":"1.0.5","author":{"name":"alphaspeech"},"license":"MIT","_id":"@alphaspeech/asr_kit@1.0.5","maintainers":[{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"}],"homepage":"https://alphaspeech.de/","bugs":{"email":"sprich-mit-uns@alphaspeech.de"},"dist":{"shasum":"ecc08d2435a2f6cef4204a51b18cc069c98623fa","tarball":"https://registry.npmjs.org/@alphaspeech/asr_kit/-/asr_kit-1.0.5.tgz","fileCount":10,"integrity":"sha512-x87TlA8sAZ3Eo8UtVRqZ/t22gNWsvH45w8QKoPi/HN58TizAZlRFKIGaiUGSdWhEEGxLVvQLEPTkRM7+CT2p6g==","signatures":[{"sig":"MEUCIQC+Fh1FnFtjeLiPVo/tjkYcFrudrl6PkumUGDDFnv7XzgIgImb6TC2qzV9Qo4jR9cOu2VO9AoYXjlYf7g+hchdud9o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":121556},"main":"dist/index.js","types":"./dist/index.d.ts","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=17"},"gitHead":"2c09262c4a82208aee762c62c2f0ade2947b8296","scripts":{"test":"run-s test:unit test:lint test:build","build":"microbundle-crl --no-compress --format modern,cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","deploy":"gh-pages -d example/build","prepare":"run-s build","predeploy":"cd example && npm install && npm run build","test:lint":"eslint .","test:unit":"cross-env CI=1 react-scripts test --env=jsdom","test:build":"run-s build","test:watch":"react-scripts test --env=jsdom"},"_npmUser":{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"},"repository":{"url":"git+https://gitlab.com/alphaspeech/alphaspeech-npm-asr-kit.git","type":"git"},"_npmVersion":"10.9.0","description":"A npm package to simplify connecting to the alphaspeech live ASR in typescript and react.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"eslint":"^8.57.0","postcss-preset-env":"^9.5.4","postcss-flexbugs-fixes":"^5.0.2"},"_hasShrinkwrap":false,"packageManager":"yarn@4.1.1","devDependencies":{"react":"^18.2.0","eslint":"^8.57.0","cross-env":"^7.0.2","react-dom":"^18.2.0","typescript":"^5.7.2","@types/jest":"^25.1.4","@types/node":"^12.12.38","npm-run-all":"^4.1.5","@types/react":"^16.9.27","react-scripts":"^5.0.1","microbundle-crl":"^0.13.10","@types/react-dom":"^16.9.7","@types/babel__core":"^7.20.5","postcss-preset-env":"^9.5.4","@testing-library/react":"^9.5.0","postcss-flexbugs-fixes":"^5.0.2","@testing-library/jest-dom":"^4.2.4","@typescript-eslint/parser":"^7.5.0","@testing-library/user-event":"^7.2.1","@typescript-eslint/eslint-plugin":"^7.5.0","@babel/plugin-proposal-unicode-property-regex":"^7.18.6","@babel/plugin-transform-unicode-property-regex":"^7.24.1"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/asr_kit_1.0.5_1738766090480_0.32327059865128804","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@alphaspeech/asr_kit","version":"2.0.1","author":{"name":"alphaspeech"},"license":"MIT","_id":"@alphaspeech/asr_kit@2.0.1","maintainers":[{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"}],"homepage":"https://alphaspeech.de/","bugs":{"email":"sprich-mit-uns@alphaspeech.de"},"dist":{"shasum":"0a6ce1c7197932adec9a05f2390a2416fe441707","tarball":"https://registry.npmjs.org/@alphaspeech/asr_kit/-/asr_kit-2.0.1.tgz","fileCount":10,"integrity":"sha512-Yolg+Zj5fFK3Se+eKTsO8mjdEmNPgcWvZs6n8Dmz99tSONNHfQJaP1/UZ+uLvvbNvMefgkig4g+kAMW0wv7OSA==","signatures":[{"sig":"MEYCIQCkje12TOqmGzhtWVdfO38axUENp+XxqhkztrD03szYHgIhANwGKP5LHkNfPJjckM3DK2Jj4XIfI7w2UZNh+eNFYYa9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":122235},"main":"dist/index.js","types":"./dist/index.d.ts","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=17"},"gitHead":"4a799a174790adc6b25868f0a1d9a343853471c6","scripts":{"test":"run-s test:unit test:lint test:build","build":"microbundle-crl --no-compress --format modern,cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","deploy":"gh-pages -d example/build","prepare":"run-s build","predeploy":"cd example && npm install && npm run build","test:lint":"eslint .","test:unit":"cross-env CI=1 react-scripts test --env=jsdom","test:build":"run-s build","test:watch":"react-scripts test --env=jsdom"},"_npmUser":{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"},"repository":{"url":"git+https://gitlab.com/alphaspeech/alphaspeech-npm-asr-kit.git","type":"git"},"_npmVersion":"10.9.0","description":"A npm package to simplify connecting to the alphaspeech live ASR in typescript and react.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"eslint":"^8.57.0","postcss-preset-env":"^9.5.4","postcss-flexbugs-fixes":"^5.0.2"},"_hasShrinkwrap":false,"packageManager":"yarn@4.1.1","devDependencies":{"react":"^18.2.0","eslint":"^8.57.0","cross-env":"^7.0.2","react-dom":"^18.2.0","typescript":"^5.7.3","@types/jest":"^25.1.4","@types/node":"^12.12.38","npm-run-all":"^4.1.5","@types/react":"^16.9.27","react-scripts":"^5.0.1","microbundle-crl":"^0.13.10","@types/react-dom":"^16.9.7","@types/babel__core":"^7.20.5","postcss-preset-env":"^9.5.4","@testing-library/react":"^9.5.0","postcss-flexbugs-fixes":"^5.0.2","@testing-library/jest-dom":"^4.2.4","@typescript-eslint/parser":"^7.5.0","@testing-library/user-event":"^7.2.1","@typescript-eslint/eslint-plugin":"^7.5.0","@babel/plugin-proposal-unicode-property-regex":"^7.18.6","@babel/plugin-transform-unicode-property-regex":"^7.24.1"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/asr_kit_2.0.1_1738793903308_0.7029313847225545","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@alphaspeech/asr_kit","version":"2.0.4","author":{"name":"alphaspeech"},"license":"MIT","_id":"@alphaspeech/asr_kit@2.0.4","maintainers":[{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"}],"homepage":"https://alphaspeech.de/","bugs":{"email":"sprich-mit-uns@alphaspeech.de"},"dist":{"shasum":"b31a79de8fd4972e7fe48f37647e8d99bc465aa9","tarball":"https://registry.npmjs.org/@alphaspeech/asr_kit/-/asr_kit-2.0.4.tgz","fileCount":12,"integrity":"sha512-jrodT69mYACq3FbGRRbJGMlV5xthhlrjRJ+XN88szXPIzLz3GIBaoeFEzzQErszu4csbtAtl4BbYWj8zBjhjmw==","signatures":[{"sig":"MEUCIQDUVuBy6O3zPJU4bfqKR8/51Ilbc+6Lt3Y/1qZi4T9X3wIgApArtSGKt1+cZ5UnGifmS9tTi288EGR7/yMSSEQNp1k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32478},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=17"},"gitHead":"a5af5edaea7ead879afb4e33fb525c5191a3773c","scripts":{"dev":"vite","lint":"eslint .","build":"vite build && tsc","preview":"vite preview"},"_npmUser":{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"},"repository":{"url":"git+https://gitlab.com/alphaspeech/alphaspeech-npm-asr-kit.git","type":"git"},"_npmVersion":"10.9.0","description":"A npm package to simplify connecting to the alphaspeech live ASR in typescript and react.","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.0.0","react":"^19.1.0","eslint":"^9.29.0","globals":"^16.2.0","react-dom":"^19.1.0","@eslint/js":"^9.29.0","typescript":"^5.8.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","@vitejs/plugin-react":"^4.5.2","eslint-plugin-react-hooks":"^5.2.0","eslint-plugin-react-refresh":"^0.4.20","rollup-plugin-peer-deps-external":"^2.2.4"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/asr_kit_2.0.4_1755607762036_0.010667211686911315","host":"s3://npm-registry-packages-npm-production"}},"2.0.5":{"name":"@alphaspeech/asr_kit","version":"2.0.5","author":{"name":"alphaspeech"},"license":"MIT","_id":"@alphaspeech/asr_kit@2.0.5","maintainers":[{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"}],"homepage":"https://alphaspeech.de/","bugs":{"email":"sprich-mit-uns@alphaspeech.de"},"dist":{"shasum":"e4da1ee4bafe11a8cdc3ea82ed8d855230273cc7","tarball":"https://registry.npmjs.org/@alphaspeech/asr_kit/-/asr_kit-2.0.5.tgz","fileCount":12,"integrity":"sha512-VTNYfnBgYGMlkhlW7E1GH1tvh/XjRHd+9kJm4iAoFwJm/L2V5GpyW1ssgwxgpqR8zfdLE4z1n54YvjS4IsvY0w==","signatures":[{"sig":"MEUCIQC01Ez8/r2K73m6CgjKuYb7k3v8Xu2KVziac8Is9qU5swIgUwn4kqiA45Mp+d4tT2OC7y8NvrpvrEAFw0clKcXp63Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33492},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=17"},"gitHead":"9f26d8f54ce965983246959c17b725e23e131bcb","scripts":{"dev":"vite","lint":"eslint .","build":"vite build && tsc","preview":"vite preview"},"_npmUser":{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"},"repository":{"url":"git+https://gitlab.com/alphaspeech/alphaspeech-npm-asr-kit.git","type":"git"},"_npmVersion":"10.9.0","description":"A npm package to simplify connecting to the alphaspeech live ASR in typescript and react.","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.0.0","react":"^19.1.0","eslint":"^9.29.0","globals":"^16.2.0","react-dom":"^19.1.0","@eslint/js":"^9.29.0","typescript":"^5.8.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","@vitejs/plugin-react":"^4.5.2","eslint-plugin-react-hooks":"^5.2.0","eslint-plugin-react-refresh":"^0.4.20","rollup-plugin-peer-deps-external":"^2.2.4"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/asr_kit_2.0.5_1756407832555_0.12560141715148054","host":"s3://npm-registry-packages-npm-production"}},"2.0.7":{"name":"@alphaspeech/asr_kit","version":"2.0.7","author":{"name":"alphaspeech"},"license":"MIT","_id":"@alphaspeech/asr_kit@2.0.7","maintainers":[{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"}],"homepage":"https://alphaspeech.de/","bugs":{"email":"sprich-mit-uns@alphaspeech.de"},"dist":{"shasum":"27d6429acd670686f60e25cef682e317b2edcb42","tarball":"https://registry.npmjs.org/@alphaspeech/asr_kit/-/asr_kit-2.0.7.tgz","fileCount":13,"integrity":"sha512-9zKSh6MszV+v14hrBq0xcjSDCEzwLplVoNPa+1xGjHViQMZs+0xeE/w5TjqDgsoO1DZ06UdC+XR1+8Os7XvScw==","signatures":[{"sig":"MEUCIEZpDuTEpoS0o1v4B/ys850tSYaGlG6GsU54mFbUy8uVAiEAmLs/E6BWoQnJT7KEdXWl2EFMZYKkajliKP+/isYketM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33779},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=17"},"gitHead":"9ed72c66b003956f17c26ef378d2c1870a252b4c","scripts":{"dev":"vite","lint":"eslint .","build":"vite build && tsc","preview":"vite preview"},"_npmUser":{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"},"repository":{"url":"git+https://gitlab.com/alphaspeech/alphaspeech-npm-asr-kit.git","type":"git"},"_npmVersion":"10.9.0","description":"A npm package to simplify connecting to the alphaspeech live ASR in typescript and react.","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.0.0","react":"^19.1.0","eslint":"^9.29.0","globals":"^16.2.0","react-dom":"^19.1.0","@eslint/js":"^9.29.0","typescript":"^5.8.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","@vitejs/plugin-react":"^4.5.2","eslint-plugin-react-hooks":"^5.2.0","eslint-plugin-react-refresh":"^0.4.20","rollup-plugin-peer-deps-external":"^2.2.4"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/asr_kit_2.0.7_1758556639141_0.1743378975224763","host":"s3://npm-registry-packages-npm-production"}},"2.0.8":{"name":"@alphaspeech/asr_kit","version":"2.0.8","author":{"name":"alphaspeech"},"license":"MIT","_id":"@alphaspeech/asr_kit@2.0.8","maintainers":[{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"}],"homepage":"https://alphaspeech.de/","bugs":{"email":"sprich-mit-uns@alphaspeech.de"},"dist":{"shasum":"187e853dadd716d08eca2486a00824378279962d","tarball":"https://registry.npmjs.org/@alphaspeech/asr_kit/-/asr_kit-2.0.8.tgz","fileCount":13,"integrity":"sha512-KUc5tFteO+vBFMoVVa/AKsc2zJJ5ga3AOtjqe7gUXhXEeKWiowkKy0FVKjPyV3dASGcdZsYO9eoLYgmoDrTkQw==","signatures":[{"sig":"MEYCIQDGCkcHWVmVZqti0Vl9opf5mwhkdUJlVYGD2RbLb6u/NgIhAOVpGT9KNKghVx7CRYwU/f1eb4MyKkUeGMqXVvZCTJqO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34534},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=17"},"gitHead":"bf56ab95b15713384deeead990b20e006ba63b09","scripts":{"dev":"vite","lint":"eslint .","build":"vite build && tsc","preview":"vite preview"},"_npmUser":{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"},"repository":{"url":"git+https://gitlab.com/alphaspeech/alphaspeech-npm-asr-kit.git","type":"git"},"_npmVersion":"11.6.1","description":"A npm package to simplify connecting to the alphaspeech live ASR in typescript and react.","directories":{},"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.0.0","react":"^19.1.0","eslint":"^9.29.0","globals":"^16.2.0","react-dom":"^19.1.0","@eslint/js":"^9.29.0","typescript":"^5.8.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","@vitejs/plugin-react":"^4.5.2","eslint-plugin-react-hooks":"^5.2.0","eslint-plugin-react-refresh":"^0.4.20","rollup-plugin-peer-deps-external":"^2.2.4"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/asr_kit_2.0.8_1763236441508_0.3970174310428445","host":"s3://npm-registry-packages-npm-production"}},"2.0.9":{"_id":"@alphaspeech/asr_kit@2.0.9","bugs":{"email":"sprich-mit-uns@alphaspeech.de"},"dist":{"shasum":"a47920566ee60bf74202291a48e1f6c4aa574a0c","tarball":"https://registry.npmjs.org/@alphaspeech/asr_kit/-/asr_kit-2.0.9.tgz","fileCount":13,"integrity":"sha512-48+npjd19u4c5kg/yR0US8dp4+zLJUPeX9sN+cNk2qCvd2fctmQYncZvygwnFq7vAOlqaajadiHpNu+0WX5suA==","signatures":[{"sig":"MEQCIF531CpZegTBeTjf/sGAAFnZ5Lds29jcqE76fqWwQl9xAiB8H67/WpNcgSoaXijQ2iBOte7dGajpcPFc0r5rgph7sA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDktpktfV6vrtDDk/H7fvA8gKC6p5K7UrBvS8XQ2GnY4gIhAJI0ckd+Vd/knMWcsfOOAY+xTy9etKgD0vrq+FS6XG3t"}],"unpackedSize":34582},"main":"dist/index.js","name":"@alphaspeech/asr_kit","type":"module","types":"dist/index.d.ts","author":{"name":"alphaspeech"},"module":"dist/index.modern.js","source":"src/index.tsx","engines":{"node":">=17"},"gitHead":"fc36205e03d62b2d5e5aa9c98379a7bbddf1399b","license":"MIT","scripts":{"dev":"vite","lint":"eslint .","build":"vite build && tsc","preview":"vite preview"},"version":"2.0.9","_npmUser":{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"},"homepage":"https://alphaspeech.de/","repository":{"url":"git+https://gitlab.com/alphaspeech/alphaspeech-npm-asr-kit.git","type":"git"},"_npmVersion":"11.6.1","description":"A npm package to simplify connecting to the alphaspeech live ASR in typescript and react.","directories":{},"maintainers":[{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"}],"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^7.0.0","react":"^19.1.0","eslint":"^9.29.0","globals":"^16.2.0","react-dom":"^19.1.0","@eslint/js":"^9.29.0","typescript":"^5.8.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","@vitejs/plugin-react":"^4.5.2","eslint-plugin-react-hooks":"^5.2.0","eslint-plugin-react-refresh":"^0.4.20","rollup-plugin-peer-deps-external":"^2.2.4"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/asr_kit_2.0.9_1789316796292_0.9963966218282061"}}},"time":{"created":"2025-02-05T14:34:50.396Z","modified":"2026-09-13T16:26:36.507Z","1.0.5":"2025-02-05T14:34:50.721Z","2.0.0":"2025-02-05T21:50:59.917Z","2.0.1":"2025-02-05T22:18:23.499Z","2.0.3":"2025-08-15T17:29:59.372Z","2.0.4":"2025-08-19T12:49:22.357Z","2.0.5":"2025-08-28T19:03:52.764Z","2.0.6":"2025-09-22T15:54:51.398Z","2.0.7":"2025-09-22T15:57:19.402Z","2.0.8":"2025-11-15T19:54:01.689Z","2.0.9":"2026-09-13T16:26:36.365Z"},"bugs":{"email":"sprich-mit-uns@alphaspeech.de"},"author":{"name":"alphaspeech"},"license":"MIT","homepage":"https://alphaspeech.de/","repository":{"url":"git+https://gitlab.com/alphaspeech/alphaspeech-npm-asr-kit.git","type":"git"},"description":"A npm package to simplify connecting to the alphaspeech live ASR in typescript and react.","maintainers":[{"name":"lfr.alphaspeech","email":"lia.frischholz@linguwerk.de"}],"readme":"# asr_kit npm package\n\nThis npm package provides a client for to the alphaspeech pro live ASR via webRTC.\n\n## Install requirements\n\nRun `npm install` at root-project level. Dependencies for the example project will automatically be installed with this command.\n\n## Usage\n\n1. Create the client \n```bash\nconst asr = new AlphaspeechClient({\n  asr_url: domain.url,\n  jwt_token: domain.auth,\n  configuration:  domain.rtcConf,\n  domainConf: domain.domainConf,\n  settings: {\n    useTestAudioFiles: false,\n    testAudioFileName: \"\"\n  }\n} as AlphaspeechClientProps);\n```\n\n2. Define your onHypothesis function\n```bash\nfunction onHypothesis(response: any) {\n    let message: any = JSON.parse(response.data);\n    // handle your message here\n\n    // to get just the message text\n    let messageText: str = message.hypothesis.map(c => c.content).join(' ');\n}\n```\n\n3. Define state handling\n```bash\nconst [currentState, setCurrentState] = useState(0);\n\nuseEffect(() => {\n    switch (currentState) {\n      case state.connecting:\n        asr.connectToASR(onHypothesis, currentState, setCurrentState, isFirstTimeShowAllowAccessDialog, setIsFirstTimeShowAllowAccessDialog);\n        break;\n      case state.disconnecting:\n        asr.stopSpeechRecognition(setCurrentState);\n        break;\n      case state.unmute:\n        asr.unmute(setCurrentState);\n        break;\n      case state.mute:\n        asr.mute(currentState, setCurrentState);\n        break;\n    }\n}, [currentState]);\n```\n\n4. Define first time connection parameters to ensure microphone access will be prompted\n```bash\nconst [isFirstTimeShowAllowAccessDialog, setIsFirstTimeShowAllowAccessDialog] = useState(true);\n```\n\n5. Connect to ASR\n```bash\nsetCurrentState(state.connecting);\n```\n\nIf you mute the ASR, remember that the connection will time out after ~60s without activity. In order to keep a session alive,\nregularly call asr.hold() to reset the timeout counter.\n\n## How to develop this package\n\nRefer to https://gitlab.com/alphaspeech/alphaspeech-npm-asr-kit\n\n### Structure\n\n`./index.tsx` contains every export the package should have.\nThe `src/service` directory contains connectivity methods to other services.\n\n","readmeFilename":"README.md"}