{"id":15018578,"url":"https://github.com/nativescript-community/texttospeech","last_synced_at":"2025-10-09T06:52:49.038Z","repository":{"id":30587474,"uuid":"34142574","full_name":"nativescript-community/texttospeech","owner":"nativescript-community","description":"Text to Speech NativeScript plugin for Android \u0026 iOS :loudspeaker:","archived":false,"fork":false,"pushed_at":"2022-10-12T14:15:19.000Z","size":3532,"stargazers_count":51,"open_issues_count":8,"forks_count":26,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-18T01:20:47.596Z","etag":null,"topics":["android","ios","nativescript","nativescript-plugin","nativescript-texttospeech","texttospeech","typescript"],"latest_commit_sha":null,"homepage":"http://nativescript-community.github.io/texttospeech/","language":"TypeScript","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/nativescript-community.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}},"created_at":"2015-04-17T22:16:25.000Z","updated_at":"2025-06-24T12:11:11.000Z","dependencies_parsed_at":"2022-09-26T21:51:32.719Z","dependency_job_id":null,"html_url":"https://github.com/nativescript-community/texttospeech","commit_stats":null,"previous_names":["bradmartin/nativescript-texttospeech","anarchicknight/nativescript-texttospeech"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/nativescript-community/texttospeech","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Ftexttospeech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Ftexttospeech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Ftexttospeech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Ftexttospeech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nativescript-community","download_url":"https://codeload.github.com/nativescript-community/texttospeech/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Ftexttospeech/sbom","scorecard":{"id":250417,"data":{"date":"2025-08-11","repo":{"name":"github.com/nativescript-community/texttospeech","commit":"b92e8f88df7859cbdff5d81ce3af678d702606c1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.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":"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/build.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/nativescript-community/texttospeech/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/nativescript-community/texttospeech/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/nativescript-community/texttospeech/build.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned 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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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 1 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"}}]},"last_synced_at":"2025-08-17T08:20:26.432Z","repository_id":30587474,"created_at":"2025-08-17T08:20:26.432Z","updated_at":"2025-08-17T08:20:26.432Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000860,"owners_count":26082951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","ios","nativescript","nativescript-plugin","nativescript-texttospeech","texttospeech","typescript"],"created_at":"2024-09-24T19:52:08.387Z","updated_at":"2025-10-09T06:52:49.021Z","avatar_url":"https://github.com/nativescript-community.png","language":"TypeScript","readme":"[![npm](https://img.shields.io/npm/v/@nativescript-community/texttospeech.svg)](https://www.npmjs.com/package/@nativescript-community/texttospeech)\n[![npm](https://img.shields.io/npm/dt/@nativescript-community/texttospeech.svg?label=npm%20downloads)](https://www.npmjs.com/package/@nativescript-community/texttospeech)\n\n# @nativescript-community/texttospeech :loudspeaker:\n\nA Text to Speech NativeScript plugin for Android \u0026 iOS\n\n#### Native Controls\n\n-   Android - [TextToSpeech](https://developer.android.com/reference/android/speech/tts/TextToSpeech.html)\n-   iOS - [AVSpeechSynthesizer](https://developer.apple.com/reference/avfoundation/avspeechsynthesizer)\n\n## Installation\n\nRun the following command from the root of your project:\n\n```\ntns plugin add @nativescript-community/texttospeech\n```\n\nThis command automatically installs the necessary files, as well as stores @nativescript-community/texttospeech as a dependency in your project's package.json file.\n\n## Video Tutorial\n\n[egghead lesson @ https://egghead.io/lessons/typescript-using-text-to-speech-with-nativescript](https://egghead.io/lessons/typescript-using-text-to-speech-with-nativescript)\n\n## Usage\n\n```js\n/// javascript\nconst TextToSpeech = require('@nativescript-community/texttospeech');\n\n/// TypeScript\nimport { TNSTextToSpeech, SpeakOptions } from '@nativescript-community/texttospeech';\n\nconst TTS = new TNSTextToSpeech();\n\nconst speakOptions: SpeakOptions = {\n    text: 'Whatever you like', /// *** required ***\n    speakRate: 0.5, // optional - default is 1.0\n    pitch: 1.0, // optional - default is 1.0\n    volume: 1.0, // optional - default is 1.0\n    locale: 'en-GB', // optional - default is system locale,\n    finishedCallback: Function, // optional\n};\n\n// Call the `speak` method passing the SpeakOptions object\nTTS.speak(speakOptions).then(\n    () =\u003e {\n        // everything is fine\n    },\n    (err) =\u003e {\n        // oops, something went wrong!\n    }\n);\n```\n\n#### API\n\n-   `speak(options: SpeakOptions): Promise\u003cany\u003e` - start speaking with the given options\n-   `pause(): void` - pause the speech\n-   `resume(): void` - resume the speech\n-   `destroy(): void` - release resources for the speech synthesizer/engine\n\n-   `SpeakOptions = {}`\n    -   `text: string` ** required **\n    -   `queue?: boolean = false`\n    -   `pitch?: number = 1.0`\n    -   `speakRate?: number = 1.0`\n    -   `volume?: number = 1.0`\n    -   `locale?: string = default system locale or language`\n    -   `finishedCallback?: Function`\n\nIf you wish to set a custom locale, you need to provide a valid BCP-47 code, e.g. `en-US`. If you wish to set only a custom language (without a preferred country code), you need to provide a valid ISO 639-1 language code.\n\nThe plugin checks whether the supplied locale code has the correct syntax but will not prevent setting a nonexistent codes. Please use this feature with caution.\n\nExample with language code only:\n\n```js\nconst speakOptions: SpeakOptions = {\n    text: 'Whatever you like', // *** required ***\n    locale: 'en', // english language will be used\n};\n```\n\nExample with locale:\n\n```js\nconst speakOptions: SpeakOptions = {\n    text: 'Whatever you like', // *** required ***\n    locale: 'en-AU', // australian english language will be used\n};\n```\n\n### Tip\n\n-   The speech synthesizer takes a moment to initialize on most devices. A simple way to get around this (tested in the demo app) is to create your new instance of the TNSTextToSpeech and then immediately call the `init` method . This will force the synthesizer to \"warm up\" . Now when you call the `speak` method for your app's functionality it will already have \"warmed up\" the synthesizer so the delay should be minimal.\n    It's possible this \"Warm up\" process could be put into the plugin source itself, I don't have time to do it right now but welcome any contribution that is well tested to make this the default behavior of the synthesizers.\n\n### Android Only Methods\n\n-   `getAvailableLanguages(): Promise\u003cArray\u003cLanguage\u003e\u003e;` - returns an array of available languages (use to prevent using non-existing language/local codes)\n\n## Credits\n\nInspired by James Montemagno's [TextToSpeech Xamarin plugin](https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/TextToSpeech)\n\nThanks to [anarchicknight](https://github.com/anarchicknight) for this plugin.\nThanks to [stefalda](https://github.com/stefalda) for his great work on pause/resume and the finishedCallback events :bomb:\n","funding_links":[],"categories":["Plugins"],"sub_categories":["Utility Plugins"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript-community%2Ftexttospeech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativescript-community%2Ftexttospeech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript-community%2Ftexttospeech/lists"}