{"versions":{"0.2.2":{"name":"cordova-plugin-tts","version":"0.2.2","description":"Cordova Text-to-Speech Plugin","cordova":{"id":"cordova-plugin-tts","platforms":["ios","wp8","android"]},"repository":{"type":"git","url":"git+https://github.com/vilic/cordova-plugin-tts.git"},"keywords":["cordova","tts","text-to-speech","ecosystem:cordova","cordova-ios","cordova-wp8","cordova-android"],"author":{"name":"VILIC VANE"},"license":"MIT","bugs":{"url":"https://github.com/vilic/cordova-plugin-tts/issues"},"homepage":"https://github.com/vilic/cordova-plugin-tts#readme","gitHead":"c712cf22035fe8baf830dd167ec84fcb012b53c2","_id":"cordova-plugin-tts@0.2.2","scripts":{},"_shasum":"59609139cbd2da29b6ce0adc9de6d7ecfb29505a","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"anonymous","email":"i@vilic.info"},"maintainers":[{"name":"anonymous","email":"i@vilic.info"}],"dist":{"shasum":"59609139cbd2da29b6ce0adc9de6d7ecfb29505a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/cordova-plugin-tts/-/cordova-plugin-tts-0.2.2.tgz","size":4272,"integrity":"sha512-SAoof5n6h8olCQIdZMoBo1sfzXNbWs1TFl+RV0Zw6FXO8XW6u1nssEctxtge9bXr5Qt/ZYel4kQ5RGLseTbnzg=="},"directories":{},"_cnpmcore_publish_time":"2021-12-23T08:25:29.991Z","contributors":[]},"0.2.3":{"name":"cordova-plugin-tts","version":"0.2.3","description":"Cordova Text-to-Speech Plugin","cordova":{"id":"cordova-plugin-tts","platforms":["ios","wp8","android"]},"repository":{"type":"git","url":"git+https://github.com/vilic/cordova-plugin-tts.git"},"keywords":["cordova","tts","text-to-speech","ecosystem:cordova","cordova-ios","cordova-wp8","cordova-android"],"author":{"name":"VILIC VANE"},"license":"MIT","bugs":{"url":"https://github.com/vilic/cordova-plugin-tts/issues"},"homepage":"https://github.com/vilic/cordova-plugin-tts#readme","gitHead":"193b7d40d7615ad641dcf5298e1ea729d01b8674","_id":"cordova-plugin-tts@0.2.3","scripts":{},"_shasum":"c5743f6c6f251e8cb4bc45dd33d41a9a22997287","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"anonymous","email":"i@vilic.info"},"maintainers":[{"name":"anonymous","email":"i@vilic.info"}],"dist":{"shasum":"c5743f6c6f251e8cb4bc45dd33d41a9a22997287","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/cordova-plugin-tts/-/cordova-plugin-tts-0.2.3.tgz","size":4434,"integrity":"sha512-XzVHzyNoZIY8h9aQC9q9KZkq7lRvN1Nct9QwKQ0cui6GqbrBimgfpvpRsyo27ghdEh8GirTg8uOGxIS+Dzz5og=="},"directories":{},"_cnpmcore_publish_time":"2021-12-23T08:25:30.085Z","contributors":[]}},"dist-tags":{"latest":"0.2.3"},"name":"cordova-plugin-tts","time":{"created":"2022-01-27T01:23:59.441Z","modified":"2024-01-16T21:57:31.819Z","0.2.2":"2015-10-08T15:33:03.937Z","0.2.3":"2015-10-08T15:37:51.737Z"},"readme":"# Cordova Text-to-Speech Plugin\r\n\r\n## Platforms\r\n\r\niOS 7+  \r\nWindows Phone 8  \r\nAndroid 4.0.3+ (API Level 15+)\r\n\r\n## Installation\r\n\r\n```sh\r\ncordova plugin add cordova-plugin-tts\r\n```\r\n\r\n## Usage\r\n\r\n```javascript\r\n// basic usage\r\nTTS\r\n    .speak('hello, world!', function () {\r\n        alert('success');\r\n    }, function (reason) {\r\n        alert(reason);\r\n    });\r\n\r\n// or with more options\r\nTTS\r\n    .speak({\r\n        text: 'hello, world!',\r\n        locale: 'en-GB',\r\n        rate: 0.75\r\n    }, function () {\r\n        alert('success');\r\n    }, function (reason) {\r\n        alert(reason);\r\n    });\r\n```\r\n\r\n**Tips:** `speak` an empty string to interrupt.\r\n\r\n## API Definitions\r\n\r\nThe `onfulfilled` callback will be called when the speech finishes,\r\nand the `onrejected` callback (Windows Phone only) will be called when an error occurs.\r\n\r\nIf the API is invoked when it's still speaking, the previous speaking will be canceled immediately,\r\nbut the `onfulfilled` callback of the previous speaking will be called when it stops.\r\n\r\n```typescript\r\ndeclare module TTS {\r\n    interface IOptions {\r\n        /** text to speak */\r\n        text: string;\r\n        /** a string like 'en-US', 'zh-CN', etc */\r\n        locale?: string;\r\n        /** speed rate, 0 ~ 1 */\r\n        rate?: number;\r\n    }\r\n\r\n    function speak(options: IOptions, onfulfilled: () => void, onrejected: (reason) => void): void;\r\n    function speak(text: string, onfulfilled: () => void, onrejected: (reason) => void): void;\r\n}\r\n```","users":{}}