{"_id":"@sign-speak/react-sdk","_rev":"46-21cc625a48e7dc7711cd0a8a49b0959f","name":"@sign-speak/react-sdk","dist-tags":{"latest":"0.7.3"},"versions":{"0.7.0":{"name":"@sign-speak/react-sdk","version":"0.7.0","keywords":["sign language","ASL","avatar","gesture","gesture recognition","speech","speech recognition","ai","ml","api","sdk"],"author":{"name":"Sign-Speak"},"_id":"@sign-speak/react-sdk@0.7.0","maintainers":[{"name":"sign-speak","email":"nicholas@sign-speak.com"}],"homepage":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk#readme","bugs":{"url":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk/issues"},"dist":{"shasum":"e32535f9458f49c3e267c33053d6452ea103e9e2","tarball":"https://registry.npmjs.org/@sign-speak/react-sdk/-/react-sdk-0.7.0.tgz","fileCount":38,"integrity":"sha512-wvhh9rkpVehgcUjBBPjSajn6JucyKskrqf3CAbsMKkIY9fUxluHWUO+swLAUpMlyT/LNrAEZVYheBTJAcupcCA==","signatures":[{"sig":"MEUCIQC4M/RHp5++HA7fpNiVjDcgpWYNcON1XjsX5O51gtZnLAIgUzP9uQJk1z/JGDzGbYBQVNUuvMD0nHwjb76bUt2yKA4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":110616},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"cd88d38880b45ff136fa270aad51b5facad5734a","scripts":{"build":"tsc","postinstall":"echo '🚀 Please ensure you have React 17 or 18 installed!'","prepublishOnly":"npm run build"},"_npmUser":{"name":"sign-speak","email":"nicholas@sign-speak.com"},"repository":{"url":"git+https://github.com/Sign-Speak-Development/sign-speak-react-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"Unlock Sign Language Recognition, Avatar, and Speech Recognition.","directories":{},"_nodeVersion":"22.4.1","browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"dependencies":{},"eslintConfig":{"extends":["react-app","react-app/jest","plugin:storybook/recommended"]},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","postcss":"^8.4.35","webpack":"^5.90.3","react-dom":"^18.2.0","css-loader":"^6.10.0","prop-types":"^15.8.1","typescript":"^4.9.5","@types/node":"^22.13.8","tailwindcss":"^3.4.1","@types/react":"^19.0.10","autoprefixer":"^10.4.18","style-loader":"^3.3.4","@types/react-dom":"^19.0.4"},"peerDependencies":{"react":">=18.0.0 <20.0.0","react-dom":">=18.0.0 <20.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/react-sdk_0.7.0_1741026524617_0.2177560933627618","host":"s3://npm-registry-packages-npm-production"}},"0.7.1":{"name":"@sign-speak/react-sdk","version":"0.7.1","keywords":["sign language","ASL","avatar","gesture","gesture recognition","speech","speech recognition","ai","ml","api","sdk"],"author":{"name":"Sign-Speak"},"_id":"@sign-speak/react-sdk@0.7.1","maintainers":[{"name":"sign-speak","email":"nicholas@sign-speak.com"}],"homepage":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk#readme","bugs":{"url":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk/issues"},"dist":{"shasum":"81b969dcffa03dbfb0422b2dc23274bde7cfa55d","tarball":"https://registry.npmjs.org/@sign-speak/react-sdk/-/react-sdk-0.7.1.tgz","fileCount":38,"integrity":"sha512-siUlxruDjwH3s2ALmx6evYtTJytCJBCzNdI+qyRMYR4sGcwekaJvm8aQRA2omP9tQ+zJNE5yi6JTnirKXM6ozA==","signatures":[{"sig":"MEUCIGFOGOlgGnAn0HZHii5dp0I7h6d20Bpe25NSRdi7pq4HAiEAmFSUmMYqw0ejZNVY2/gPXtzPjrPBoAPfWN0VZQT+NmE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":112139},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"f1aa7d015ff45e4b9089fbef5355bbb0095d4e1c","scripts":{"build":"tsc","postinstall":"echo '🚀 Please ensure you have React 17 or 18 installed!'","prepublishOnly":"npm run build"},"_npmUser":{"name":"sign-speak","email":"nicholas@sign-speak.com"},"repository":{"url":"git+https://github.com/Sign-Speak-Development/sign-speak-react-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"Unlock Sign Language Recognition, Avatar, and Speech Recognition.","directories":{},"_nodeVersion":"22.4.1","browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"dependencies":{},"eslintConfig":{"extends":["react-app","react-app/jest","plugin:storybook/recommended"]},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","postcss":"^8.4.35","webpack":"^5.90.3","react-dom":"^18.2.0","css-loader":"^6.10.0","prop-types":"^15.8.1","typescript":"^4.9.5","@types/node":"^22.13.8","tailwindcss":"^3.4.1","@types/react":"^19.0.10","autoprefixer":"^10.4.18","style-loader":"^3.3.4","@types/react-dom":"^19.0.4"},"peerDependencies":{"react":">=18.0.0 <20.0.0","react-dom":">=18.0.0 <20.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/react-sdk_0.7.1_1741048621913_0.5218943582621252","host":"s3://npm-registry-packages-npm-production"}},"0.7.2":{"name":"@sign-speak/react-sdk","version":"0.7.2","keywords":["sign language","ASL","avatar","gesture","gesture recognition","speech","speech recognition","ai","ml","api","sdk"],"author":{"name":"Sign-Speak"},"_id":"@sign-speak/react-sdk@0.7.2","maintainers":[{"name":"sign-speak","email":"nicholas@sign-speak.com"}],"homepage":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk#readme","bugs":{"url":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk/issues"},"dist":{"shasum":"59d581010cc164b662d725e85c160469a763b956","tarball":"https://registry.npmjs.org/@sign-speak/react-sdk/-/react-sdk-0.7.2.tgz","fileCount":38,"integrity":"sha512-PVRuXGCn3/KOGipoonCaup1lRE6JZxXMOj2S7Nul89rP1uCGRl61hzgn00hJbObK5WmZ28gt5nOZ7wcO7Cu5Dg==","signatures":[{"sig":"MEQCIC1RIa6Tjq+CkztBjZ/LYT++3/ei7uy04jz4a7EEV/U0AiBIQu363uw/2ohcAHMAgqmLfU5HodyHBRIaffGm2Q7frQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":112147},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"f1aa7d015ff45e4b9089fbef5355bbb0095d4e1c","scripts":{"build":"tsc","postinstall":"echo '🚀 Please ensure you have React 17 or 18 installed!'","prepublishOnly":"npm run build"},"_npmUser":{"name":"sign-speak","email":"nicholas@sign-speak.com"},"repository":{"url":"git+https://github.com/Sign-Speak-Development/sign-speak-react-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"Unlock Sign Language Recognition, Avatar, and Speech Recognition.","directories":{},"_nodeVersion":"22.4.1","browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"dependencies":{},"eslintConfig":{"extends":["react-app","react-app/jest","plugin:storybook/recommended"]},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","postcss":"^8.4.35","webpack":"^5.90.3","react-dom":"^18.2.0","css-loader":"^6.10.0","prop-types":"^15.8.1","typescript":"^4.9.5","@types/node":"^22.13.8","tailwindcss":"^3.4.1","@types/react":"^19.0.10","autoprefixer":"^10.4.18","style-loader":"^3.3.4","@types/react-dom":"^19.0.4"},"peerDependencies":{"react":">=18.0.0 <20.0.0","react-dom":">=18.0.0 <20.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/react-sdk_0.7.2_1742610618399_0.2720034181041395","host":"s3://npm-registry-packages-npm-production"}},"0.7.3":{"name":"@sign-speak/react-sdk","version":"0.7.3","description":"Unlock Sign Language Recognition, Avatar, and Speech Recognition.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build","postinstall":"echo '🚀 Please ensure you have React 17 or 18 installed!'"},"peerDependencies":{"react":">=18.0.0 <20.0.0","react-dom":">=18.0.0 <20.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}},"dependencies":{},"devDependencies":{"typescript":"^4.9.5","@types/node":"^22.13.8","@types/react":"^19.0.10","@types/react-dom":"^19.0.4","autoprefixer":"^10.4.18","css-loader":"^6.10.0","postcss":"^8.4.35","prop-types":"^15.8.1","react":"^18.2.0","react-dom":"^18.2.0","style-loader":"^3.3.4","tailwindcss":"^3.4.1","webpack":"^5.90.3"},"eslintConfig":{"extends":["react-app","react-app/jest","plugin:storybook/recommended"]},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"repository":{"type":"git","url":"git+https://github.com/Sign-Speak-Development/sign-speak-react-sdk.git"},"keywords":["sign language","ASL","avatar","gesture","gesture recognition","speech","speech recognition","ai","ml","api","sdk"],"author":{"name":"Sign-Speak"},"_id":"@sign-speak/react-sdk@0.7.3","gitHead":"8045ce1408d7c70c6548baee241368dffb67231f","bugs":{"url":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk/issues"},"homepage":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk#readme","_nodeVersion":"22.4.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-PBwQLom9zN+0mVeBK56k+5Gkzghhd7j+NgHq+iJMXa2p0FUtyGVJuXc96IO7TX88JMdTkTedRR8Psb2a6S5fsg==","shasum":"7f3df76e15ee74f0ff7850715cccacadd1c6e1b3","tarball":"https://registry.npmjs.org/@sign-speak/react-sdk/-/react-sdk-0.7.3.tgz","fileCount":38,"unpackedSize":112145,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBsvX4QuyQSUH4bAgiDKWeWixoblBC7tm1fNxUNiR5IHAiB2k9Jb8YGdC/97vG3p/byKhm0EFkkZUZcFrWbp8c378Q=="}]},"_npmUser":{"name":"sign-speak","email":"nicholas@sign-speak.com"},"directories":{},"maintainers":[{"name":"sign-speak","email":"nicholas@sign-speak.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-sdk_0.7.3_1742656457693_0.02306798841938451"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-03T06:49:03.049Z","modified":"2025-03-22T15:14:18.045Z","0.1.0":"2025-03-03T06:49:03.338Z","0.1.1":"2025-03-03T06:50:06.051Z","0.1.3":"2025-03-03T07:37:13.160Z","0.1.4":"2025-03-03T07:42:20.521Z","0.1.5":"2025-03-03T07:44:17.795Z","0.1.6":"2025-03-03T09:32:09.232Z","0.1.7":"2025-03-03T09:36:06.050Z","0.1.8":"2025-03-03T10:13:06.979Z","0.1.9":"2025-03-03T10:32:50.712Z","0.1.10":"2025-03-03T16:51:40.011Z","0.1.11":"2025-03-03T16:55:08.355Z","0.1.12":"2025-03-03T17:07:06.175Z","0.1.13":"2025-03-03T17:14:07.530Z","0.1.14":"2025-03-03T17:31:16.947Z","0.1.15":"2025-03-03T17:34:13.748Z","0.1.16":"2025-03-03T17:39:18.664Z","0.1.17":"2025-03-03T17:42:39.306Z","0.1.18":"2025-03-03T17:46:35.834Z","0.1.19":"2025-03-03T18:01:26.629Z","0.1.20":"2025-03-03T18:04:07.790Z","0.1.21":"2025-03-03T18:16:57.811Z","0.7.0":"2025-03-03T18:28:45.701Z","0.7.1":"2025-03-04T00:37:02.096Z","0.7.2":"2025-03-22T02:30:18.603Z","0.7.3":"2025-03-22T15:14:17.870Z"},"bugs":{"url":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk/issues"},"author":{"name":"Sign-Speak"},"homepage":"https://github.com/Sign-Speak-Development/sign-speak-react-sdk#readme","keywords":["sign language","ASL","avatar","gesture","gesture recognition","speech","speech recognition","ai","ml","api","sdk"],"repository":{"type":"git","url":"git+https://github.com/Sign-Speak-Development/sign-speak-react-sdk.git"},"description":"Unlock Sign Language Recognition, Avatar, and Speech Recognition.","maintainers":[{"name":"sign-speak","email":"nicholas@sign-speak.com"}],"readme":"## Sign-Speak JavaScript SDK\n\nOfficial JavaScript SDK for Sign-Speak. Unlock seamless integration of American Sign Language (ASL) sign recognition, avatars, and speech recognition in your app. Experience world-class AI technology that’s accurate, robust, and easy to implement—everything you need to elevate your app in one powerful SDK.\n\nExplore our complete [API documentation](https://app.theneo.io/sign-speak/sign-speak-api/api-specifications) and learn about implementation and benchmarks in our [Standards](https://sign-speak.com/research/Standards.pdf) and [Efficiency](https://sign-speak.com/research/Efficency.pdf) research papers.\n\nFor a preview of what you can do with the SDK, this is our avatar (I know, it looks human, right!):\n![image](https://i.imgur.com/Zdzej3b.gif)\n\nAnd this is our Sign Language Recognition:\n![image](https://i.imgur.com/gb9S6M6.gif)\n\n### What Can You Build?\n1. [Sign Language-Powered AI Chatbots (e.g., ASL GPT)](https://drive.google.com/file/d/1fM_ouBtWat-JIgirkdW9SQp3-MpKG_kp/view?resourcekey)\n2. [Automatic Captioning for Deaf Content Creators](https://drive.google.com/file/d/1B-inL-X7MqY2WZX5C5RDT-WMK5_bU-qq/view?resourcekey)\n3. …and much more! think TV sign commands... \n\nStart building with the Sign-Speak SDK today and unlock the true power of a visual language. After all, why settle for basic gesture recognition when you have a rich, expressive language at your fingertips? Create immersive experiences that transcend accessibility and redefine interaction.\n\n### New Features & Capabilities\n\nThe Sign-Speak SDK offers four main capabilities:\n\n- **ASL Recognition**: Transforms ASL video streams into accurate English transcripts.\n- **ASL Production**: Generates realistic ASL avatar videos from English text.\n- **English Speech Recognition (Speech-to-Text)**: Efficiently converts spoken English audio into text.\n- **English Speech Generation (Text-to-Speech)**: Creates natural-sounding English speech audio files (MP3) from text.\n\n### Installation\n\n#### Using npm or yarn\n```bash\nnpm install @sign-speak/react-sdk\n# -or-\nyarn add @sign-speak/react-sdk\n```\n\n### Initialization & API Key setup\nLearn how to obtain your API keys at your [Sign-Speak developer portal](https://client.sign-speak.com).\n\n#### Setting the API Key\n```javascript\nimport { setKey } from 'sign-speak-sdk/network/key';\n\n// set the API Key programmatically\nsetKey('YOUR_API_KEY');\n```\n\nor via environment variables:\n```\nSIGN_SPEAK_API_KEY=\"YOUR_API_KEY\"\n```\n\n## Considerations & Best Practices\n\nSign-Speak delivers advanced ASL recognition and speech processing tools for seamless integration. For optimal accuracy and performance in your application, follow these best practices and be mindful of the current limitations.\n\n### Recommended Best Practices:\n\n- **Use conversational ASL**:   \n  Our models achieve best results with natural, conversational signing at normal pace. Avoid instructional or artificially slow signing—this typically decreases recognition accuracy. \n\n- **Proper video positioning**:  \n  Use well-lit environments and landscape videos that clearly capture the signer, keeping them centered and showing their full upper body. This positioning ensures accurate predictions. You can see an example of a good video positioning on the [API documentation](https://app.theneo.io/sign-speak/sign-speak-api/api-specifications/asl-recognition).\n\n- **Start small, then scale**:   \n  Initially test your integration with short, simple statements. Once familiar and successful, gradually progress to longer and more complex interactions to ensure continued accuracy and responsiveness.\n\n### ⚠️ Known Limitations and Caveats:\n\n- **Personal Sign Names**:\nRecognition accuracy for personalized sign names is currently limited, with standardized and widely accepted signs providing the best results. However, with proper consent, we can train a custom model for individual users to recognize unique elements like their sign name.\n\n- **Video and Audio Quality**:\n  Background noise, low-quality audio, poor lighting, or unclear framing significantly detract from accuracy. For best results, strive for clear audio and stable, well-lit video streams.\n\n- **API Usage & Quotas**:\n  Be aware your account includes default rate-limits (requests per minute) and monthly quotas (processed minutes). Check usage consistently on your [developer dashboard](https://client.sign-speak.com), or contact [management@sign-speak.com](mailto:management@sign-speak.com) if you require higher limits.\n\n- **Real-time latency and streaming**:\n  While our WebSocket protocol is designed for low latency, network conditions or browser limitations can impact smooth real-time interaction. Thorough testing across supported browsers and networks is recommended.\n\n- **Limited Feature Availability**:\n  Certain advanced functionalities (like personalized avatars, specific regional variants, and custom fine-tuning) are available under limited or partnership arrangements. Please reach out to discuss specific use-cases or special requirements.\n\n### Further Reading and Documentation:\n\nFor detailed performance standards and efficiency insights, visit:\n- [Sign-Speak Standards Documentation](https://sign-speak.com/research/Standards.pdf)\n- [Sign-Speak Efficiency Benchmarks](https://sign-speak.com/research/Efficency.pdf)\n- [Sign-Speak Documentation](https://app.theneo.io/sign-speak/sign-speak-api/api-specifications)\n\n---\n\nFollowing these key recommendations and understanding our current limitations will ensure you maximize the effectiveness and accuracy of the Sign-Speak platform SDK in your applications. For more questions or support, feel free to contact our team at [management@sign-speak.com](mailto:management@sign-speak.com).\n\n---\n\n## Usage Examples\n\n### 1. Framework-ready Components (React)\n\nQuickly integrate with React:\n\n#### ASL Recognition (video → text)\n```jsx\nimport { SignRecognition } from 'sign-speak-sdk';\n\nconst MyASLRecognition = () => (\n  <div>\n    <h2>ASL Recognition</h2>\n    <SignRecognition />\n  </div>\n);\n```\n\n#### ASL Production (text → ASL avatar video)\n```jsx\nimport { SignProduction } from 'sign-speak-sdk';\n\nconst MyASLProduction = () => (\n  <div>\n    <h2>Generate ASL</h2>\n    <SignProduction text=\"Hello, how are you?\" model=\"MALE\" />\n  </div>\n);\n```\n\n#### Speech-to-Text\n```jsx\nimport { SpeechRecognition } from 'sign-speak-sdk';\n\nconst MySpeechRecognition = () => (\n  <div>\n    <h2>English Speech Recognition</h2>\n    <SpeechRecognition />\n  </div>\n);\n```\n\n#### Text-to-Speech\n```jsx\nimport { SpeechProduction } from 'sign-speak-sdk';\n\nconst MyTextToSpeech = () => (\n  <div>\n    <h2>Text to Speech</h2>\n    <SpeechProduction text=\"Hello from Sign-Speak.\" model=\"FEMALE\" />\n  </div>\n);\n```\n\n---\n\n### 2. React Hooks Usage\n\nSimplify state management and API calls via React hooks:\n\n#### useSignLanguageRecognition\n```jsx\nimport React, { useEffect } from 'react';\nimport { useSignLanguageRecognition } from 'sign-speak-sdk';\n\nfunction ASLHookExample() {\n  const { prediction, startRecognition, stopRecognition, recording, loading } = useSignLanguageRecognition();\n  const interpretation = prediction?.prediction.filter(x => x.confidence > Math.log(0.5)).map(x => x.prediction).join(\" \");\n\n  return (\n    <div>\n      {\n        loading ? <p>loading...</p> : (\n          recording ? \n            <button onClick={stopRecognition}>Stop Watching</button> : \n            <button onClick={startRecognition}>Start Watching</button>\n        )\n      }\n\n      <p>{interpretation}</p>\n    </div>\n  );\n}\n```\n\n#### useSpeechRecognition\n```jsx\nimport React from 'react';\nimport { useSpeechRecognition } from 'sign-speak-sdk';\n\nfunction SpeechHookExample() {\n  const { prediction, startRecognition, stopRecognition, recording, loading } = useSpeechRecognition();\n  const interpretation = prediction?.prediction.filter(x => x.confidence > Math.log(0.5)).map(x => x.prediction).join(\" \");\n\n  return (\n    <div>\n      {\n        loading ? <p>loading...</p> : (\n          recording ? \n            <button onClick={stopRecognition}>Stop Listening</button> : \n            <button onClick={startRecognition}>Start Listening</button>\n        )\n      }\n      <p>{interpretation}</p>\n    </div>\n  );\n}\n```\n\n> *note: analogous hooks exist for ASL production (`useSignProduction`) and Text-to-Speech (`useSpeechProduction`).*\n\n---\n\n### 3. Network API Interaction Examples\n\n#### RESTful ASL Recognition (Blocking)\n```javascript\nimport { recognizeSign } from 'sign-speak-sdk/network/rest';\nimport { getKey } from 'sign-speak-sdk/network/key';\n\nconst videoBase64 = '...'; // Your base64-encoded video\nconst result = await recognizeSign(videoBase64, {\n  request_class: 'BLOCKING',\n  model: 'SLR.2.sm',\n  hint: 'Name is Nikolas.',\n  single_recognition_mode: true,\n  apiKey: getKey()\n});\n\nconsole.log(result.prediction);\n```\n\n#### RESTful ASL Production (Batch - Avatar generation)\n```javascript\nimport { produceSign } from 'sign-speak-sdk/network/rest';\n\nconst response = await produceSign({\n  english: \"Welcome to Sign-Speak!\",\n}, {\n  request_class: \"BATCH\",\n  model: \"MALE\"\n});\n\nconsole.log(\"Batch ID:\", response.batch_id);\n```\n\n#### WebSocket Real-Time ASL Recognition\n```javascript\nimport { SignSpeakWebSocket } from 'sign-speak-sdk/network/websockets';\n\nasync function startRealtimeRecognition() {\n  const wsConfig = {\n    sliceLength: 500,\n    singleRecognitionMode: false\n  };\n  const onASLPrediction = (pred: any) => {\n    console.log('Realtime ASL:', pred);\n  };\n\n  const socketClient = new SignSpeakWebSocket(wsConfig, onASLPrediction);\n  await socketClient.connect()\n  await socketClient.streamLiveVideo();\n  // record for 5 seconds and then stop\n  setTimeout(() => {\n    socketClient.stopStreaming(false) // if you set the terminate signal to true here, the socket will close immediately\n  }, 5000)\n}\n```\n\n---\n\n## Request Types and Modes\n\nSign-Speak provides flexible request classes:\n\n- **BLOCKING (RESTful):** Immediate response; falls back to BATCH if takes longer than ~30 seconds\n- **BATCH (RESTful):** Start-and-query later; perfect for large or time-intensive tasks\n- **WebSocket (streaming):** Optimized for real-time, latency-sensitive user experiences\n\n---\n\n## Customizing & Configuration\nPass configuration when initializing hooks, components, or WebSockets:\n\n```javascript\nconst config = {\n  sliceLength: 500, // milliseconds video/audio chunks\n  singleRecognitionMode: true, \n  deviceId: 'camera-device-id'\n};\n```\n\n---\n\n## API Keys & Security\n- **PRIVATE keys:** Manage API keys, account settings (server-side only)\n- **PUBLIC keys:** Used in client-side for inference only\n- **ROOT key:** A required administrative key that cannot be removed\n\nManage keys at [client.sign-speak.com](https://client.sign-speak.com). **Do not expose private keys publicly**. \n\n---\n\n### Feedback & Continuous Improvement\nYou can train and improve our models using the SDK feedback system:\n\n```javascript\nimport { submitFeedback } from 'sign-speak-sdk/network/rest';\n\nawait submitFeedback({ \n  feedback_id: \"feedback_id_from_response\", \n  rating: \"GOOD\",\n  correction: \"\" \n});\n```\n\n---\n\n## Contributing\nInterested in contributing? We ❤️ pull requests! Your contributions are always welcome.\n\nWe’re a small startup, so while we don’t have a formal code of conduct yet, we ask that you be respectful and collaborative—let’s keep it that way!\n\nTo contribute, please follow these steps:\n\n1. Fork the repository\n2. Create a feature or bugfix branch (`git checkout -b feat/my-feature`)\n3. Commit your improvements and submit a PR\n\nFor assistance, reach us at [management@sign-speak.com](mailto:management@sign-speak.com).\n\n---\n## Sample Integration\nBelow shows a quick example integration which builds a translator between ASL and English (note that we use daisyUI and tailwind here to style):\n```javascript\nimport { useEffect, useState } from \"react\";\nimport { RecognitionResult, setKey, SignProduction, SignRecognition, SpeechProduction } from \"@sign-speak/react-sdk\"\n\nexport default function Demo({\n    apiKey\n}: {\n    apiKey: string\n}) {\n    const [directionToASL, setDirectionToASL] = useState(false)\n    const [engText, setEngText] = useState(\"Nice to meet you.\")\n    const [submittedEngText, setSubmittedEngText] = useState(\"Nice to meet you.\")\n    const [recognizedASL, setRecognizedASL] = useState(\"\")\n    const [show, setShow] = useState(false)\n    useEffect(() => {\n        setKey(apiKey)\n        setShow(true)\n    }, [apiKey])\n    const parseSLRResult = (result: RecognitionResult | null) => {\n        if (result) {\n            setRecognizedASL(result.prediction.filter(x => x.confidence > Math.log(0.5)).map(x => x.prediction).join(\" \"))\n        }\n    }\n    if (!show) {\n        return null\n    }\n    return <div className=\"m-5 w-full\">\n      <div className=\"flex flex-row items-center\">\n        <h1 className=\"font-semibold text-2xl mr-4\">Translation Demo</h1>\n        <button onClick={() => setDirectionToASL(!directionToASL)} className=\"btn bg-base-100\">{\n          directionToASL ? <>\n            English to ASL\n          </> : <>\n            ASL to English\n          </>\n        } </button>\n      </div>\n      <div className=\"flex flex-row justify-center gap-8 w-full mt-4\">\n        {\n          directionToASL ? <>\n            <div className=\"card flex-1\">\n              <div className=\"card bg-base-100 w-full p-6\">\n                <h1 className=\"font-semibold\">English</h1>\n                <textarea\n                  value={engText}\n                  onChange={e => setEngText(e.target.value)}\n                  placeholder=\"Enter Text in English\"\n                  className=\"bg-base-200 rounded-lg mt-4 p-2 textarea resize-none\"\n                />\n                <div>\n                  <button\n                    onClick={() => setSubmittedEngText(engText)}\n                    className=\"btn btn-primary mt-2\"\n                  >\n                    Translate\n                  </button>\n                </div>\n              </div>\n            </div>\n\n            <div className=\"card flex-1\">\n              <div className=\"card bg-base-100 p-6 w-full\">\n                <h1 className=\"font-semibold mb-4\">ASL Translation</h1>\n                <SignProduction\n                  key=\"production\"\n                  videoContainerClassName=\"w-full relative aspect-video\"\n                  loadingClassName=\"w-full h-full absolute left-1/2 -translate-x-1/2 top-0 skeleton\"\n                  videoClassName=\"w-full h-full\"\n                  text={submittedEngText}\n                />\n              </div>\n            </div>\n          </> : <>\n            <div className=\"card flex-1\">\n              <div className=\"card bg-base-100 w-full p-6\">\n                <h1 className=\"font-semibold mb-2\">ASL</h1>\n                <SignRecognition interpretationClassName=\"hidden\" containerClassName=\"relative\" loadingClassName=\"absolute w-full h-full absolute top-0 skeleton !rounded-none\" buttonClassName={\"btn btn-primary\"} onResult={parseSLRResult} />\n              </div>\n            </div>\n            <div className=\"card flex-1\">\n              <div className=\"card bg-base-100 p-6 w-full\">\n                <h1 className=\"font-semibold mb-4\">English Translation</h1>\n                <SpeechProduction text={recognizedASL} />\n                <p>{recognizedASL}</p>\n              </div>\n            </div>\n          </>\n        }\n    </div>\n  </div>\n}\n```\n\n---\n## The Sign-Speak Story\nAt Sign-Speak, we're on a mission to make technology truly inclusive. It all started with our Deaf founder asking a simple yet game-changing question: **“Why can’t I just sign to everything that has voice recognition?”**\n\nAnd then came the second realization: **“Why are we building gesture recognition when we already have a full visual language?”** 🎯\n\nSo, instead of making people wave their hands around like they’re casting spells in a video game, we built real ASL recognition—because sign language **is**  a language, not just a bunch of gestures.\n\nThis journey has been 9 years in the making, and now, we’re handing you the keys to a groundbreaking SDK that makes ASL integration seamless. Whether you're making an app more accessible or exploring gesture recognition for innovative interactions through ASL, we can't wait to see what you build!","readmeFilename":"README.md"}