-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
77 lines (62 loc) · 2.38 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
export * from './config';
/// <reference types="mmir-lib" />
import { MediaManager, ASROnStatus, ASROnError, ASRMode, EOSPause, ASROptions } from 'mmir-lib';
import { TTSOnError, TTSOnComplete, TTSOnReady, TTSOptions , VoiceListOptions , VoiceDetails } from 'mmir-lib';
export interface PluginASROptions extends ASROptions {
/**
* [supported option]
* set language/country for ASR
*/
language?: string;
/**
* [supported option]
* set true for receiving intermediate results
*/
intermediate?: boolean;
/**
* [supported option]
* number of n-best results that should (max.) be returned
* @type integer
* @default 1
*/
results?: number;
/**
* [supported option]
* set recognition mode
*/
mode?: ASRMode;
/**
* [supported option]
* length of pause after speech for end-of-speech detection
*/
eosPause?: EOSPause;
/**
* [supported option]
* disable improved feedback when using intermediate results
*/
disableImprovedFeedback?: boolean;
}
export interface PluginTTSOptions extends TTSOptions {
/**
* [supported option]
* set language/country for TTS
*/
language?: string;
/** [supported option]
* set specific voice for TTS
*/
voice?: string | 'male' | 'female';
/** [supported option]
* set specific pause duration between sentences (in milliseconds)
*/
pauseDuration?: number;
}
export interface PluginMediaManager extends MediaManager {
recognize: (options?: PluginASROptions, statusCallback?: ASROnStatus, failureCallback?: ASROnError, isIntermediateResults?: boolean) => void;
startRecord: (options?: PluginASROptions, successCallback?: ASROnStatus, failureCallback?: ASROnError, intermediateResults?: boolean) => void;
stopRecord: (options?: PluginASROptions, successCallback?: ASROnStatus, failureCallback?: ASROnError) => void;
getRecognitionLanguages: (successCallBack?: Function, failureCallBack?: Function) => void;
tts: (options: string | string[] | PluginTTSOptions, successCallback?: TTSOnComplete, failureCallback?: TTSOnError, onInit?: TTSOnReady, ...args: any[]) => void;
getSpeechLanguages: (successCallBack?: Function, failureCallBack?: Function) => void;
getVoices: (options?: VoiceListOptions, successCallBack?: (voices: string | VoiceDetails[]) => void, failureCallBack?: Function,) => void;
}