Skip to content

Commit bdfcfae

Browse files
committed
fixed TTS speaking twice
added build-extras (tbd, include on build)
1 parent e6a0f6f commit bdfcfae

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-nuance-speechkit",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Cordova Nuance SpeechKit Plugin",
55
"cordova": {
66
"id": "cordova-plugin-nuance-speechkit",

plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
xmlns:rim="http://www.blackberry.com/ns/widgets"
2323
xmlns:android="http://schemas.android.com/apk/res/android"
2424
id="cordova-plugin-nuance-speechkit"
25-
version="1.0.0">
25+
version="1.0.1">
2626
<name>Nuance SpeechKit</name>
2727
<description>Cordova Nuance SpeechKit Plugin</description>
2828
<license>Apache 2.0</license>
@@ -35,7 +35,6 @@
3535
<engines>
3636
<engine name="cordova" version=">=3.0.0" />
3737
</engines>
38-
3938
<!-- android -->
4039
<platform name="android">
4140
<config-file target="res/xml/config.xml" parent="/*">
@@ -49,6 +48,7 @@
4948
<uses-permission android:name="android.permission.INTERNET"/>
5049
</config-file>
5150

51+
5252
<source-file src="src/android/SpeechKit.java" target-dir="src/ee/helmes" />
5353
<source-file src="src/android/libs/speechkit-2.1.3.aar" target-dir="libs" />
5454
</platform>

src/android/SpeechKit.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ private void startTTS(JSONArray args) {
6060
options.setLanguage(new Language(args.getString(1)));
6161
Transaction transaction = session.speakString(textToSpeak, options, new Transaction.Listener() {
6262
public void onAudio(Transaction transaction, Audio audio) {
63-
Log.d(TAG, "Speaking: " + textToSpeak);
64-
session.getAudioPlayer().playAudio(audio);
63+
//when text is received, it starts playback automatically
6564
}
6665
public void onSuccess(Transaction transaction, String s) {
6766
Log.d(TAG, "Successful transaction: " + s);

src/android/build-extras.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
repositories {
2+
flatDir {
3+
dirs 'libs'
4+
}
5+
}
6+
dependencies {
7+
compile (name: "speechkit-2.1.3", ext: "aar")
8+
}

0 commit comments

Comments
 (0)