This repository has been archived by the owner on Feb 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.d.ts
60 lines (53 loc) · 2.37 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
/* plugin config definition: used by mmir-plugin-exports to generate module-config.gen.js */
import { MediaManagerPluginEntry } from 'mmir-lib';
/**
* (optional) entry "asrNuanceXhr" in main configuration.json
* for settings of asrNuanceXhr module.
*
* Some of these settings can also be specified by using the options argument
* in the ASR functions of {@link MediaManagerWebInput}, e.g.
* {@link MediaManagerWebInput#recognize} or {@link MediaManagerWebInput#startRecord}
* (if specified via the options, values will override configuration settings).
*/
export interface PluginConfig {
asrNuanceXhr?: PluginConfigEntry;
}
export interface PluginConfigEntry extends MediaManagerPluginEntry {
/** the plugin/module which which will load/use this specific ASR implementation
* @default mmir-plugin-encoder-core.js
*/
mod: 'mmir-plugin-encoder-core.js';
/**
* the plugin type
* @default "asr"
*/
type: 'asr';
/** OPTIONAL (see mmir-plugin-encoder-core)
* @default "amr" */
encoder?: 'amr'; // TODO (re-enable) 'wav', (enable) 'speex'
/** credentials application ID (MUST be set via configuration or options) */
appId?: string;
/** credentials application key (MUST be set via configuration or options) */
appKey?: string;
/** OPTIONAL a persistent user pseudonym (should not be traceable/enable reverse-lookup of user); must be URI-encoded/conformant (e.g. user encodeURIComponent()) */
userId?: string;
/** OPTIONAL number of n-best results that should (max.) be returned: integer of [1, 10] */
results?: number;
/** OPTIONAL set recognition mode */
mode?: 'search' | 'dictation' | 'DTV-Search';
/**
* OPTIONAL
* Indicates the source of the audio recording.
* Properly specifying this header improves recognition accuracy.
* Nuance encourages you to pass this header whenever you can -- and as accurately as possible.
*/
source?: 'SpeakerAndMicrophone' | 'HeadsetInOut' | 'HeadsetBT' | 'HeadPhone' | 'LineOut';
// /** TODO NOT IMPLEMENTED for encoder (if supported by encoder): */
// rate?: /*'wav': */ 8000 | 16000 | 22000 |
// /*'speex': */ 8000 | 'nw' | 11025 | 'sw' | 16000 | 'wb';
// /** (TODO?) NOT IMPLEMENTED / CONFIGURABLE (using const "https://dictation.nuancemobility.net/NMDPAsrCmdServlet/dictation") */
// baseUrl: string;
}
export enum RemoteUrls {
baseUrl = 'https://dictation.nuancemobility.net'
}