@capacitor-community/text-to-speech 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docs.json CHANGED
@@ -77,7 +77,7 @@
77
77
  "parameters": [],
78
78
  "returns": "Promise<void>",
79
79
  "tags": [],
80
- "docs": "Verifies proper installation and availability of resource files on the system.\r\n\r\nOnly available for Android.",
80
+ "docs": "Verifies proper installation and availability of resource files on the system.\n\nOnly available for Android.",
81
81
  "complexTypes": [],
82
82
  "slug": "openinstall"
83
83
  }
@@ -94,50 +94,80 @@
94
94
  "properties": [
95
95
  {
96
96
  "name": "text",
97
- "tags": [],
97
+ "tags": [
98
+ {
99
+ "text": "\"Hello world\"",
100
+ "name": "example"
101
+ }
102
+ ],
98
103
  "docs": "The text that will be synthesised when the utterance is spoken.",
99
104
  "complexTypes": [],
100
105
  "type": "string"
101
106
  },
102
107
  {
103
108
  "name": "lang",
104
- "tags": [],
105
- "docs": "The language of the utterance.\r\nPossible languages can be queried using `getSupportedLanguages`.\r\n\r\nDefault: `en-US`.",
109
+ "tags": [
110
+ {
111
+ "text": "\"en-US\"",
112
+ "name": "default"
113
+ }
114
+ ],
115
+ "docs": "The language of the utterance.\nPossible languages can be queried using `getSupportedLanguages`.",
106
116
  "complexTypes": [],
107
117
  "type": "string | undefined"
108
118
  },
109
119
  {
110
120
  "name": "rate",
111
- "tags": [],
112
- "docs": "The speed at which the utterance will be spoken at.\r\n\r\nDefault: `1.0`.",
121
+ "tags": [
122
+ {
123
+ "text": "1.0",
124
+ "name": "default"
125
+ }
126
+ ],
127
+ "docs": "The speed at which the utterance will be spoken at.",
113
128
  "complexTypes": [],
114
129
  "type": "number | undefined"
115
130
  },
116
131
  {
117
132
  "name": "pitch",
118
- "tags": [],
119
- "docs": "The pitch at which the utterance will be spoken at.\r\n\r\nDefault: `1.0`.",
133
+ "tags": [
134
+ {
135
+ "text": "1.0",
136
+ "name": "default"
137
+ }
138
+ ],
139
+ "docs": "The pitch at which the utterance will be spoken at.",
120
140
  "complexTypes": [],
121
141
  "type": "number | undefined"
122
142
  },
123
143
  {
124
144
  "name": "volume",
125
- "tags": [],
126
- "docs": "The volume that the utterance will be spoken at.\r\n\r\nDefault: `1.0`.",
145
+ "tags": [
146
+ {
147
+ "text": "1.0",
148
+ "name": "default"
149
+ }
150
+ ],
151
+ "docs": "The volume that the utterance will be spoken at.",
127
152
  "complexTypes": [],
128
153
  "type": "number | undefined"
129
154
  },
130
155
  {
131
156
  "name": "voice",
132
157
  "tags": [],
133
- "docs": "The index of the selected voice that will be used to speak the utterance.\r\nPossible voices can be queried using `getSupportedVoices`.\r\n\r\nOnly available for Web.",
158
+ "docs": "The index of the selected voice that will be used to speak the utterance.\nPossible voices can be queried using `getSupportedVoices`.",
134
159
  "complexTypes": [],
135
160
  "type": "number | undefined"
136
161
  },
137
162
  {
138
163
  "name": "category",
139
- "tags": [],
140
- "docs": "Select the iOS Audio session category.\r\nPossible values: `ambient` and `playback`.\r\nUse `playback` to play audio even when the app is in the background.\r\n\r\nOnly available for iOS.\r\n\r\nDefault: `ambient`.",
164
+ "tags": [
165
+ {
166
+ "text": "\"ambient\"",
167
+ "name": "default"
168
+ }
169
+ ],
170
+ "docs": "Select the iOS Audio session category.\nPossible values: `ambient` and `playback`.\nUse `playback` to play audio even when the app is in the background.\n\nOnly available for iOS.",
141
171
  "complexTypes": [],
142
172
  "type": "string | undefined"
143
173
  }
@@ -152,36 +182,61 @@
152
182
  "properties": [
153
183
  {
154
184
  "name": "default",
155
- "tags": [],
185
+ "tags": [
186
+ {
187
+ "text": "false",
188
+ "name": "example"
189
+ }
190
+ ],
156
191
  "docs": "Specifies whether the voice is the default voice for the current app (`true`) or not (`false`).",
157
192
  "complexTypes": [],
158
193
  "type": "boolean"
159
194
  },
160
195
  {
161
196
  "name": "lang",
162
- "tags": [],
163
- "docs": "BCP 47 language tag indicating the language of the voice.\r\nExample: `en-US`.",
197
+ "tags": [
198
+ {
199
+ "text": "\"en-US\"",
200
+ "name": "example"
201
+ }
202
+ ],
203
+ "docs": "BCP 47 language tag indicating the language of the voice.",
164
204
  "complexTypes": [],
165
205
  "type": "string"
166
206
  },
167
207
  {
168
208
  "name": "localService",
169
- "tags": [],
209
+ "tags": [
210
+ {
211
+ "text": "true",
212
+ "name": "example"
213
+ }
214
+ ],
170
215
  "docs": "Specifies whether the voice is supplied by a local (`true`) or remote (`false`) speech synthesizer service.",
171
216
  "complexTypes": [],
172
217
  "type": "boolean"
173
218
  },
174
219
  {
175
220
  "name": "name",
176
- "tags": [],
177
- "docs": "Human-readable name that represents the voice.\r\nExample: `Microsoft Zira Desktop - English (United States)`.",
221
+ "tags": [
222
+ {
223
+ "text": "\"Microsoft Zira Desktop - English (United States)\"",
224
+ "name": "example"
225
+ }
226
+ ],
227
+ "docs": "Human-readable name that represents the voice.",
178
228
  "complexTypes": [],
179
229
  "type": "string"
180
230
  },
181
231
  {
182
232
  "name": "voiceURI",
183
- "tags": [],
184
- "docs": "Type of URI and location of the speech synthesis service for this voice.\r\nExample: `urn:moz-tts:sapi:Microsoft Zira Desktop - English (United States)?en-US`.",
233
+ "tags": [
234
+ {
235
+ "text": "\"urn:moz-tts:sapi:Microsoft Zira Desktop - English (United States)?en-US\"",
236
+ "name": "example"
237
+ }
238
+ ],
239
+ "docs": "Type of URI and location of the speech synthesis service for this voice.",
185
240
  "complexTypes": [],
186
241
  "type": "string"
187
242
  }
@@ -1,112 +1,119 @@
1
- export interface TextToSpeechPlugin {
2
- /**
3
- * Starts the TTS engine and plays the desired text.
4
- */
5
- speak(options: TTSOptions): Promise<void>;
6
- /**
7
- * Stops the TTS engine.
8
- */
9
- stop(): Promise<void>;
10
- /**
11
- * Returns a list of supported BCP 47 language tags.
12
- */
13
- getSupportedLanguages(): Promise<{
14
- languages: string[];
15
- }>;
16
- /**
17
- * Returns a list of supported voices.
18
- */
19
- getSupportedVoices(): Promise<{
20
- voices: SpeechSynthesisVoice[];
21
- }>;
22
- /**
23
- * Checks if a specific BCP 47 language tag is supported.
24
- */
25
- isLanguageSupported(options: {
26
- lang: string;
27
- }): Promise<{
28
- supported: boolean;
29
- }>;
30
- /**
31
- * Verifies proper installation and availability of resource files on the system.
32
- *
33
- * Only available for Android.
34
- */
35
- openInstall(): Promise<void>;
36
- }
37
- export interface TTSOptions {
38
- /**
39
- * The text that will be synthesised when the utterance is spoken.
40
- */
41
- text: string;
42
- /**
43
- * The language of the utterance.
44
- * Possible languages can be queried using `getSupportedLanguages`.
45
- *
46
- * Default: `en-US`.
47
- */
48
- lang?: string;
49
- /**
50
- * The speed at which the utterance will be spoken at.
51
- *
52
- * Default: `1.0`.
53
- */
54
- rate?: number;
55
- /**
56
- * The pitch at which the utterance will be spoken at.
57
- *
58
- * Default: `1.0`.
59
- */
60
- pitch?: number;
61
- /**
62
- * The volume that the utterance will be spoken at.
63
- *
64
- * Default: `1.0`.
65
- */
66
- volume?: number;
67
- /**
68
- * The index of the selected voice that will be used to speak the utterance.
69
- * Possible voices can be queried using `getSupportedVoices`.
70
- *
71
- * Only available for Web.
72
- */
73
- voice?: number;
74
- /**
75
- * Select the iOS Audio session category.
76
- * Possible values: `ambient` and `playback`.
77
- * Use `playback` to play audio even when the app is in the background.
78
- *
79
- * Only available for iOS.
80
- *
81
- * Default: `ambient`.
82
- */
83
- category?: string;
84
- }
85
- /**
86
- * The SpeechSynthesisVoice interface represents a voice that the system supports.
87
- */
88
- export interface SpeechSynthesisVoice {
89
- /**
90
- * Specifies whether the voice is the default voice for the current app (`true`) or not (`false`).
91
- */
92
- default: boolean;
93
- /**
94
- * BCP 47 language tag indicating the language of the voice.
95
- * Example: `en-US`.
96
- */
97
- lang: string;
98
- /**
99
- * Specifies whether the voice is supplied by a local (`true`) or remote (`false`) speech synthesizer service.
100
- */
101
- localService: boolean;
102
- /**
103
- * Human-readable name that represents the voice.
104
- * Example: `Microsoft Zira Desktop - English (United States)`.
105
- */
106
- name: string;
107
- /**
108
- * Type of URI and location of the speech synthesis service for this voice.
109
- * Example: `urn:moz-tts:sapi:Microsoft Zira Desktop - English (United States)?en-US`.
110
- */
111
- voiceURI: string;
112
- }
1
+ export interface TextToSpeechPlugin {
2
+ /**
3
+ * Starts the TTS engine and plays the desired text.
4
+ */
5
+ speak(options: TTSOptions): Promise<void>;
6
+ /**
7
+ * Stops the TTS engine.
8
+ */
9
+ stop(): Promise<void>;
10
+ /**
11
+ * Returns a list of supported BCP 47 language tags.
12
+ */
13
+ getSupportedLanguages(): Promise<{
14
+ languages: string[];
15
+ }>;
16
+ /**
17
+ * Returns a list of supported voices.
18
+ */
19
+ getSupportedVoices(): Promise<{
20
+ voices: SpeechSynthesisVoice[];
21
+ }>;
22
+ /**
23
+ * Checks if a specific BCP 47 language tag is supported.
24
+ */
25
+ isLanguageSupported(options: {
26
+ lang: string;
27
+ }): Promise<{
28
+ supported: boolean;
29
+ }>;
30
+ /**
31
+ * Verifies proper installation and availability of resource files on the system.
32
+ *
33
+ * Only available for Android.
34
+ */
35
+ openInstall(): Promise<void>;
36
+ }
37
+ export interface TTSOptions {
38
+ /**
39
+ * The text that will be synthesised when the utterance is spoken.
40
+ *
41
+ * @example "Hello world"
42
+ */
43
+ text: string;
44
+ /**
45
+ * The language of the utterance.
46
+ * Possible languages can be queried using `getSupportedLanguages`.
47
+ *
48
+ * @default "en-US"
49
+ */
50
+ lang?: string;
51
+ /**
52
+ * The speed at which the utterance will be spoken at.
53
+ *
54
+ * @default 1.0
55
+ */
56
+ rate?: number;
57
+ /**
58
+ * The pitch at which the utterance will be spoken at.
59
+ *
60
+ * @default 1.0
61
+ */
62
+ pitch?: number;
63
+ /**
64
+ * The volume that the utterance will be spoken at.
65
+ *
66
+ * @default 1.0
67
+ */
68
+ volume?: number;
69
+ /**
70
+ * The index of the selected voice that will be used to speak the utterance.
71
+ * Possible voices can be queried using `getSupportedVoices`.
72
+ */
73
+ voice?: number;
74
+ /**
75
+ * Select the iOS Audio session category.
76
+ * Possible values: `ambient` and `playback`.
77
+ * Use `playback` to play audio even when the app is in the background.
78
+ *
79
+ * Only available for iOS.
80
+ *
81
+ * @default "ambient"
82
+ */
83
+ category?: string;
84
+ }
85
+ /**
86
+ * The SpeechSynthesisVoice interface represents a voice that the system supports.
87
+ */
88
+ export interface SpeechSynthesisVoice {
89
+ /**
90
+ * Specifies whether the voice is the default voice for the current app (`true`) or not (`false`).
91
+ *
92
+ * @example false
93
+ */
94
+ default: boolean;
95
+ /**
96
+ * BCP 47 language tag indicating the language of the voice.
97
+ *
98
+ * @example "en-US"
99
+ */
100
+ lang: string;
101
+ /**
102
+ * Specifies whether the voice is supplied by a local (`true`) or remote (`false`) speech synthesizer service.
103
+ *
104
+ * @example true
105
+ */
106
+ localService: boolean;
107
+ /**
108
+ * Human-readable name that represents the voice.
109
+ *
110
+ * @example "Microsoft Zira Desktop - English (United States)"
111
+ */
112
+ name: string;
113
+ /**
114
+ * Type of URI and location of the speech synthesis service for this voice.
115
+ *
116
+ * @example "urn:moz-tts:sapi:Microsoft Zira Desktop - English (United States)?en-US"
117
+ */
118
+ voiceURI: string;
119
+ }
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=definitions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface TextToSpeechPlugin {\r\n /**\r\n * Starts the TTS engine and plays the desired text.\r\n */\r\n speak(options: TTSOptions): Promise<void>;\r\n /**\r\n * Stops the TTS engine.\r\n */\r\n stop(): Promise<void>;\r\n /**\r\n * Returns a list of supported BCP 47 language tags.\r\n */\r\n getSupportedLanguages(): Promise<{ languages: string[] }>;\r\n /**\r\n * Returns a list of supported voices.\r\n */\r\n getSupportedVoices(): Promise<{ voices: SpeechSynthesisVoice[] }>;\r\n /**\r\n * Checks if a specific BCP 47 language tag is supported.\r\n */\r\n isLanguageSupported(options: {\r\n lang: string;\r\n }): Promise<{ supported: boolean }>;\r\n /**\r\n * Verifies proper installation and availability of resource files on the system.\r\n *\r\n * Only available for Android.\r\n */\r\n openInstall(): Promise<void>;\r\n}\r\n\r\nexport interface TTSOptions {\r\n /**\r\n * The text that will be synthesised when the utterance is spoken.\r\n */\r\n text: string;\r\n /**\r\n * The language of the utterance.\r\n * Possible languages can be queried using `getSupportedLanguages`.\r\n *\r\n * Default: `en-US`.\r\n */\r\n lang?: string;\r\n /**\r\n * The speed at which the utterance will be spoken at.\r\n *\r\n * Default: `1.0`.\r\n */\r\n rate?: number;\r\n /**\r\n * The pitch at which the utterance will be spoken at.\r\n *\r\n * Default: `1.0`.\r\n */\r\n pitch?: number;\r\n /**\r\n * The volume that the utterance will be spoken at.\r\n *\r\n * Default: `1.0`.\r\n */\r\n volume?: number;\r\n /**\r\n * The index of the selected voice that will be used to speak the utterance.\r\n * Possible voices can be queried using `getSupportedVoices`.\r\n *\r\n * Only available for Web.\r\n */\r\n voice?: number;\r\n /**\r\n * Select the iOS Audio session category.\r\n * Possible values: `ambient` and `playback`.\r\n * Use `playback` to play audio even when the app is in the background.\r\n *\r\n * Only available for iOS.\r\n *\r\n * Default: `ambient`.\r\n */\r\n category?: string; // iOS only\r\n}\r\n\r\n/**\r\n * The SpeechSynthesisVoice interface represents a voice that the system supports.\r\n */\r\nexport interface SpeechSynthesisVoice {\r\n /**\r\n * Specifies whether the voice is the default voice for the current app (`true`) or not (`false`).\r\n */\r\n default: boolean;\r\n /**\r\n * BCP 47 language tag indicating the language of the voice.\r\n * Example: `en-US`.\r\n */\r\n lang: string;\r\n /**\r\n * Specifies whether the voice is supplied by a local (`true`) or remote (`false`) speech synthesizer service.\r\n */\r\n localService: boolean;\r\n /**\r\n * Human-readable name that represents the voice.\r\n * Example: `Microsoft Zira Desktop - English (United States)`.\r\n */\r\n name: string;\r\n /**\r\n * Type of URI and location of the speech synthesis service for this voice.\r\n * Example: `urn:moz-tts:sapi:Microsoft Zira Desktop - English (United States)?en-US`.\r\n */\r\n voiceURI: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface TextToSpeechPlugin {\n /**\n * Starts the TTS engine and plays the desired text.\n */\n speak(options: TTSOptions): Promise<void>;\n /**\n * Stops the TTS engine.\n */\n stop(): Promise<void>;\n /**\n * Returns a list of supported BCP 47 language tags.\n */\n getSupportedLanguages(): Promise<{ languages: string[] }>;\n /**\n * Returns a list of supported voices.\n */\n getSupportedVoices(): Promise<{ voices: SpeechSynthesisVoice[] }>;\n /**\n * Checks if a specific BCP 47 language tag is supported.\n */\n isLanguageSupported(options: {\n lang: string;\n }): Promise<{ supported: boolean }>;\n /**\n * Verifies proper installation and availability of resource files on the system.\n *\n * Only available for Android.\n */\n openInstall(): Promise<void>;\n}\n\nexport interface TTSOptions {\n /**\n * The text that will be synthesised when the utterance is spoken.\n * \n * @example \"Hello world\"\n */\n text: string;\n /**\n * The language of the utterance.\n * Possible languages can be queried using `getSupportedLanguages`.\n *\n * @default \"en-US\"\n */\n lang?: string;\n /**\n * The speed at which the utterance will be spoken at.\n *\n * @default 1.0\n */\n rate?: number;\n /**\n * The pitch at which the utterance will be spoken at.\n *\n * @default 1.0\n */\n pitch?: number;\n /**\n * The volume that the utterance will be spoken at.\n *\n * @default 1.0\n */\n volume?: number;\n /**\n * The index of the selected voice that will be used to speak the utterance.\n * Possible voices can be queried using `getSupportedVoices`.\n */\n voice?: number;\n /**\n * Select the iOS Audio session category.\n * Possible values: `ambient` and `playback`.\n * Use `playback` to play audio even when the app is in the background.\n *\n * Only available for iOS.\n *\n * @default \"ambient\"\n */\n category?: string;\n}\n\n/**\n * The SpeechSynthesisVoice interface represents a voice that the system supports.\n */\nexport interface SpeechSynthesisVoice {\n /**\n * Specifies whether the voice is the default voice for the current app (`true`) or not (`false`).\n * \n * @example false\n */\n default: boolean;\n /**\n * BCP 47 language tag indicating the language of the voice.\n * \n * @example \"en-US\"\n */\n lang: string;\n /**\n * Specifies whether the voice is supplied by a local (`true`) or remote (`false`) speech synthesizer service.\n * \n * @example true\n */\n localService: boolean;\n /**\n * Human-readable name that represents the voice.\n * \n * @example \"Microsoft Zira Desktop - English (United States)\"\n */\n name: string;\n /**\n * Type of URI and location of the speech synthesis service for this voice.\n * \n * @example \"urn:moz-tts:sapi:Microsoft Zira Desktop - English (United States)?en-US\"\n */\n voiceURI: string;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { TextToSpeechPlugin } from './definitions';
2
- declare const TextToSpeech: TextToSpeechPlugin;
3
- export * from './definitions';
4
- export { TextToSpeech };
1
+ import type { TextToSpeechPlugin } from './definitions';
2
+ declare const TextToSpeech: TextToSpeechPlugin;
3
+ export * from './definitions';
4
+ export { TextToSpeech };
package/dist/esm/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { registerPlugin } from '@capacitor/core';
2
- const TextToSpeech = registerPlugin('TextToSpeech', {
3
- web: () => import('./web').then(m => new m.TextToSpeechWeb()),
4
- });
5
- // Warm up
6
- if ('speechSynthesis' in window) {
7
- window.speechSynthesis;
8
- }
9
- export * from './definitions';
10
- export { TextToSpeech };
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const TextToSpeech = registerPlugin('TextToSpeech', {
3
+ web: () => import('./web').then(m => new m.TextToSpeechWeb()),
4
+ });
5
+ // Warm up
6
+ if ('speechSynthesis' in window) {
7
+ window.speechSynthesis;
8
+ }
9
+ export * from './definitions';
10
+ export { TextToSpeech };
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,UAAU;AACV,IAAI,iBAAiB,IAAI,MAAM,EAAE;IAC/B,MAAM,CAAC,eAAe,CAAC;CACxB;AAED,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\r\n\r\nimport type { TextToSpeechPlugin } from './definitions';\r\n\r\nconst TextToSpeech = registerPlugin<TextToSpeechPlugin>('TextToSpeech', {\r\n web: () => import('./web').then(m => new m.TextToSpeechWeb()),\r\n});\r\n\r\n// Warm up\r\nif ('speechSynthesis' in window) {\r\n window.speechSynthesis;\r\n}\r\n\r\nexport * from './definitions';\r\nexport { TextToSpeech };\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,UAAU;AACV,IAAI,iBAAiB,IAAI,MAAM,EAAE;IAC/B,MAAM,CAAC,eAAe,CAAC;CACxB;AAED,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { TextToSpeechPlugin } from './definitions';\n\nconst TextToSpeech = registerPlugin<TextToSpeechPlugin>('TextToSpeech', {\n web: () => import('./web').then(m => new m.TextToSpeechWeb()),\n});\n\n// Warm up\nif ('speechSynthesis' in window) {\n window.speechSynthesis;\n}\n\nexport * from './definitions';\nexport { TextToSpeech };\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- import { WebPlugin } from '@capacitor/core';
2
- import type { TextToSpeechPlugin, TTSOptions } from './definitions';
3
- export declare class TextToSpeechWeb extends WebPlugin implements TextToSpeechPlugin {
4
- private speechSynthesis;
5
- private supportedVoices;
6
- constructor();
7
- speak(options: TTSOptions): Promise<void>;
8
- stop(): Promise<void>;
9
- getSupportedLanguages(): Promise<{
10
- languages: string[];
11
- }>;
12
- getSupportedVoices(): Promise<{
13
- voices: SpeechSynthesisVoice[];
14
- }>;
15
- isLanguageSupported(options: {
16
- lang: string;
17
- }): Promise<{
18
- supported: boolean;
19
- }>;
20
- openInstall(): Promise<void>;
21
- private createSpeechSynthesisUtterance;
22
- private getSpeechSynthesisVoices;
23
- private throwUnsupportedError;
24
- private throwUnimplementedError;
25
- }
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { TextToSpeechPlugin, TTSOptions } from './definitions';
3
+ export declare class TextToSpeechWeb extends WebPlugin implements TextToSpeechPlugin {
4
+ private speechSynthesis;
5
+ private supportedVoices;
6
+ constructor();
7
+ speak(options: TTSOptions): Promise<void>;
8
+ stop(): Promise<void>;
9
+ getSupportedLanguages(): Promise<{
10
+ languages: string[];
11
+ }>;
12
+ getSupportedVoices(): Promise<{
13
+ voices: SpeechSynthesisVoice[];
14
+ }>;
15
+ isLanguageSupported(options: {
16
+ lang: string;
17
+ }): Promise<{
18
+ supported: boolean;
19
+ }>;
20
+ openInstall(): Promise<void>;
21
+ private createSpeechSynthesisUtterance;
22
+ private getSpeechSynthesisVoices;
23
+ private throwUnsupportedError;
24
+ private throwUnimplementedError;
25
+ }