Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capacitor-community/text-to-speech

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor-community/text-to-speech - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

39

dist/docs.json

@@ -196,2 +196,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"
}

@@ -286,5 +304,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

@@ -7,2 +7,14 @@ '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', {

@@ -9,0 +21,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', {

@@ -5,0 +17,0 @@ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.TextToSpeechWeb()),

2

package.json
{
"name": "@capacitor-community/text-to-speech",
"version": "5.0.0",
"version": "5.1.0",
"description": "Capacitor plugin for synthesizing speech from text.",

@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js",

@@ -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
});

@@ -87,2 +88,3 @@ };

* [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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc