forked from nativescript-community/texttospeech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
45 lines (39 loc) · 996 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
export declare class TNSTextToSpeech {
/**
* Initiate the text to speech.
* @param {object} SpeakOptions - SpeakOptions object.
*/
speak(options: SpeakOptions): Promise<any>;
/**
* Release the resources used by the TextToSpeech engine/synthesizer
*/
destroy(): void;
/**
* Pause the engine/synthesizer currently speaking.
*/
pause(): void;
/**
* Resume the engine/synthesizer. On Android it will start from beginning - since there is no actual pause, only stop.
*/
resume(): void;
/**
* Android only: Returns array of available Languages
*/
getAvailableLanguages(): Promise<Array<Language>>;
}
export interface SpeakOptions {
text: string;
queue?: boolean;
pitch?: number;
speakRate?: number;
volume?: number;
locale?: string;
language?: string;
finishedCallback?: Function;
}
export interface Language {
language: string;
languageDisplay: string;
country: string;
countryDisplay: string;
}