-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.d.ts
84 lines (72 loc) · 2.51 KB
/
config.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
78
79
80
81
82
83
84
import { MediaManagerPluginEntry, MediaPluginEnvType, SpeechConfigPluginEntry } from 'mmir-lib';
/**
* (optional) entry "asrAnroid" and "ttsAndroid" in main configuration.json
* for settings of asrAndroid and ttsAndroid module.
*
* Some of these settings can also be specified by using the options argument
* in the ASR and TTS functions of {@link PluginMediaManager}, e.g.
* {@link PluginMediaManager#recognize} or {@link PluginMediaManager#startRecord}
* (if specified via the options, values will override configuration settings).
*/
export interface PluginConfig {
asrAndroid?: ASRPluginConfigEntry;
ttsAndroid?: TTSPluginConfigEntry | PluginSpeechConfigEntry;
}
export interface ASRPluginConfigEntry extends MediaManagerPluginEntry {
/**
* the module/plugin name for the MediaManager plugins configuration
* @default "mmir-plugin-speech-android"
*/
mod: 'mmir-plugin-speech-android';
/**
* the plugin type
* @default "asr"
*/
type: 'asr';
/**
* the environment(s) in which this plugin can/should be enabled
* @default "android"
*/
env: Array< 'android' | 'cordova' | MediaPluginEnvType | string > | 'android' | 'cordova' | MediaPluginEnvType | string;
//TODO?
// /** OPTIONAL number of n-best results that should (max.) be returned: integer, DEFAULT 1 */
// results?: number;
//TODO?
// /** OPTIONAL set recognition mode */
// mode?: 'search' | 'dictation';
//TODO support credentials via JS?
}
export interface TTSPluginConfigEntry extends MediaManagerPluginEntry {
/**
* the module/plugin name for the MediaManager plugins configuration
* @default "mmir-plugin-speech-android/ttsAndroid"
*/
mod: 'mmir-plugin-speech-android/ttsAndroid';
/**
* the plugin type
* @default "tts"
*/
type: 'tts';
/**
* the environment(s) in which this plugin can/should be enabled
* @default "android"
*/
env: Array< 'android' | 'cordova' | MediaPluginEnvType | string > | 'android' | 'cordova' | MediaPluginEnvType | string;
//TODO support credentials via JS?
}
/**
* Speech config entry for the plugin: per language (code) configuration e.g. for
* adjusting the language-code or setting a specific voice for the language
*/
export interface PluginSpeechConfigEntry extends SpeechConfigPluginEntry {
/** OPTIONAL
* the language/country for TTS
* @type string
*/
language?: string;
/** OPTIONAL
* a specific voice for TTS
* @type string
*/
voice?: 'female' | 'male' | string;
}