@capacitor-community/text-to-speech
Advanced tools
Comparing version 5.0.0 to 5.1.0-dev.cf04aa9.1738003753
@@ -105,3 +105,3 @@ { | ||
], | ||
"slug": "addlisteneronrangestart" | ||
"slug": "addlisteneronrangestart-" | ||
} | ||
@@ -197,2 +197,20 @@ ], | ||
"type": "string | undefined" | ||
}, | ||
{ | ||
"name": "queueStrategy", | ||
"tags": [ | ||
{ | ||
"text": "5.1.0", | ||
"name": "since" | ||
}, | ||
{ | ||
"text": "QueueStrategy.Flush", | ||
"name": "default" | ||
} | ||
], | ||
"docs": "Select the strategy to adopt when several requests to speak overlap.", | ||
"complexTypes": [ | ||
"QueueStrategy" | ||
], | ||
"type": "QueueStrategy" | ||
} | ||
@@ -287,5 +305,24 @@ ] | ||
], | ||
"enums": [], | ||
"enums": [ | ||
{ | ||
"name": "QueueStrategy", | ||
"slug": "queuestrategy", | ||
"members": [ | ||
{ | ||
"name": "Flush", | ||
"value": "0", | ||
"tags": [], | ||
"docs": "Use `Flush` to stop the current request when a new request is sent." | ||
}, | ||
{ | ||
"name": "Add", | ||
"value": "1", | ||
"tags": [], | ||
"docs": "Use `Add` to buffer the speech request. The request will be executed when all previous requests have been completed." | ||
} | ||
] | ||
} | ||
], | ||
"typeAliases": [], | ||
"pluginConfigs": [] | ||
} |
@@ -43,2 +43,12 @@ import type { PluginListenerHandle } from '@capacitor/core'; | ||
} | ||
export declare enum QueueStrategy { | ||
/** | ||
* Use `Flush` to stop the current request when a new request is sent. | ||
*/ | ||
Flush = 0, | ||
/** | ||
* Use `Add` to buffer the speech request. The request will be executed when all previous requests have been completed. | ||
*/ | ||
Add = 1 | ||
} | ||
export interface TTSOptions { | ||
@@ -91,2 +101,9 @@ /** | ||
category?: string; | ||
/** | ||
* Select the strategy to adopt when several requests to speak overlap. | ||
* | ||
* @since 5.1.0 | ||
* @default QueueStrategy.Flush | ||
*/ | ||
queueStrategy?: QueueStrategy; | ||
} | ||
@@ -93,0 +110,0 @@ /** |
@@ -1,2 +0,12 @@ | ||
export {}; | ||
export var QueueStrategy; | ||
(function (QueueStrategy) { | ||
/** | ||
* Use `Flush` to stop the current request when a new request is sent. | ||
*/ | ||
QueueStrategy[QueueStrategy["Flush"] = 0] = "Flush"; | ||
/** | ||
* Use `Add` to buffer the speech request. The request will be executed when all previous requests have been completed. | ||
*/ | ||
QueueStrategy[QueueStrategy["Add"] = 1] = "Add"; | ||
})(QueueStrategy || (QueueStrategy = {})); | ||
//# sourceMappingURL=definitions.js.map |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var core = require('@capacitor/core'); | ||
exports.QueueStrategy = void 0; | ||
(function (QueueStrategy) { | ||
/** | ||
* Use `Flush` to stop the current request when a new request is sent. | ||
*/ | ||
QueueStrategy[QueueStrategy["Flush"] = 0] = "Flush"; | ||
/** | ||
* Use `Add` to buffer the speech request. The request will be executed when all previous requests have been completed. | ||
*/ | ||
QueueStrategy[QueueStrategy["Add"] = 1] = "Add"; | ||
})(exports.QueueStrategy || (exports.QueueStrategy = {})); | ||
const TextToSpeech = core.registerPlugin('TextToSpeech', { | ||
@@ -8,0 +18,0 @@ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.TextToSpeechWeb()), |
var capacitorTextToSpeech = (function (exports, core) { | ||
'use strict'; | ||
exports.QueueStrategy = void 0; | ||
(function (QueueStrategy) { | ||
/** | ||
* Use `Flush` to stop the current request when a new request is sent. | ||
*/ | ||
QueueStrategy[QueueStrategy["Flush"] = 0] = "Flush"; | ||
/** | ||
* Use `Add` to buffer the speech request. The request will be executed when all previous requests have been completed. | ||
*/ | ||
QueueStrategy[QueueStrategy["Add"] = 1] = "Add"; | ||
})(exports.QueueStrategy || (exports.QueueStrategy = {})); | ||
const TextToSpeech = core.registerPlugin('TextToSpeech', { | ||
@@ -106,4 +118,2 @@ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.TextToSpeechWeb()), | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
return exports; | ||
@@ -110,0 +120,0 @@ |
{ | ||
"name": "@capacitor-community/text-to-speech", | ||
"version": "5.0.0", | ||
"version": "5.1.0-dev.cf04aa9.1738003753", | ||
"description": "Capacitor plugin for synthesizing speech from text.", | ||
@@ -17,6 +17,6 @@ "main": "dist/plugin.cjs.js", | ||
"eslint": "eslint . --ext ts", | ||
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"", | ||
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java", | ||
"swiftlint": "node-swiftlint", | ||
"docgen": "docgen --api TextToSpeechPlugin --output-readme README.md --output-json dist/docs.json", | ||
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", | ||
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", | ||
"clean": "rimraf ./dist", | ||
@@ -30,21 +30,21 @@ "watch": "tsc --watch", | ||
"devDependencies": { | ||
"@capacitor/android": "6.0.0", | ||
"@capacitor/cli": "6.0.0", | ||
"@capacitor/core": "6.0.0", | ||
"@capacitor/docgen": "0.2.0", | ||
"@capacitor/ios": "6.0.0", | ||
"@ionic/eslint-config": "^0.4.0", | ||
"@ionic/prettier-config": "1.0.1", | ||
"@ionic/swiftlint-config": "1.1.2", | ||
"eslint": "^8.57.0", | ||
"prettier": "2.3.2", | ||
"prettier-plugin-java": "1.0.2", | ||
"rimraf": "3.0.2", | ||
"rollup": "2.77.2", | ||
"@capacitor/android": "7.0.0", | ||
"@capacitor/cli": "7.0.0", | ||
"@capacitor/core": "7.0.0", | ||
"@capacitor/docgen": "0.3.0", | ||
"@capacitor/ios": "7.0.0", | ||
"@ionic/eslint-config": "0.4.0", | ||
"@ionic/prettier-config": "4.0.0", | ||
"@ionic/swiftlint-config": "2.0.0", | ||
"eslint": "8.57.0", | ||
"prettier": "3.4.2", | ||
"prettier-plugin-java": "2.6.6", | ||
"rimraf": "6.0.1", | ||
"rollup": "4.30.1", | ||
"standard-version": "9.5.0", | ||
"swiftlint": "1.0.1", | ||
"swiftlint": "2.0.0", | ||
"typescript": "4.1.5" | ||
}, | ||
"peerDependencies": { | ||
"@capacitor/core": "^6.0.0" | ||
"@capacitor/core": ">=7.0.0" | ||
}, | ||
@@ -51,0 +51,0 @@ "files": [ |
@@ -54,2 +54,3 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p> | ||
category: 'ambient', | ||
queueStrategy: 1 | ||
}); | ||
@@ -85,4 +86,5 @@ }; | ||
* [`openInstall()`](#openinstall) | ||
* [`addListener('onRangeStart', ...)`](#addlisteneronrangestart) | ||
* [`addListener('onRangeStart', ...)`](#addlisteneronrangestart-) | ||
* [Interfaces](#interfaces) | ||
* [Enums](#enums) | ||
@@ -197,11 +199,12 @@ </docgen-index> | ||
| Prop | Type | Description | Default | | ||
| -------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | | ||
| **`text`** | <code>string</code> | The text that will be synthesised when the utterance is spoken. | | | ||
| **`lang`** | <code>string</code> | The language of the utterance. Possible languages can be queried using `getSupportedLanguages`. | <code>"en-US"</code> | | ||
| **`rate`** | <code>number</code> | The speed at which the utterance will be spoken at. | <code>1.0</code> | | ||
| **`pitch`** | <code>number</code> | The pitch at which the utterance will be spoken at. | <code>1.0</code> | | ||
| **`volume`** | <code>number</code> | The volume that the utterance will be spoken at. | <code>1.0</code> | | ||
| **`voice`** | <code>number</code> | The index of the selected voice that will be used to speak the utterance. Possible voices can be queried using `getSupportedVoices`. | | | ||
| **`category`** | <code>string</code> | Select the iOS Audio session category. Possible values: `ambient` and `playback`. Use `playback` to play audio even when the app is in the background. Only available for iOS. | <code>"ambient"</code> | | ||
| Prop | Type | Description | Default | Since | | ||
| ------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | ----- | | ||
| **`text`** | <code>string</code> | The text that will be synthesised when the utterance is spoken. | | | | ||
| **`lang`** | <code>string</code> | The language of the utterance. Possible languages can be queried using `getSupportedLanguages`. | <code>"en-US"</code> | | | ||
| **`rate`** | <code>number</code> | The speed at which the utterance will be spoken at. | <code>1.0</code> | | | ||
| **`pitch`** | <code>number</code> | The pitch at which the utterance will be spoken at. | <code>1.0</code> | | | ||
| **`volume`** | <code>number</code> | The volume that the utterance will be spoken at. | <code>1.0</code> | | | ||
| **`voice`** | <code>number</code> | The index of the selected voice that will be used to speak the utterance. Possible voices can be queried using `getSupportedVoices`. | | | | ||
| **`category`** | <code>string</code> | Select the iOS Audio session category. Possible values: `ambient` and `playback`. Use `playback` to play audio even when the app is in the background. Only available for iOS. | <code>"ambient"</code> | | | ||
| **`queueStrategy`** | <code><a href="#queuestrategy">QueueStrategy</a></code> | Select the strategy to adopt when several requests to speak overlap. | <code>QueueStrategy.Flush</code> | 5.1.0 | | ||
@@ -228,2 +231,13 @@ | ||
### Enums | ||
#### QueueStrategy | ||
| Members | Value | Description | | ||
| ----------- | -------------- | -------------------------------------------------------------------------------------------------------------------- | | ||
| **`Flush`** | <code>0</code> | Use `Flush` to stop the current request when a new request is sent. | | ||
| **`Add`** | <code>1</code> | Use `Add` to buffer the speech request. The request will be executed when all previous requests have been completed. | | ||
</docgen-api> | ||
@@ -230,0 +244,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
90512
1159
248
2