{"_id":"@bream-is-a-fish/aimet-asr-react-client","_rev":"6-70b4f744830d12deab9970025c43d08e","name":"@bream-is-a-fish/aimet-asr-react-client","dist-tags":{"latest":"1.0.5"},"versions":{"0.0.1":{"name":"@bream-is-a-fish/aimet-asr-react-client","version":"0.0.1","keywords":["aimet","react","asr"],"author":{"name":"BreamIsAFish"},"license":"ISC","_id":"@bream-is-a-fish/aimet-asr-react-client@0.0.1","maintainers":[{"name":"bream-is-a-fish","email":"beam7684@gmail.com"}],"homepage":"https://github.com/aimet-tech/aimet-asr-react-client#readme","bugs":{"url":"https://github.com/aimet-tech/aimet-asr-react-client/issues"},"dist":{"shasum":"84614b4194df16829f0de71b561530cfd9050cbe","tarball":"https://registry.npmjs.org/@bream-is-a-fish/aimet-asr-react-client/-/aimet-asr-react-client-0.0.1.tgz","fileCount":48,"integrity":"sha512-S9IsOS04070vOvKffWlyC4nmA9dTVUU12qQ+DTKIFwJORaYWHXB51hetkESenC/Fihyvq4kN+vjZDf6CWRXNWA==","signatures":[{"sig":"MEYCIQDtWaygn55YIpm7tFcWEpDmZ9EJYqE4P3X6K8wzqAKCfwIhAI3kliDOHZjgpm+UKjbIv9/fvTNZGwu0TQVNLxovXe/b","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77616},"main":"./dist/aimet-asr-react-client.umd.js","type":"module","types":"./dist/index.d.ts","module":"./dist/aimet-asr-react-client.es.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/aimet-asr-react-client.es.js","require":"./dist/aimet-asr-react-client.umd.js"}},"gitHead":"914ad62c9ee04bcb5c8449b87cc33111c23ee33b","private":false,"scripts":{"dev":"storybook dev -p 6006","lint":"npx @biomejs/biome lint --write ./src","test":"vitest","build":"tsc && vite build","format":"npx @biomejs/biome check --write --organize-imports-enabled=true ./src","prepack":"json -f package.json -I -e \"delete this.devDependencies; delete this.dependencies\"","test:cov":"vitest run --coverage"},"_npmUser":{"name":"bream-is-a-fish","email":"beam7684@gmail.com"},"repository":{"url":"git+https://github.com/aimet-tech/aimet-asr-react-client.git","type":"git"},"_npmVersion":"10.9.3","description":"React client for connecting with AIMET global ASR","directories":{},"lint-staged":{"*.{js,ts,cjs,mjs,d.cts,d.mts,json,jsonc}":["biome check --files-ignore-unknown=true","biome check --write --no-errors-on-unmatched","biome lint --write --no-errors-on-unmatched --files-ignore-unknown=true","biome format --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@types/react":"^18.0.0 || ^19.0.0","@types/react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aimet-asr-react-client_0.0.1_1757504118422_0.5949623134452355","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bream-is-a-fish/aimet-asr-react-client","version":"1.0.1","keywords":["aimet","react","asr"],"author":{"name":"BreamIsAFish"},"license":"ISC","_id":"@bream-is-a-fish/aimet-asr-react-client@1.0.1","maintainers":[{"name":"bream-is-a-fish","email":"beam7684@gmail.com"}],"homepage":"https://github.com/aimet-tech/aimet-asr-react-client#readme","bugs":{"url":"https://github.com/aimet-tech/aimet-asr-react-client/issues"},"dist":{"shasum":"08e081aea62715b6be4bed3c8d1b0b74dfb85b8f","tarball":"https://registry.npmjs.org/@bream-is-a-fish/aimet-asr-react-client/-/aimet-asr-react-client-1.0.1.tgz","fileCount":48,"integrity":"sha512-wy6KaLJSHNeC1EDc5weIYj3QnZYRmZac58kHHpp6Hr5vCDFLDULX8RbwC9qvpEi75qR/wwrO0zXv4pbD+dontg==","signatures":[{"sig":"MEQCIDngNC+aYyvbf5ibhxqooej+kHm7a9gCRTSitZ8bP/7ZAiAOJ3Vvqfolkcn0RArBLJie6W4PujwDNRnmzNrLzn/CPA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82313},"main":"./dist/aimet-asr-react-client.umd.js","type":"module","types":"./dist/index.d.ts","module":"./dist/aimet-asr-react-client.es.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/aimet-asr-react-client.es.js","require":"./dist/aimet-asr-react-client.umd.js"}},"gitHead":"ac31f7b07b970f1f4b54d97b7351dfe2c3902f0e","private":false,"scripts":{"dev":"storybook dev -p 6006","lint":"npx @biomejs/biome lint --write ./src","test":"vitest","build":"tsc && vite build","format":"npx @biomejs/biome check --write --organize-imports-enabled=true ./src","prepack":"json -f package.json -I -e \"delete this.devDependencies; delete this.dependencies\"","test:cov":"vitest run --coverage"},"_npmUser":{"name":"bream-is-a-fish","email":"beam7684@gmail.com"},"repository":{"url":"git+https://github.com/aimet-tech/aimet-asr-react-client.git","type":"git"},"_npmVersion":"10.9.3","description":"React client for connecting with AIMET global ASR","directories":{},"lint-staged":{"*.{js,ts,cjs,mjs,d.cts,d.mts,json,jsonc}":["biome check --files-ignore-unknown=true","biome check --write --no-errors-on-unmatched","biome lint --write --no-errors-on-unmatched --files-ignore-unknown=true","biome format --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@types/react":"^18.0.0 || ^19.0.0","@types/react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aimet-asr-react-client_1.0.1_1757506786356_0.3226895781147978","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bream-is-a-fish/aimet-asr-react-client","version":"1.0.2","keywords":["aimet","react","asr"],"author":{"name":"BreamIsAFish"},"license":"ISC","_id":"@bream-is-a-fish/aimet-asr-react-client@1.0.2","maintainers":[{"name":"bream-is-a-fish","email":"beam7684@gmail.com"}],"homepage":"https://github.com/aimet-tech/aimet-asr-react-client#readme","bugs":{"url":"https://github.com/aimet-tech/aimet-asr-react-client/issues"},"dist":{"shasum":"53c5e507fbbbb2b8b8f3525310b56a61bc54d222","tarball":"https://registry.npmjs.org/@bream-is-a-fish/aimet-asr-react-client/-/aimet-asr-react-client-1.0.2.tgz","fileCount":48,"integrity":"sha512-E4nbPdw/S/C2D+itcq3PoK0jzriuSeBRfP6oMucO13GDAWyi4kegY3j+WicQXOfLc1C7yxd8RiK8qsstNeCwWQ==","signatures":[{"sig":"MEUCIQCPelVj4nYDDRtPVO92japcW4nCaiadB3P+OycfC+8h5QIgDp1AgxQaAZjsWskTcfsdxph/haNQlWxmYiyu3TTQwFg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81282},"main":"./dist/aimet-asr-react-client.umd.js","type":"module","types":"./dist/index.d.ts","module":"./dist/aimet-asr-react-client.es.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/aimet-asr-react-client.es.js","require":"./dist/aimet-asr-react-client.umd.js"}},"gitHead":"2d8b1fa49190801b6a496252c40be3bb3212296c","private":false,"scripts":{"dev":"storybook dev -p 6006","lint":"npx @biomejs/biome lint --write ./src","test":"vitest","build":"tsc && vite build","format":"npx @biomejs/biome check --write --organize-imports-enabled=true ./src","prepack":"json -f package.json -I -e \"delete this.devDependencies; delete this.dependencies\"","test:cov":"vitest run --coverage"},"_npmUser":{"name":"bream-is-a-fish","email":"beam7684@gmail.com"},"repository":{"url":"git+https://github.com/aimet-tech/aimet-asr-react-client.git","type":"git"},"_npmVersion":"10.9.3","description":"React client for connecting with AIMET global ASR","directories":{},"lint-staged":{"*.{js,ts,cjs,mjs,d.cts,d.mts,json,jsonc}":["biome check --files-ignore-unknown=true","biome check --write --no-errors-on-unmatched","biome lint --write --no-errors-on-unmatched --files-ignore-unknown=true","biome format --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@types/react":"^18.0.0 || ^19.0.0","@types/react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aimet-asr-react-client_1.0.2_1757509675869_0.5778331905569252","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bream-is-a-fish/aimet-asr-react-client","version":"1.0.3","keywords":["aimet","react","asr"],"author":{"name":"BreamIsAFish"},"license":"ISC","_id":"@bream-is-a-fish/aimet-asr-react-client@1.0.3","maintainers":[{"name":"bream-is-a-fish","email":"beam7684@gmail.com"}],"homepage":"https://github.com/aimet-tech/aimet-asr-react-client#readme","bugs":{"url":"https://github.com/aimet-tech/aimet-asr-react-client/issues"},"dist":{"shasum":"45be645900bdae07db3e6d09ae093da0ae8ef0bd","tarball":"https://registry.npmjs.org/@bream-is-a-fish/aimet-asr-react-client/-/aimet-asr-react-client-1.0.3.tgz","fileCount":48,"integrity":"sha512-xGOir1R2VqoFalxNM3VuG4cvE73WPcsx8bdj6EWZ2Ea4abt74MRsx2mAoXRwJowzckP9gm/3WiDGnla2SHsLHw==","signatures":[{"sig":"MEUCIQC0dp1G4+i14Vh9SX8GinarZDA6ENK17q+/n4tctaQT5AIgWeXbvqUwOuO/7oYh4qhCoYNwNEhIMzRpIK5HlmvM/oM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82647},"main":"./dist/aimet-asr-react-client.umd.js","type":"module","_from":"file:bream-is-a-fish-aimet-asr-react-client-1.0.3.tgz","types":"./dist/index.d.ts","module":"./dist/aimet-asr-react-client.es.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/aimet-asr-react-client.es.js","require":"./dist/aimet-asr-react-client.umd.js"}},"private":false,"scripts":{"dev":"storybook dev -p 6006","lint":"npx @biomejs/biome lint --write ./src","test":"vitest","build":"tsc && vite build","format":"npx @biomejs/biome check --write --organize-imports-enabled=true ./src","test:cov":"vitest run --coverage"},"_npmUser":{"name":"bream-is-a-fish","email":"beam7684@gmail.com"},"_resolved":"C:\\Users\\USER\\AppData\\Local\\Temp\\3ae8d389dbcbf64af24076be26cd7b9b\\bream-is-a-fish-aimet-asr-react-client-1.0.3.tgz","_integrity":"sha512-xGOir1R2VqoFalxNM3VuG4cvE73WPcsx8bdj6EWZ2Ea4abt74MRsx2mAoXRwJowzckP9gm/3WiDGnla2SHsLHw==","repository":{"url":"git+https://github.com/aimet-tech/aimet-asr-react-client.git","type":"git"},"_npmVersion":"10.9.3","description":"React client for connecting with AIMET global ASR","directories":{},"lint-staged":{"*.{js,ts,cjs,mjs,d.cts,d.mts,json,jsonc}":["biome check --files-ignore-unknown=true","biome check --write --no-errors-on-unmatched","biome lint --write --no-errors-on-unmatched --files-ignore-unknown=true","biome format --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@types/react":"^18.0.0 || ^19.0.0","@types/react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aimet-asr-react-client_1.0.3_1762517650912_0.6914294853744738","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bream-is-a-fish/aimet-asr-react-client","version":"1.0.4","keywords":["aimet","react","asr"],"author":{"name":"BreamIsAFish"},"license":"ISC","_id":"@bream-is-a-fish/aimet-asr-react-client@1.0.4","maintainers":[{"name":"bream-is-a-fish","email":"beam7684@gmail.com"}],"homepage":"https://github.com/aimet-tech/aimet-asr-react-client#readme","bugs":{"url":"https://github.com/aimet-tech/aimet-asr-react-client/issues"},"dist":{"shasum":"991aa6e7e960e3da9b2b623acfe0ff1b4d6cf056","tarball":"https://registry.npmjs.org/@bream-is-a-fish/aimet-asr-react-client/-/aimet-asr-react-client-1.0.4.tgz","fileCount":53,"integrity":"sha512-0Nx3jDpTbZbTDOyTI4DvuE09pVDayAWidKnPgTtuYNGBJdggGedSkU8SD5s2+hNpkoTM43sdou6mURrQOqWRSg==","signatures":[{"sig":"MEUCIQDVBqvhx5J4Hub97uKR222SA0F1kfr5L9JEPftLArqtOQIgVFH4W9yvyyhDqkbkW77MalQznYiIP2ZrzjtytuKh2GA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":152382},"main":"./dist/aimet-asr-react-client.umd.js","type":"module","_from":"file:bream-is-a-fish-aimet-asr-react-client-1.0.4.tgz","types":"./dist/index.d.ts","module":"./dist/aimet-asr-react-client.es.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/aimet-asr-react-client.es.js","require":"./dist/aimet-asr-react-client.umd.js"}},"private":false,"scripts":{"lint":"npx @biomejs/biome lint --write ./src","test":"vitest","build":"tsc && vite build","format":"npx @biomejs/biome check --write --organize-imports-enabled=true ./src","test:cov":"vitest run --coverage"},"_npmUser":{"name":"bream-is-a-fish","email":"beam7684@gmail.com"},"_resolved":"C:\\Users\\USER\\AppData\\Local\\Temp\\a713e522801198b48b52a689a55af427\\bream-is-a-fish-aimet-asr-react-client-1.0.4.tgz","_integrity":"sha512-0Nx3jDpTbZbTDOyTI4DvuE09pVDayAWidKnPgTtuYNGBJdggGedSkU8SD5s2+hNpkoTM43sdou6mURrQOqWRSg==","repository":{"url":"git+https://github.com/aimet-tech/aimet-asr-react-client.git","type":"git"},"_npmVersion":"10.9.0","description":"React client for connecting with AIMET global ASR","directories":{},"lint-staged":{"*.{js,ts,cjs,mjs,d.cts,d.mts,json,jsonc}":["biome check --files-ignore-unknown=true","biome check --write --no-errors-on-unmatched","biome lint --write --no-errors-on-unmatched --files-ignore-unknown=true","biome format --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@types/react":"^18.0.0 || ^19.0.0","@types/react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aimet-asr-react-client_1.0.4_1768558733885_0.07897810200515498","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@bream-is-a-fish/aimet-asr-react-client","type":"module","private":false,"version":"1.0.5","repository":{"type":"git","url":"git+https://github.com/aimet-tech/aimet-asr-react-client.git"},"description":"React client for connecting with AIMET global ASR","main":"./dist/aimet-asr-react-client.umd.js","module":"./dist/aimet-asr-react-client.es.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/aimet-asr-react-client.es.js","require":"./dist/aimet-asr-react-client.umd.js"}},"engines":{"node":">=22"},"sideEffects":false,"lint-staged":{"*.{js,ts,cjs,mjs,d.cts,d.mts,json,jsonc}":["biome check --files-ignore-unknown=true","biome check --write --no-errors-on-unmatched","biome lint --write --no-errors-on-unmatched --files-ignore-unknown=true","biome format --write --no-errors-on-unmatched"]},"peerDependencies":{"@types/react":"^18.0.0 || ^19.0.0","@types/react-dom":"^18.0.0 || ^19.0.0","react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"keywords":["aimet","react","asr"],"author":{"name":"BreamIsAFish"},"license":"ISC","bugs":{"url":"https://github.com/aimet-tech/aimet-asr-react-client/issues"},"homepage":"https://github.com/aimet-tech/aimet-asr-react-client#readme","scripts":{"build":"tsc && vite build","lint":"npx @biomejs/biome lint --write ./src","format":"npx @biomejs/biome check --write --organize-imports-enabled=true ./src","test":"vitest","test:cov":"vitest run --coverage"},"_id":"@bream-is-a-fish/aimet-asr-react-client@1.0.5","_integrity":"sha512-l+4HmFpQRUEyFpKZLMUcn4d1On9KRhUqL1LQszJTCzQt5PA22dZfE48Lz9K5M0KkJshnZ/VbvwddqqdboWiYNQ==","_resolved":"C:\\Users\\USER\\AppData\\Local\\Temp\\4dddac44cd363be6e440c51f47aa4378\\bream-is-a-fish-aimet-asr-react-client-1.0.5.tgz","_from":"file:bream-is-a-fish-aimet-asr-react-client-1.0.5.tgz","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-l+4HmFpQRUEyFpKZLMUcn4d1On9KRhUqL1LQszJTCzQt5PA22dZfE48Lz9K5M0KkJshnZ/VbvwddqqdboWiYNQ==","shasum":"bcda98de9f0602737638a0258ad9eefac4b55fdf","tarball":"https://registry.npmjs.org/@bream-is-a-fish/aimet-asr-react-client/-/aimet-asr-react-client-1.0.5.tgz","fileCount":56,"unpackedSize":168963,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDw2yPZMOiyfiqu47d2MaRODWXyrk3CtWop2sVdbyRTyAiEAlb6+VWoBHU55hwQ8+ksTYRhSUZYaDnuJKfsHv8wurhs="}]},"_npmUser":{"name":"bream-is-a-fish","email":"beam7684@gmail.com"},"directories":{},"maintainers":[{"name":"bream-is-a-fish","email":"beam7684@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aimet-asr-react-client_1.0.5_1768988592609_0.928948871380626"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-10T11:35:18.352Z","modified":"2026-01-21T09:43:12.839Z","0.0.1":"2025-09-10T11:35:18.629Z","1.0.1":"2025-09-10T12:19:46.660Z","1.0.2":"2025-09-10T13:07:56.051Z","1.0.3":"2025-11-07T12:14:11.130Z","1.0.4":"2026-01-16T10:18:54.039Z","1.0.5":"2026-01-21T09:43:12.747Z"},"bugs":{"url":"https://github.com/aimet-tech/aimet-asr-react-client/issues"},"author":{"name":"BreamIsAFish"},"license":"ISC","homepage":"https://github.com/aimet-tech/aimet-asr-react-client#readme","keywords":["aimet","react","asr"],"repository":{"type":"git","url":"git+https://github.com/aimet-tech/aimet-asr-react-client.git"},"description":"React client for connecting with AIMET global ASR","maintainers":[{"name":"bream-is-a-fish","email":"beam7684@gmail.com"}],"readme":"# AIMET ASR React Client\r\n\r\nA React library for connecting with AIMET global ASR (Automatic Speech Recognition) services. Provides hooks and providers for audio recording and real-time transcription.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @bream-is-a-fish/aimet-asr-react-client\r\n```\r\n\r\n## Features\r\n\r\n- 🎤 **Audio Recording** - Record audio with configurable formats and quality\r\n- 📝 **Real-time Transcription** - Live speech-to-text with WebSocket connection\r\n- 🔄 **WebSocket Management** - Automatic reconnection and connection handling\r\n<!-- - ⚛️ **React Hooks** - Easy-to-use hooks for React applications -->\r\n<!-- - 📦 **Tree-shakable** - Import only what you need -->\r\n\r\n## Quick Start\r\n\r\n### Using the Transcribe Module\r\n\r\nFor real-time transcription, wrap your app with `TranscribeProvider`:\r\n\r\n```tsx\r\nimport { TranscribeProvider } from '@bream-is-a-fish/aimet-asr-react-client';\r\n\r\nfunction App() {\r\n  return (\r\n    <TranscribeProvider>\r\n      <YourApp />\r\n    </TranscribeProvider>\r\n  );\r\n}\r\n```\r\n\r\nThen use the transcription hooks in your components:\r\n\r\n```tsx\r\nimport {\r\n  AudioFile,\r\n  ErrorResponse,\r\n  GcpSpeechResponse,\r\n  TranscribeActionContext,\r\n  TranscribeStateContext,\r\n  TranscribeConnectionParams,\r\n} from \"@bream-is-a-fish/aimet-asr-react-client\";\r\n\r\nconst useMyTranscribe = ({ onTranscription }) => {\r\n  const transcriptionRef = useRef<string[]>([\"\"]);\r\n  const {\r\n    addTranscribeListener,\r\n    removeTranscribeListener,\r\n    startTranscribing,\r\n    stopTranscribing,\r\n    stopTranscribeKeepSocket,\r\n    resumeTranscribe,\r\n  } = useContext(TranscribeActionContext);\r\n  const { serviceInitialized } = useContext(TranscribeStateContext);\r\n\r\n  // Set up transcribe callbacks when component mounts\r\n  useEffect(() => {\r\n    // Make sure to check for serviceInitialized to be true first\r\n    // Before setting up callbacks\r\n    if (!serviceInitialized) return;\r\n\r\n    const onSpeech = (response: GcpSpeechResponse) => {\r\n        // Example of how to handle transcription\r\n        if (response.is_final) {\r\n            transcriptionRef.current = [\r\n                ...transcriptionRef.current,\r\n                response.alternatives[0]?.transcript ?? \"\",\r\n            ];\r\n        } else {\r\n            transcriptionRef.current[transcriptionRef.current.length - 1] =\r\n                response.alternatives[0]?.transcript ?? \"\";\r\n        }\r\n        onTranscription(transcriptionRef.current);\r\n    };\r\n\r\n    const onError = (response: ErrorResponse) => {};\r\n    const onRecordingStart = () => {};\r\n    const onRecordingStop = (audioFile: AudioFile) => {};\r\n\r\n    addTranscribeListener(\"onSpeech\", onSpeech);\r\n    addTranscribeListener(\"onError\", onError);\r\n    addTranscribeListener(\"onRecordingStart\", onRecordingStart);\r\n    addTranscribeListener(\"onRecordingStop\", onRecordingStop);\r\n\r\n    return () => {\r\n      removeTranscribeListener(\"onSpeech\", onSpeech);\r\n      removeTranscribeListener(\"onError\", onError);\r\n      removeTranscribeListener(\"onRecordingStart\", onRecordingStart);\r\n      removeTranscribeListener(\"onRecordingStop\", onRecordingStop);\r\n    };\r\n  }, [serviceInitialized]);\r\n\r\n  const startTranscribe = async () => {\r\n    // ...\r\n    await startTranscribing({\r\n      base_url: // ...,\r\n      access_token: // ...,\r\n      caller_service: // app name e.g. braindi,\r\n      caller_ref_id: // e.g. test_id,\r\n    });\r\n  };\r\n\r\n  const resumeTranscribe = async () => {\r\n    await resumeTranscribe({\r\n      base_url: // ...,\r\n      access_token: // ...,\r\n      caller_service: // app name e.g. braindi,\r\n      caller_ref_id: // e.g. test_id,\r\n    })\r\n  }\r\n\r\n  return {\r\n    startTranscribe,\r\n    startTranscribe,\r\n    resumeTranscribe,\r\n    stopTranscribeKeepSocket,\r\n  };\r\n};\r\n```\r\n\r\n### Using Only the Recorder Module\r\n\r\nFor audio recording without transcription, wrap your app with `RecorderProvider`:\r\n\r\n```tsx\r\nimport { RecorderProvider } from '@bream-is-a-fish/aimet-asr-react-client';\r\n\r\nfunction App() {\r\n  return (\r\n    <RecorderProvider>\r\n      <YourApp />\r\n    </RecorderProvider>\r\n  );\r\n}\r\n```\r\n\r\nThen use the recorder context in your components:\r\n\r\n```tsx\r\nimport { RecorderContext, AudioFile } from \"@bream-is-a-fish/aimet-asr-react-client\";\r\n\r\nconst RecordingComponent = () => {\r\n  // Use the RecorderProvider context\r\n  const { isRecording: recorderIsRecording, startRecord, stopRecord, requestPermission } =\r\n    useContext(RecorderContext);\r\n\r\n  const startRecording = async () => {\r\n    try {\r\n        await requestPermission();\r\n        await startRecord();\r\n        // ...\r\n    } catch (error) {\r\n        // ...\r\n    }\r\n  };\r\n\r\n  const handleRecordFinish = async () => {\r\n    try {\r\n        const audioFile = await stopRecord();\r\n        if (!audioFile) {\r\n            throw new Error(\"Failed to get audio file from recording\");\r\n        }\r\n        \r\n        // Process the audio file\r\n        console.log(\"Audio file:\", audioFile);\r\n        setIsRecording(false);\r\n    } catch (error) {\r\n        // ...\r\n    }\r\n  };\r\n\r\n  return (<div>...</div>);\r\n};\r\n```\r\n\r\n### Accessing Media Stream\r\n\r\nFor advanced use cases where you need direct access to the media stream:\r\n\r\n```tsx\r\nimport { RecorderContext } from \"@bream-is-a-fish/aimet-asr-react-client\";\r\n\r\nconst useAudioVisualizer = () => {\r\n  const { recorderServiceRef } = useContext(RecorderContext);\r\n  \r\n  const startVisualize = () => {\r\n    // Access the underlying media stream\r\n    let stream = recorderServiceRef?.current?.getMediaStream();\r\n    // Use to start audio visualizer\r\n  };\r\n\r\n  return (\r\n   // ...\r\n  );\r\n};\r\n```\r\n\r\n## Local Development\r\n\r\n### Testing the Package Locally with `pnpm link`\r\n\r\nIf you're developing this package and want to test it in another project locally:\r\n\r\n#### 1. In this package directory:\r\n\r\n```bash\r\n# Install dependencies\r\npnpm install\r\n\r\n# Build the package\r\npnpm build\r\n\r\n# Create a global link\r\npnpm link --global\r\n```\r\n\r\n#### 2. In your test project:\r\n\r\n```bash\r\n# Link the package to your project\r\npnpm link --global @bream-is-a-fish/aimet-asr-react-client\r\n```\r\n\r\n#### 3. During development:\r\n\r\nWhenever you make changes to the package:\r\n\r\n```bash\r\n# Rebuild the package\r\npnpm build\r\n```\r\n\r\nYour test project will automatically use the updated version.\r\n\r\n#### 4. Unlinking when done:\r\n\r\nIn your test project:\r\n```bash\r\n# Unlink the package\r\npnpm unlink --global @bream-is-a-fish/aimet-asr-react-client\r\n\r\n# Reinstall the published version\r\npnpm install @bream-is-a-fish/aimet-asr-react-client\r\n```\r\n\r\nIn this package directory (optional cleanup):\r\n```bash\r\n# Remove the global link\r\npnpm unlink --global\r\n```\r\n\r\n### Development Tips\r\n\r\n- **Watch mode**: Use `pnpm build --watch` to automatically rebuild on file changes\r\n- **Type checking**: Run `pnpm run type-check` to verify TypeScript types\r\n- **Testing**: Make sure to test all error scenarios and edge cases\r\n- **React versions**: Ensure your test project uses compatible React versions (React 18+)\r\n\r\n## API Reference\r\n\r\n### Providers\r\n\r\n#### `TranscribeProvider`\r\nProvides transcription context to child components.\r\n\r\n#### `RecorderProvider`\r\nProvides audio recording context to child components.\r\n\r\n### Hooks\r\n\r\n#### `useTranscribe()`\r\nHook for managing transcription state and actions.\r\n\r\n#### `useRecorder()`\r\nHook for managing audio recording state and actions.\r\n\r\n#### `useIsRecording()`\r\nHook to check if recording is currently active.\r\n\r\n### Contexts\r\n\r\n#### `TranscribeActionContext`\r\nContext containing transcription action methods:\r\n- `startTranscribing(params)`\r\n- `stopTranscribing()`\r\n- `resumeTranscribe(params)`\r\n- `addTranscribeListener(event, callback)`\r\n- `removeTranscribeListener(event, callback)`\r\n\r\n#### `TranscribeStateContext`\r\nContext containing transcription state:\r\n- `serviceInitialized: boolean`\r\n\r\n#### `RecorderContext`\r\nContext containing recorder methods and state:\r\n- `isRecording: boolean`\r\n- `startRecord()`\r\n- `stopRecord()`\r\n- `requestPermission()`\r\n- `recorderServiceRef: RefObject<AudioRecorderService>` - Access to the underlying recorder service\r\n\r\n### Types\r\n\r\n#### `TranscribeConnectionParams`\r\n```typescript\r\ninterface TranscribeConnectionParams {\r\n  base_url: string;\r\n  access_token: string;\r\n  caller_service: string;\r\n  caller_ref_id?: string;\r\n  model?: string;\r\n}\r\n```\r\n\r\n#### `AudioFile`\r\n```typescript\r\ninterface AudioFile {\r\n  blob: Blob;\r\n  format: string;\r\n  fileType: string;\r\n  duration: number;\r\n}\r\n```\r\n","readmeFilename":"README.md"}