diff --git a/binding/android/Octopus/octopus/build.gradle b/binding/android/Octopus/octopus/build.gradle index b5c01ea..34ef80f 100644 --- a/binding/android/Octopus/octopus/build.gradle +++ b/binding/android/Octopus/octopus/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ext { PUBLISH_GROUP_ID = 'ai.picovoice' - PUBLISH_VERSION = '1.2.2' + PUBLISH_VERSION = '2.0.0' PUBLISH_ARTIFACT_ID = 'octopus-android' } @@ -39,12 +39,12 @@ dependencies { } task copyLibs(type: Copy) { - from("${rootDir}/../../lib/android") + from("${rootDir}/../../../lib/android") into("${rootDir}/octopus/src/main/jniLibs") } task copyParams(type: Copy) { - from("${rootDir}/../../lib/common/param") + from("${rootDir}/../../../lib/common/param") include('octopus_params.pv') into("${rootDir}/octopus/src/main/res/raw") } diff --git a/binding/android/OctopusTestApp/build.gradle b/binding/android/OctopusTestApp/build.gradle index ebfdad2..cb59d8e 100644 --- a/binding/android/OctopusTestApp/build.gradle +++ b/binding/android/OctopusTestApp/build.gradle @@ -16,6 +16,9 @@ allprojects { repositories { google() mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1276/' + } } } diff --git a/binding/android/OctopusTestApp/octopus-test-app/build.gradle b/binding/android/OctopusTestApp/octopus-test-app/build.gradle index be75423..b68b338 100644 --- a/binding/android/OctopusTestApp/octopus-test-app/build.gradle +++ b/binding/android/OctopusTestApp/octopus-test-app/build.gradle @@ -112,7 +112,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.1' - implementation 'ai.picovoice:octopus-android:1.2.2' + implementation 'ai.picovoice:octopus-android:2.0.0' // Espresso UI Testing androidTestImplementation 'androidx.test.ext:junit:1.1.3' diff --git a/binding/android/OctopusTestApp/octopus-test-app/src/androidTest/java/ai/picovoice/octopus/testapp/LanguageTests.java b/binding/android/OctopusTestApp/octopus-test-app/src/androidTest/java/ai/picovoice/octopus/testapp/LanguageTests.java index 353aa57..e1934fa 100644 --- a/binding/android/OctopusTestApp/octopus-test-app/src/androidTest/java/ai/picovoice/octopus/testapp/LanguageTests.java +++ b/binding/android/OctopusTestApp/octopus-test-app/src/androidTest/java/ai/picovoice/octopus/testapp/LanguageTests.java @@ -59,7 +59,7 @@ public static Collection initParameters() { { "ja", new HashMap() {{ - put("りんご", new double [][]{{0.960, 1.664, 1}}); + put("りんご", new double [][]{{0.992, 1.632, 1}}); }}, }, { diff --git a/binding/android/OctopusTestApp/octopus-test-app/src/androidTest/java/ai/picovoice/octopus/testapp/OctopusTest.java b/binding/android/OctopusTestApp/octopus-test-app/src/androidTest/java/ai/picovoice/octopus/testapp/OctopusTest.java index cd9532c..ea1a1fa 100644 --- a/binding/android/OctopusTestApp/octopus-test-app/src/androidTest/java/ai/picovoice/octopus/testapp/OctopusTest.java +++ b/binding/android/OctopusTestApp/octopus-test-app/src/androidTest/java/ai/picovoice/octopus/testapp/OctopusTest.java @@ -249,4 +249,29 @@ public void testSpacesInSearchPhrase() throws Exception { metadata.delete(); octopus.delete(); } + + @Test + public void testErrorStack() { + String[] error = {}; + try { + new Octopus.Builder() + .setAccessKey("invalid") + .build(appContext); + } catch (OctopusException e) { + error = e.getMessageStack(); + } + + assertTrue(0 < error.length); + assertTrue(error.length <= 8); + + try { + new Octopus.Builder() + .setAccessKey("invalid") + .build(appContext); + } catch (OctopusException e) { + for (int i = 0; i < error.length; i++) { + assertEquals(e.getMessageStack()[i], error[i]); + } + } + } }