{"_id":"@3senseai/react-native-system-speech-output","_rev":"3-cc18a857993e6ebc987abafd0afdbfdc","name":"@3senseai/react-native-system-speech-output","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@3senseai/react-native-system-speech-output","version":"0.1.0","keywords":["react-native","tts","text-to-speech","speech","ios","android"],"license":"MIT","_id":"@3senseai/react-native-system-speech-output@0.1.0","maintainers":[{"name":"adambartman","email":"adam.bartman@gmail.com"}],"homepage":"https://github.com/abartman/react-native-system-speech-output#readme","bugs":{"url":"https://github.com/abartman/react-native-system-speech-output/issues"},"dist":{"shasum":"02fbc07da84feb554c687ae971f0443c9bb41896","tarball":"https://registry.npmjs.org/@3senseai/react-native-system-speech-output/-/react-native-system-speech-output-0.1.0.tgz","fileCount":17,"integrity":"sha512-vx9LyT1p24XlnG8doIsqamK7+a1j3y0rAffJGmRsf2l7etf76bKgld7p4r8i314qFOevZkUMPja23AjNbgNxJg==","signatures":[{"sig":"MEYCIQCsKj/Di1dhX5OrwbNeLTGHcUkGaF/YSV6EPHFdo+E18gIhAMTPnSYT4OnBUlWdMUrZaZCA941HJoGZKkc9khawuLrM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33748},"main":"index.js","types":"index.d.ts","gitHead":"cc3f3fa62249261e9c9b45fc7022c66d89529ed5","private":false,"_npmUser":{"name":"adambartman","email":"adam.bartman@gmail.com"},"repository":{"url":"git+https://github.com/abartman/react-native-system-speech-output.git","type":"git"},"_npmVersion":"10.9.0","description":"React Native bridge for system text-to-speech on iOS and Android.","directories":{},"_nodeVersion":"22.12.0","react-native":"index.js","codegenConfig":{"ios":{"modulesProvider":{"SystemSpeechOutput":"SystemSpeechOutput"}},"name":"NativeSystemSpeechOutputSpec","type":"modules","android":{"javaPackageName":"ai.threesense.systemspeechoutput"},"jsSrcsDir":"src"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"react":">=18","react-native":">=0.72"},"_npmOperationalInternal":{"tmp":"tmp/react-native-system-speech-output_0.1.0_1773192568407_0.6303442062731988","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@3senseai/react-native-system-speech-output","version":"0.1.1","keywords":["react-native","tts","text-to-speech","speech","ios","android"],"license":"MIT","_id":"@3senseai/react-native-system-speech-output@0.1.1","maintainers":[{"name":"adambartman","email":"adam.bartman@gmail.com"}],"homepage":"https://github.com/abartman/react-native-system-speech-output#readme","bugs":{"url":"https://github.com/abartman/react-native-system-speech-output/issues"},"dist":{"shasum":"3be318bd0693ce3ccb3ebe95e422a54b14decc83","tarball":"https://registry.npmjs.org/@3senseai/react-native-system-speech-output/-/react-native-system-speech-output-0.1.1.tgz","fileCount":17,"integrity":"sha512-EMgzdNMGj0KfM9sFJ0dGmUfDhfxTZz7fvvqmLIpsywPnxwRWu3K2R1X6pLtDtpaCeTrIQdgV2p4Gwv8cmGZfUQ==","signatures":[{"sig":"MEUCIEMqEW3hnL7v501NcyURpX/hMLgiPBUV5VR/huZ/j3qEAiEA4ZB8HiVgRaaN/Vgmky7eOy2k90DOmuPMQQHzK8W6Kvo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@3senseai%2freact-native-system-speech-output@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":33748},"main":"index.js","types":"index.d.ts","gitHead":"c239889a82636cb7f773a1ca1aadf05fa5249597","private":false,"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:88a2ef5b-a3b0-431c-ae63-f54723fdcc6e"}},"repository":{"url":"git+https://github.com/abartman/react-native-system-speech-output.git","type":"git"},"_npmVersion":"11.11.0","description":"React Native bridge for system text-to-speech on iOS and Android.","directories":{},"_nodeVersion":"24.14.0","react-native":"index.js","codegenConfig":{"ios":{"modulesProvider":{"SystemSpeechOutput":"SystemSpeechOutput"}},"name":"NativeSystemSpeechOutputSpec","type":"modules","android":{"javaPackageName":"ai.threesense.systemspeechoutput"},"jsSrcsDir":"src"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"react":">=18","react-native":">=0.72"},"_npmOperationalInternal":{"tmp":"tmp/react-native-system-speech-output_0.1.1_1773193674873_0.4300212325682864","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@3senseai/react-native-system-speech-output","version":"0.1.2","description":"React Native bridge for system text-to-speech on iOS and Android.","main":"index.js","react-native":"index.js","types":"index.d.ts","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/abartman/react-native-system-speech-output.git"},"homepage":"https://github.com/abartman/react-native-system-speech-output#readme","bugs":{"url":"https://github.com/abartman/react-native-system-speech-output/issues"},"keywords":["react-native","tts","text-to-speech","speech","ios","android"],"peerDependencies":{"react":">=18","react-native":">=0.72"},"publishConfig":{"access":"public"},"codegenConfig":{"name":"NativeSystemSpeechOutputSpec","type":"modules","jsSrcsDir":"src","android":{"javaPackageName":"ai.threesense.systemspeechoutput"},"ios":{"modulesProvider":{"SystemSpeechOutput":"SystemSpeechOutput"}}},"gitHead":"1df845960c3c2dadf40b3798b14efac1231c51af","_id":"@3senseai/react-native-system-speech-output@0.1.2","_nodeVersion":"24.14.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-6qMhLqTNOb1/z90jrfUEN9Pl37vFyiEVW/HObvi/RvAUB2Bhl3wy2f7AlfcYRkw0avtn1oGPLENgSIPbRwtIYA==","shasum":"55c94c979df30e624fae37fc6c347bb6c100d787","tarball":"https://registry.npmjs.org/@3senseai/react-native-system-speech-output/-/react-native-system-speech-output-0.1.2.tgz","fileCount":17,"unpackedSize":37395,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@3senseai%2freact-native-system-speech-output@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICOp3D4/LugpY7q+bqP5qcKwgNcxpdMYVLKsxgAFnxBNAiEAtiHaMMOaSSpQP8XsXDey9kyUoLSNFaVSeUshLA0hck8="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:88a2ef5b-a3b0-431c-ae63-f54723fdcc6e"}},"directories":{},"maintainers":[{"name":"adambartman","email":"adam.bartman@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-system-speech-output_0.1.2_1773195654866_0.817518941949176"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-11T01:29:28.328Z","modified":"2026-03-11T02:20:55.363Z","0.1.0":"2026-03-11T01:29:28.547Z","0.1.1":"2026-03-11T01:47:55.054Z","0.1.2":"2026-03-11T02:20:55.020Z"},"bugs":{"url":"https://github.com/abartman/react-native-system-speech-output/issues"},"license":"MIT","homepage":"https://github.com/abartman/react-native-system-speech-output#readme","keywords":["react-native","tts","text-to-speech","speech","ios","android"],"repository":{"type":"git","url":"git+https://github.com/abartman/react-native-system-speech-output.git"},"description":"React Native bridge for system text-to-speech on iOS and Android.","maintainers":[{"name":"adambartman","email":"adam.bartman@gmail.com"}],"readme":"# @3senseai/react-native-system-speech-output\n\nReact Native bridge for system text-to-speech on iOS and Android.\n\n## Features\n\n- Speak plain text on iOS and Android\n- iOS support for SSML on iOS 16+\n- iOS support for `voiceIdentifier`\n- iOS support for `preferAssistiveTechnologySettings`\n- iOS support for `useSystemAudioSession`\n- Android support for `pitch`\n- Android support for `voiceName`\n- Cross-platform `listVoices()`\n- Cross-platform `addProgressListener()` with `{ utteranceId, start, end }`\n- Android speech annotations for phones, emails, and URLs\n- Backward-compatible React Native New Architecture support\n\n## Install\n\n    npm install @3senseai/react-native-system-speech-output\n    cd ios && pod install && cd ..\n\nBecause this package contains native iOS and Android code, rebuild the app after installing it.\n\n## New Architecture\n\nThis package ships both:\n\n- a legacy native module implementation for bridge-based apps\n- a TurboModule Codegen spec in `src/NativeSystemSpeechOutput.ts`\n\nAndroid uses split `oldarch` / `newarch` sources with a shared implementation.\niOS uses conditional compilation with `RCT_NEW_ARCH_ENABLED`.\n\nGenerated Codegen artifacts are not checked into this repository.\nThey are generated by the consuming app during build.\n\n## API\n\n### `isAvailable(): Promise<boolean>`\n\nReturns whether the native speech bridge is available.\n\n### `listVoices(): Promise<VoiceInfo[]>`\n\nReturns available voices.\n\nOn Android, `VoiceInfo.name` maps to the value you pass back as `voiceName`.\nOn iOS, `VoiceInfo.name` maps to the value you pass back as `voiceIdentifier`.\n\n### `speak(text, options?): Promise<boolean>`\n\nSupported options:\n\n    type SpeakOptions = {\n      language?: string | null;\n      rate?: number | null;\n      pitch?: number | null; // Android\n      voiceName?: string | null; // Android\n      ssml?: string | null; // iOS\n      voiceIdentifier?: string | null; // iOS\n      preferAssistiveTechnologySettings?: boolean | null; // iOS\n      useSystemAudioSession?: boolean | null; // iOS\n    };\n\n### `stop(): Promise<boolean>`\n\nStops current speech immediately.\n\n### `addStateListener(listener)`\n\nSubscribes to speech state updates.\n\n### `addProgressListener(listener)`\n\nSubscribes to speech progress updates with this shape:\n\n    type SpeechProgressEvent = {\n      utteranceId: string;\n      start: number;\n      end: number;\n    };\n\n`start` is inclusive and `end` is exclusive, both relative to the original text passed to `speak(...)`.\n\n## Example\n\n    import SpeechOutput from \"@3senseai/react-native-system-speech-output\";\n\n    const text = \"Hello world from speech output.\";\n    const progressSub = SpeechOutput.addProgressListener((event) => {\n      console.log(\"progress:\", event.utteranceId, event.start, event.end);\n      console.log(\"spoken range:\", text.slice(event.start, event.end));\n    });\n\n    const stateSub = SpeechOutput.addStateListener((event) => {\n      console.log(\"state:\", event.state);\n    });\n\n    const available = await SpeechOutput.isAvailable();\n    const voices = await SpeechOutput.listVoices();\n\n    if (available) {\n      await SpeechOutput.speak(text, {\n        language: \"en-AU\",\n        rate: 0.95,\n      });\n    }\n\n    // later\n    progressSub.remove();\n    stateSub.remove();\n\n## Local testing\n\nRecommended flow:\n\n1. Create a fresh React Native app.\n2. Install this package from a local path.\n3. Turn New Architecture on explicitly in the test app.\n4. Run `pod install` on iOS.\n5. Build both iOS and Android.\n\nFor example:\n\n    npx @react-native-community/cli@latest init SpeechOutputNewArchTest --version 0.84.0\n    cd SpeechOutputNewArchTest\n    npm install ../react-native-system-speech-output\n\nThen enable the New Architecture in the app and rebuild.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}