-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.xml
157 lines (114 loc) · 5.61 KB
/
plugin.xml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="UTF-8"?>
<plugin
xmlns="http://cordova.apache.org/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="mmir-plugin-speech-android"
version="1.2.4">
<name>AndroidSpeechPlugin</name>
<keywords>cordova,speech,android,asr,speech recognition,tts,text to speech</keywords>
<description>
Cordova plugin for the Android speech recognizer and synthesizer
</description>
<license>MIT</license>
<author>russa, DFKI</author>
<engines>
<engine name="cordova" version=">=5.0" />
</engines>
<!-- MMIR_PLUGIN_MODE: "normal" | "compat" | "webpack" -->
<preference name="MMIR_PLUGIN_MODE" default="normal" />
<hook src="res/js/before_plugin_install_hook.js" type="before_plugin_install" />
<info>
----------------------------------------------------------------------------------------------------------
NOTE: If you you are using MMIR framework < 5.0 you may need to install the plugin in compatiblity mode:
1. edit `[www]/config/configuration.json` and change the entries in `mediaManager.plugins`:
* "androidAudioInput" -> "asrAndroid"
* "androidTextToSpeech" -> "ttsAndroid"
2. either set variable `MMIR_PLUGIN_MODE=compat` during installation or
specify a `preference` in `config.xml` before installing the plugin
(you may need to uninstall the plugin again before setting compat mode)
## Install with Variable
run:
`cordova plugin install ... --variable MMIR_PLUGIN_MODE=compat`
## Set Preference
add to `config.xml`:
`<preference name="MMIR_PLUGIN_MODE" value="compat" />`
## Webpack
If you are using the webpack integration `mmir-webpack` you should install with `webpack` mode, i.e
`MMIR_PLUGIN_MODE=webpack`
(in this case, not specifying `webpack` mode will introduce some additional unused code)
----------------------------------------------------------------------------------------------------------
</info>
<!-- module implementation for integration into MMIR framework -->
<asset
src="www/asrAndroid.js"
target="mmirf/env/media/asrAndroid.js" />
<asset
src="www/ttsAndroid.js"
target="mmirf/env/media/ttsAndroid.js" />
<!-- android -->
<platform name="android">
<js-module src="www/androidasr.js" name="androidAsrPlugin">
<clobbers target="window.cordova.plugins.androidAsrPlugin" />
</js-module>
<js-module src="www/androidtts.js" name="androidTtsPlugin">
<clobbers target="window.cordova.plugins.androidTtsPlugin" />
</js-module>
<js-module src="www/androidcapabilities.js" name="androidSpeechCapabilitiesPlugin">
<clobbers target="window.cordova.plugins.androidSpeechCapabilitiesPlugin" />
</js-module>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="AndroidASRPlugin" >
<param name="android-package" value="de.dfki.iui.mmir.plugins.speech.android.AndroidSpeechRecognizer" />
</feature>
<feature name="AndroidTTSPlugin" >
<param name="android-package" value="de.dfki.iui.mmir.plugins.speech.android.AndroidSpeechSynthesizer" />
</feature>
<feature name="AndroidSpeechCapabilityPlugin" >
<param name="android-package" value="de.dfki.iui.mmir.plugins.speech.android.AndroidSpeechCapabilityChecker" />
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission>
<uses-permission android:name="android.permission.VIBRATE"></uses-permission>
<queries>
<intent>
<action android:name="android.speech.RecognitionService" />
</intent>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>
</config-file>
<framework src="com.android.support:support-compat:25.0.1" />
<source-file
src="src/android/de/dfki/iui/mmir/plugins/speech/android/AndroidSpeechRecognizer.java"
target-dir="src/de/dfki/iui/mmir/plugins/speech/android" />
<source-file
src="src/android/de/dfki/iui/mmir/plugins/speech/android/ASRHandler.java"
target-dir="src/de/dfki/iui/mmir/plugins/speech/android" />
<source-file
src="src/android/de/dfki/iui/mmir/plugins/speech/android/LanguageDetailsReceiver.java"
target-dir="src/de/dfki/iui/mmir/plugins/speech/android" />
<source-file
src="src/android/de/dfki/iui/mmir/plugins/speech/android/AndroidSpeechSynthesizer.java"
target-dir="src/de/dfki/iui/mmir/plugins/speech/android" />
<source-file
src="src/android/de/dfki/iui/mmir/plugins/speech/android/AndroidSpeechCapabilityChecker.java"
target-dir="src/de/dfki/iui/mmir/plugins/speech/android" />
<source-file
src="src/android/de/dfki/iui/mmir/plugins/speech/android/Utils.java"
target-dir="src/de/dfki/iui/mmir/plugins/speech/android" />
</platform>
<!-- iOS platform -->
<platform name="ios">
<js-module src="www/alt/stub/androidasr_stub.js" name="androidAsrPlugin">
<clobbers target="window.cordova.plugins.androidAsrPlugin" />
</js-module>
<js-module src="www/alt/stub/androidtts_stub.js" name="androidTtsPlugin">
<clobbers target="window.cordova.plugins.androidTtsPlugin" />
</js-module>
<js-module src="www/alt/stub/androidcapabilities_stub.js" name="androidSpeechCapabilitiesPlugin">
<clobbers target="window.cordova.plugins.androidSpeechCapabilitiesPlugin" />
</js-module>
</platform>
</plugin>