<commit_before># mmir-plugin-asr-nuance-web

Cordova plugin for the MMIR framework that allows Automatic Speech Recognition (ASR) via Nuance web services<commit_msg>added description for configuration settings<commit_after># mmir-plugin-asr-nuance-web

Cordova plugin for the MMIR framework that allows Automatic Speech Recognition (ASR) via Nuance web services

## configure CSP

(e.g. index.html): allow access to https://dictation.nuancemobility.net
```
  <meta http-equiv="Content-Security-Policy"
        content="default-src 'self' 'unsafe-inline' 'unsafe-eval' https://dictation.nuancemobility.net ...
```


## configuration.json:
```
{

...

	"nuanceWebAudioInput": {
		"encoder": "amr",
		"appId": <the app ID>,
		"appKey": <the secret app key>,
		"baseUrl": "https://dictation.nuancemobility.net/NMDPAsrCmdServlet/dictation"
	},
	
	....
	
	"mediaManager": {
    	"plugins": {
    		"browser": [
    			...
                {"mod": "webAudioTextToSpeech", "config": "webttsNuanceImpl"},
                ...
    		],
    		"cordova": [
    			...
                {"mod": "webAudioTextToSpeech", "config": "webttsNuanceImpl"},
                ...
    		]
    	}
    },
...

}
```

## options

supported options for recoginze() / startRecord():
 * language: String
 * results: Number
 * mode: 'search' | 'dictation'

supported custom options for recoginze() / startRecord():
 * appKey: String
 * appId: String
 * codec: 'amr' | 'wav'
 * source: "SpeakerAndMicrophone" | "HeadsetInOut" | "HeadsetBT" | "HeadPhone" | "LineOut"  
          source: 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.
{'fraction_non_alphanumeric': 0.13791146424517595, 'fraction_numerical': 0.0, 'mean_word_length': 3.052873563218391, 'pattern_counts': {'":': 13, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1670858', 'n_tokens_mistral': 594, 'n_tokens_neox': 552, 'n_words': 143}