From 687233ae31ae6741d762a4c1a9462d4fa8e09fce Mon Sep 17 00:00:00 2001 From: Kwangsoo Yeo Date: Mon, 2 Oct 2023 14:38:56 -0700 Subject: [PATCH 01/12] android v3.0 changes --- .../ai/picovoice/porcupine/Porcupine.java | 7 ++++ .../picovoice/porcupine/PorcupineNative.java | 7 ++-- .../PorcupineActivationException.java | 6 +++- .../PorcupineActivationLimitException.java | 6 +++- .../PorcupineActivationRefusedException.java | 6 +++- ...PorcupineActivationThrottledException.java | 6 +++- .../exception/PorcupineException.java | 35 ++++++++++++++++++- .../exception/PorcupineIOException.java | 6 +++- .../PorcupineInvalidArgumentException.java | 6 +++- .../PorcupineInvalidStateException.java | 6 +++- .../exception/PorcupineKeyException.java | 6 +++- .../exception/PorcupineMemoryException.java | 6 +++- .../exception/PorcupineRuntimeException.java | 6 +++- .../PorcupineStopIterationException.java | 6 +++- .../porcupine/testapp/PorcupineTest.java | 27 ++++++++++++++ 15 files changed, 128 insertions(+), 14 deletions(-) diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java index 6fe90268b6..24a71adf25 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java @@ -43,6 +43,7 @@ public class Porcupine { private static String DEFAULT_MODEL_PATH; private static boolean isExtracted; + private static String _sdk = "android"; static { System.loadLibrary("pv_porcupine"); @@ -50,6 +51,10 @@ public class Porcupine { private long handle; + public static void setSdk(string sdk) { + Porcupine._sdk = sdk; + } + /** * Constructor. * @@ -66,6 +71,8 @@ private Porcupine( String modelPath, String[] keywordPaths, float[] sensitivities) throws PorcupineException { + PorcupineNative.setSdk(Porcupine._sdk); + handle = PorcupineNative.init( accessKey, modelPath, diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java index 272d40da75..7be1189980 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java @@ -1,5 +1,5 @@ /* - Copyright 2022 Picovoice Inc. + Copyright 2022-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. @@ -20,6 +20,10 @@ class PorcupineNative { static native int getSampleRate(); + static native String[] getErrorStack(); + + static native void setSdk(String sdk); + static native long init( String accessKey, String modelPath, @@ -31,5 +35,4 @@ static native long init( static native int process( long object, short[] pcm) throws PorcupineException; - } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationException.java index 9cc2edb123..e33ef993d2 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineActivationException(Throwable cause) { public PorcupineActivationException(String message) { super(message); } + + public PorcupineActivationException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationLimitException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationLimitException.java index e8f8f35d68..56ef471d7a 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationLimitException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationLimitException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineActivationLimitException(Throwable cause) { public PorcupineActivationLimitException(String message) { super(message); } + + public PorcupineActivationLimitException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationRefusedException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationRefusedException.java index f0a98ff05c..8c3534dd1b 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationRefusedException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationRefusedException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineActivationRefusedException(Throwable cause) { public PorcupineActivationRefusedException(String message) { super(message); } + + public PorcupineActivationRefusedException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationThrottledException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationThrottledException.java index dff8c43a29..00c79d569e 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationThrottledException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineActivationThrottledException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineActivationThrottledException(Throwable cause) { public PorcupineActivationThrottledException(String message) { super(message); } + + public PorcupineActivationThrottledException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java index 254bd3dec4..96df344c0d 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -11,11 +11,44 @@ package ai.picovoice.porcupine; public class PorcupineException extends Exception { + private final String message; + private final String[] messageStack; + public PorcupineException(Throwable cause) { super(cause); + this.message = cause.getMessage(); + this.messageStack = null; } public PorcupineException(String message) { super(message); + this.message = message; + this.messageStack = null; + } + + public PorcupineException(String message, String[] messageStack) { + super(message); + this.message = message; + this.messageStack = messageStack; + } + + public String[] getMessageStack() { + return this.messageStack; + } + + @Override + public String getMessage() { + StringBuilder sb = new StringBuilder(message); + if (messageStack != null) { + if (messageStack.length > 0) { + sb.append(":"); + for (int i = 0; i < messageStack.length; i++) { + sb.append(String.format("\n [%d] %s", i, messageStack[i])); + } + } else { + sb.append("."); + } + } + return sb.toString(); } } \ No newline at end of file diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineIOException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineIOException.java index 29ec63375b..d4c3863b29 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineIOException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineIOException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineIOException(Throwable cause) { public PorcupineIOException(String message) { super(message); } + + public PorcupineIOException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineInvalidArgumentException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineInvalidArgumentException.java index 6207990728..7a8c14d307 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineInvalidArgumentException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineInvalidArgumentException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineInvalidArgumentException(Throwable cause) { public PorcupineInvalidArgumentException(String message) { super(message); } + + public PorcupineInvalidArgumentException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineInvalidStateException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineInvalidStateException.java index a9f9a2867d..45bd017a37 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineInvalidStateException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineInvalidStateException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineInvalidStateException(Throwable cause) { public PorcupineInvalidStateException(String message) { super(message); } + + public PorcupineInvalidStateException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineKeyException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineKeyException.java index 0047a3dc74..3e41f5b5c1 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineKeyException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineKeyException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineKeyException(Throwable cause) { public PorcupineKeyException(String message) { super(message); } + + public PorcupineKeyException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineMemoryException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineMemoryException.java index 02f0ff7a79..fd20dc80a0 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineMemoryException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineMemoryException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineMemoryException(Throwable cause) { public PorcupineMemoryException(String message) { super(message); } + + public PorcupineMemoryException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineRuntimeException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineRuntimeException.java index bb5e6edef0..01d9ae421e 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineRuntimeException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineRuntimeException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineRuntimeException(Throwable cause) { public PorcupineRuntimeException(String message) { super(message); } + + public PorcupineRuntimeException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineStopIterationException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineStopIterationException.java index d809ef30f4..27dd2a4c7e 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineStopIterationException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineStopIterationException.java @@ -1,5 +1,5 @@ /* - Copyright 2021 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the @@ -18,4 +18,8 @@ public PorcupineStopIterationException(Throwable cause) { public PorcupineStopIterationException(String message) { super(message); } + + public PorcupineStopIterationException(String message, String[] messageStack) { + super(message, messageStack); + } } diff --git a/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java b/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java index f158ee62b7..c7eac867e9 100644 --- a/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java +++ b/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java @@ -407,5 +407,32 @@ public void testProcess() throws Exception { p.delete(); } + + @Test + void getErrorStack() { + String[] error = {}; + try { + new Porcupine.Builder() + .setAccessKey("invalid") + .setKeyword(Porcupine.BuiltInKeyword.PORCUPINE) + .build(appContext); + } catch (PorcupineException e) { + error = e.getMessageStack(); + } + + assertTrue(0 < error.length); + assertTrue(error.length <= 8); + + try { + new Porcupine.Builder() + .setAccessKey("invalid") + .setKeyword(Porcupine.BuiltInKeyword.PORCUPINE) + .build(appContext); + } catch (PorcupineException e) { + for (int i = 0; i < error.length; i++) { + assertEquals(e.getMessageStack()[i], error[i]); + } + } + } } } From e6f2225ae6c7507bb57016efe071639ceca1d3ca Mon Sep 17 00:00:00 2001 From: Kwangsoo Yeo Date: Mon, 2 Oct 2023 15:14:58 -0700 Subject: [PATCH 02/12] update test --- .../ai/picovoice/porcupine/Porcupine.java | 2 +- .../porcupine-test-app/build.gradle | 2 +- .../porcupine/testapp/PorcupineTest.java | 54 +++++++++---------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java index 24a71adf25..83991c0154 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java @@ -51,7 +51,7 @@ public class Porcupine { private long handle; - public static void setSdk(string sdk) { + public static void setSdk(String sdk) { Porcupine._sdk = sdk; } diff --git a/binding/android/PorcupineTestApp/porcupine-test-app/build.gradle b/binding/android/PorcupineTestApp/porcupine-test-app/build.gradle index 4d17948c12..4d3deb8239 100644 --- a/binding/android/PorcupineTestApp/porcupine-test-app/build.gradle +++ b/binding/android/PorcupineTestApp/porcupine-test-app/build.gradle @@ -136,7 +136,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'com.google.code.gson:gson:2.10' - implementation 'ai.picovoice:porcupine-android:2.2.2' + implementation files('/home/kwangsoo/work/github/porcupine/binding/android/Porcupine/porcupine/build/outputs/aar/porcupine-debug.aar') // Espresso UI Testing androidTestImplementation 'androidx.test.ext:junit:1.1.5' diff --git a/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java b/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java index c7eac867e9..a0115298d4 100644 --- a/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java +++ b/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java @@ -318,6 +318,33 @@ public void testInitWithNonAsciiModelName() throws PorcupineException { p.delete(); } + + @Test + public void getErrorStack() { + String[] error = {}; + try { + new Porcupine.Builder() + .setAccessKey("invalid") + .setKeyword(Porcupine.BuiltInKeyword.PORCUPINE) + .build(appContext); + } catch (PorcupineException e) { + error = e.getMessageStack(); + } + + assertTrue(0 < error.length); + assertTrue(error.length <= 8); + + try { + new Porcupine.Builder() + .setAccessKey("invalid") + .setKeyword(Porcupine.BuiltInKeyword.PORCUPINE) + .build(appContext); + } catch (PorcupineException e) { + for (int i = 0; i < error.length; i++) { + assertEquals(e.getMessageStack()[i], error[i]); + } + } + } } @RunWith(Parameterized.class) @@ -407,32 +434,5 @@ public void testProcess() throws Exception { p.delete(); } - - @Test - void getErrorStack() { - String[] error = {}; - try { - new Porcupine.Builder() - .setAccessKey("invalid") - .setKeyword(Porcupine.BuiltInKeyword.PORCUPINE) - .build(appContext); - } catch (PorcupineException e) { - error = e.getMessageStack(); - } - - assertTrue(0 < error.length); - assertTrue(error.length <= 8); - - try { - new Porcupine.Builder() - .setAccessKey("invalid") - .setKeyword(Porcupine.BuiltInKeyword.PORCUPINE) - .build(appContext); - } catch (PorcupineException e) { - for (int i = 0; i < error.length; i++) { - assertEquals(e.getMessageStack()[i], error[i]); - } - } - } } } From 10d9d53f8c21cac2a39fa1078958306200dff65e Mon Sep 17 00:00:00 2001 From: Kwangsoo Yeo Date: Tue, 3 Oct 2023 15:39:36 -0700 Subject: [PATCH 03/12] fix format --- .../src/main/java/ai/picovoice/porcupine/PorcupineNative.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java index 7be1189980..81937cbac2 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java @@ -20,10 +20,10 @@ class PorcupineNative { static native int getSampleRate(); - static native String[] getErrorStack(); - static native void setSdk(String sdk); + static native String[] getErrorStack(); + static native long init( String accessKey, String modelPath, From f16a97360fc159c21da120d57f56d5c4d04867a8 Mon Sep 17 00:00:00 2001 From: Kwangsoo Yeo Date: Wed, 4 Oct 2023 11:38:00 -0700 Subject: [PATCH 04/12] update version --- binding/android/Porcupine/porcupine/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding/android/Porcupine/porcupine/build.gradle b/binding/android/Porcupine/porcupine/build.gradle index 2b24d5d80b..96cabffbbe 100644 --- a/binding/android/Porcupine/porcupine/build.gradle +++ b/binding/android/Porcupine/porcupine/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ext { PUBLISH_GROUP_ID = 'ai.picovoice' - PUBLISH_VERSION = '2.2.2' + PUBLISH_VERSION = '3.0.0' PUBLISH_ARTIFACT_ID = 'porcupine-android' } From bfb314e05427eb33ba8806d2146d6543ba2ccb5e Mon Sep 17 00:00:00 2001 From: Kwangsoo Yeo Date: Wed, 4 Oct 2023 17:06:12 -0700 Subject: [PATCH 05/12] remove get err stack fn --- .../src/main/java/ai/picovoice/porcupine/PorcupineNative.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java index 81937cbac2..f6b7f6c17e 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/PorcupineNative.java @@ -22,8 +22,6 @@ class PorcupineNative { static native void setSdk(String sdk); - static native String[] getErrorStack(); - static native long init( String accessKey, String modelPath, From 92b926a2dc7264bf10b6fe44b90d5907176b58a9 Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 6 Oct 2023 13:20:57 -0700 Subject: [PATCH 06/12] stage --- .../src/main/java/ai/picovoice/porcupine/Porcupine.java | 2 +- .../picovoice/porcupine/exception/PorcupineException.java | 3 +++ binding/android/PorcupineTestApp/build.gradle | 6 ++++++ .../PorcupineTestApp/porcupine-test-app/build.gradle | 2 +- demo/android/Activity/build.gradle | 6 ++++++ .../Activity/porcupine-activity-demo-app/build.gradle | 2 +- .../main/java/ai/picovoice/porcupine/demo/MainActivity.java | 4 +--- demo/android/STT/build.gradle | 6 ++++++ demo/android/STT/porcupine-stt-demo-app/build.gradle | 2 +- demo/android/Service/build.gradle | 6 ++++++ .../android/Service/porcupine-service-demo-app/build.gradle | 2 +- resources/.lint/java/suppress.xml | 2 +- 12 files changed, 34 insertions(+), 9 deletions(-) diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java index 83991c0154..9610c9bb33 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/Porcupine.java @@ -1,5 +1,5 @@ /* - Copyright 2021-2022 Picovoice Inc. + Copyright 2021-2023 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java index 96df344c0d..73c8c524bf 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java @@ -10,6 +10,8 @@ package ai.picovoice.porcupine; +import android.annotation.SuppressLint; + public class PorcupineException extends Exception { private final String message; private final String[] messageStack; @@ -36,6 +38,7 @@ public String[] getMessageStack() { return this.messageStack; } + @SuppressLint("DefaultLocale") @Override public String getMessage() { StringBuilder sb = new StringBuilder(message); diff --git a/binding/android/PorcupineTestApp/build.gradle b/binding/android/PorcupineTestApp/build.gradle index c2a2dfe84b..dcf94a3df1 100644 --- a/binding/android/PorcupineTestApp/build.gradle +++ b/binding/android/PorcupineTestApp/build.gradle @@ -6,6 +6,9 @@ buildscript { repositories { google() mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + } } dependencies { classpath 'com.android.tools.build:gradle:7.2.2' @@ -21,6 +24,9 @@ allprojects { repositories { google() mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + } } } diff --git a/binding/android/PorcupineTestApp/porcupine-test-app/build.gradle b/binding/android/PorcupineTestApp/porcupine-test-app/build.gradle index 4d3deb8239..e67c545ef5 100644 --- a/binding/android/PorcupineTestApp/porcupine-test-app/build.gradle +++ b/binding/android/PorcupineTestApp/porcupine-test-app/build.gradle @@ -136,7 +136,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'com.google.code.gson:gson:2.10' - implementation files('/home/kwangsoo/work/github/porcupine/binding/android/Porcupine/porcupine/build/outputs/aar/porcupine-debug.aar') + implementation 'ai.picovoice:porcupine-android:3.0.0' // Espresso UI Testing androidTestImplementation 'androidx.test.ext:junit:1.1.5' diff --git a/demo/android/Activity/build.gradle b/demo/android/Activity/build.gradle index c2a2dfe84b..dcf94a3df1 100644 --- a/demo/android/Activity/build.gradle +++ b/demo/android/Activity/build.gradle @@ -6,6 +6,9 @@ buildscript { repositories { google() mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + } } dependencies { classpath 'com.android.tools.build:gradle:7.2.2' @@ -21,6 +24,9 @@ allprojects { repositories { google() mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + } } } diff --git a/demo/android/Activity/porcupine-activity-demo-app/build.gradle b/demo/android/Activity/porcupine-activity-demo-app/build.gradle index 93a1306723..5196b97f07 100644 --- a/demo/android/Activity/porcupine-activity-demo-app/build.gradle +++ b/demo/android/Activity/porcupine-activity-demo-app/build.gradle @@ -71,7 +71,7 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.google.code.gson:gson:2.10' - implementation 'ai.picovoice:porcupine-android:2.2.2' + implementation 'ai.picovoice:porcupine-android:3.0.0' } afterEvaluate { diff --git a/demo/android/Activity/porcupine-activity-demo-app/src/main/java/ai/picovoice/porcupine/demo/MainActivity.java b/demo/android/Activity/porcupine-activity-demo-app/src/main/java/ai/picovoice/porcupine/demo/MainActivity.java index 1407cbfd6d..c9022e767c 100644 --- a/demo/android/Activity/porcupine-activity-demo-app/src/main/java/ai/picovoice/porcupine/demo/MainActivity.java +++ b/demo/android/Activity/porcupine-activity-demo-app/src/main/java/ai/picovoice/porcupine/demo/MainActivity.java @@ -107,9 +107,7 @@ private void startPorcupine() { porcupineManager = builder.build(getApplicationContext(), porcupineManagerCallback); porcupineManager.start(); } catch (PorcupineInvalidArgumentException e) { - onPorcupineInitError( - String.format("%s\nEnsure your accessKey '%s' is a valid access key.", e.getMessage(), ACCESS_KEY) - ); + onPorcupineInitError(e.getMessage()); } catch (PorcupineActivationException e) { onPorcupineInitError("AccessKey activation error"); } catch (PorcupineActivationLimitException e) { diff --git a/demo/android/STT/build.gradle b/demo/android/STT/build.gradle index a2b6957dfa..a14c7c38c7 100644 --- a/demo/android/STT/build.gradle +++ b/demo/android/STT/build.gradle @@ -7,6 +7,9 @@ buildscript { repositories { google() mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + } } dependencies { classpath 'com.android.tools.build:gradle:7.2.2' @@ -17,6 +20,9 @@ allprojects { repositories { google() mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + } } } diff --git a/demo/android/STT/porcupine-stt-demo-app/build.gradle b/demo/android/STT/porcupine-stt-demo-app/build.gradle index 4df85f5951..aff56a6722 100644 --- a/demo/android/STT/porcupine-stt-demo-app/build.gradle +++ b/demo/android/STT/porcupine-stt-demo-app/build.gradle @@ -28,5 +28,5 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'ai.picovoice:porcupine-android:2.2.2' + implementation 'ai.picovoice:porcupine-android:3.0.0' } diff --git a/demo/android/Service/build.gradle b/demo/android/Service/build.gradle index b82865ec63..0f25a18548 100644 --- a/demo/android/Service/build.gradle +++ b/demo/android/Service/build.gradle @@ -7,6 +7,9 @@ buildscript { repositories { google() mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + } } dependencies { classpath 'com.android.tools.build:gradle:7.2.2' @@ -17,6 +20,9 @@ allprojects { repositories { google() mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + } } } diff --git a/demo/android/Service/porcupine-service-demo-app/build.gradle b/demo/android/Service/porcupine-service-demo-app/build.gradle index 0946a411cd..04edfafc3e 100644 --- a/demo/android/Service/porcupine-service-demo-app/build.gradle +++ b/demo/android/Service/porcupine-service-demo-app/build.gradle @@ -25,5 +25,5 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'ai.picovoice:porcupine-android:2.2.2' + implementation 'ai.picovoice:porcupine-android:3.0.0' } diff --git a/resources/.lint/java/suppress.xml b/resources/.lint/java/suppress.xml index 290f2c2817..02787ef326 100644 --- a/resources/.lint/java/suppress.xml +++ b/resources/.lint/java/suppress.xml @@ -10,7 +10,7 @@ - + From 331190462b6bde624b3b52e407a7726e8651601c Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 6 Oct 2023 13:26:35 -0700 Subject: [PATCH 07/12] error adjustments --- .../java/ai/picovoice/porcupine/sttdemo/MainActivity.java | 4 +--- .../picovoice/porcupinedemoservice/PorcupineService.java | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/demo/android/STT/porcupine-stt-demo-app/src/main/java/ai/picovoice/porcupine/sttdemo/MainActivity.java b/demo/android/STT/porcupine-stt-demo-app/src/main/java/ai/picovoice/porcupine/sttdemo/MainActivity.java index edd1742c79..8e270765cf 100644 --- a/demo/android/STT/porcupine-stt-demo-app/src/main/java/ai/picovoice/porcupine/sttdemo/MainActivity.java +++ b/demo/android/STT/porcupine-stt-demo-app/src/main/java/ai/picovoice/porcupine/sttdemo/MainActivity.java @@ -118,9 +118,7 @@ protected void onCreate(Bundle savedInstanceState) { .build(getApplicationContext(), porcupineManagerCallback); } catch (PorcupineInvalidArgumentException e) { - onPorcupineInitError( - String.format("%s\nEnsure your accessKey '%s' is a valid access key.", e.getMessage(), ACCESS_KEY) - ); + onPorcupineInitError(e.getMessage()); } catch (PorcupineActivationException e) { onPorcupineInitError("AccessKey activation error"); } catch (PorcupineActivationLimitException e) { diff --git a/demo/android/Service/porcupine-service-demo-app/src/main/java/ai/picovoice/porcupinedemoservice/PorcupineService.java b/demo/android/Service/porcupine-service-demo-app/src/main/java/ai/picovoice/porcupinedemoservice/PorcupineService.java index e6e52a8afa..437e06c618 100644 --- a/demo/android/Service/porcupine-service-demo-app/src/main/java/ai/picovoice/porcupinedemoservice/PorcupineService.java +++ b/demo/android/Service/porcupine-service-demo-app/src/main/java/ai/picovoice/porcupinedemoservice/PorcupineService.java @@ -83,9 +83,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { porcupineManager.start(); } catch (PorcupineInvalidArgumentException e) { - onPorcupineInitError( - String.format("%s\nEnsure your accessKey '%s' is a valid access key.", e.getMessage(), ACCESS_KEY) - ); + onPorcupineInitError(e.getMessage()); } catch (PorcupineActivationException e) { onPorcupineInitError("AccessKey activation error"); } catch (PorcupineActivationLimitException e) { @@ -95,12 +93,12 @@ public int onStartCommand(Intent intent, int flags, int startId) { } catch (PorcupineActivationThrottledException e) { onPorcupineInitError("AccessKey has been throttled"); } catch (PorcupineException e) { - onPorcupineInitError("Failed to initialize Porcupine " + e.getMessage()); + onPorcupineInitError("Failed to initialize Porcupine: " + e.getMessage()); } Notification notification = porcupineManager == null ? getNotification("Porcupine init failed", "Service will be shut down") : - getNotification("Wake word", "Service running"); + getNotification("Wake word service", "Say 'Porcupine'!"); startForeground(1234, notification); return super.onStartCommand(intent, flags, startId); From f0e39e64b6a48a977cd18c34d9d61539b4483a02 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 11 Oct 2023 11:21:38 -0700 Subject: [PATCH 08/12] update android libs --- binding/android/PorcupineTestApp/build.gradle | 4 ++-- demo/android/Activity/build.gradle | 4 ++-- demo/android/STT/build.gradle | 6 +++--- demo/android/Service/build.gradle | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/binding/android/PorcupineTestApp/build.gradle b/binding/android/PorcupineTestApp/build.gradle index dcf94a3df1..6b49799117 100644 --- a/binding/android/PorcupineTestApp/build.gradle +++ b/binding/android/PorcupineTestApp/build.gradle @@ -7,7 +7,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' } } dependencies { @@ -25,7 +25,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' } } } diff --git a/demo/android/Activity/build.gradle b/demo/android/Activity/build.gradle index dcf94a3df1..6b49799117 100644 --- a/demo/android/Activity/build.gradle +++ b/demo/android/Activity/build.gradle @@ -7,7 +7,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' } } dependencies { @@ -25,7 +25,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' } } } diff --git a/demo/android/STT/build.gradle b/demo/android/STT/build.gradle index a14c7c38c7..29deda3281 100644 --- a/demo/android/STT/build.gradle +++ b/demo/android/STT/build.gradle @@ -3,12 +3,12 @@ ext { } buildscript { - + repositories { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' } } dependencies { @@ -21,7 +21,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' } } } diff --git a/demo/android/Service/build.gradle b/demo/android/Service/build.gradle index 0f25a18548..3f4acb1dfe 100644 --- a/demo/android/Service/build.gradle +++ b/demo/android/Service/build.gradle @@ -8,7 +8,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' } } dependencies { @@ -21,7 +21,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1261/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' } } } From c1e98df6dc65458912491d2be1ecf16ca6b9d872 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 11 Oct 2023 11:28:52 -0700 Subject: [PATCH 09/12] minor --- .../ai/picovoice/porcupine/exception/PorcupineException.java | 2 -- binding/android/PorcupineTestApp/build.gradle | 4 ++-- demo/android/Activity/build.gradle | 4 ++-- demo/android/STT/build.gradle | 4 ++-- demo/android/Service/build.gradle | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java index 73c8c524bf..821ec1048a 100644 --- a/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java +++ b/binding/android/Porcupine/porcupine/src/main/java/ai/picovoice/porcupine/exception/PorcupineException.java @@ -48,8 +48,6 @@ public String getMessage() { for (int i = 0; i < messageStack.length; i++) { sb.append(String.format("\n [%d] %s", i, messageStack[i])); } - } else { - sb.append("."); } } return sb.toString(); diff --git a/binding/android/PorcupineTestApp/build.gradle b/binding/android/PorcupineTestApp/build.gradle index 6b49799117..38ec2ce3e3 100644 --- a/binding/android/PorcupineTestApp/build.gradle +++ b/binding/android/PorcupineTestApp/build.gradle @@ -7,7 +7,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' } } dependencies { @@ -25,7 +25,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' } } } diff --git a/demo/android/Activity/build.gradle b/demo/android/Activity/build.gradle index 6b49799117..38ec2ce3e3 100644 --- a/demo/android/Activity/build.gradle +++ b/demo/android/Activity/build.gradle @@ -7,7 +7,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' } } dependencies { @@ -25,7 +25,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' } } } diff --git a/demo/android/STT/build.gradle b/demo/android/STT/build.gradle index 29deda3281..cf8547915a 100644 --- a/demo/android/STT/build.gradle +++ b/demo/android/STT/build.gradle @@ -8,7 +8,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' } } dependencies { @@ -21,7 +21,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' } } } diff --git a/demo/android/Service/build.gradle b/demo/android/Service/build.gradle index 3f4acb1dfe..276b67ea56 100644 --- a/demo/android/Service/build.gradle +++ b/demo/android/Service/build.gradle @@ -8,7 +8,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' } } dependencies { @@ -21,7 +21,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1262/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' } } } From 0a7ba30a4cf99b12d58151852c61f70919076330 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 11 Oct 2023 12:00:17 -0700 Subject: [PATCH 10/12] demo fix --- .../Activity/porcupine-activity-demo-app/build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/demo/android/Activity/porcupine-activity-demo-app/build.gradle b/demo/android/Activity/porcupine-activity-demo-app/build.gradle index 5196b97f07..0993f780c6 100644 --- a/demo/android/Activity/porcupine-activity-demo-app/build.gradle +++ b/demo/android/Activity/porcupine-activity-demo-app/build.gradle @@ -7,9 +7,8 @@ android { applicationId "ai.picovoice.porcupine.demo" minSdkVersion 21 targetSdkVersion defaultTargetSdkVersion - versionCode 7 - versionName "2.2.0" - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' + versionCode 8 + versionName "3.0.0" } buildTypes { release { From 7d27685713d931a3a3578b3f6ef6de9a5b12aad5 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 11 Oct 2023 12:19:02 -0700 Subject: [PATCH 11/12] test name --- .../java/ai/picovoice/porcupine/testapp/PorcupineTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java b/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java index a0115298d4..05bde74629 100644 --- a/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java +++ b/binding/android/PorcupineTestApp/porcupine-test-app/src/androidTest/java/ai/picovoice/porcupine/testapp/PorcupineTest.java @@ -320,7 +320,7 @@ public void testInitWithNonAsciiModelName() throws PorcupineException { } @Test - public void getErrorStack() { + public void testErrorStack() { String[] error = {}; try { new Porcupine.Builder() From 488467064e04477c6114e069f549a2d767e462d2 Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 13 Oct 2023 10:58:07 -0700 Subject: [PATCH 12/12] update staging --- binding/android/PorcupineTestApp/build.gradle | 4 ++-- demo/android/Activity/build.gradle | 4 ++-- demo/android/STT/build.gradle | 4 ++-- demo/android/Service/build.gradle | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/binding/android/PorcupineTestApp/build.gradle b/binding/android/PorcupineTestApp/build.gradle index 38ec2ce3e3..abfc19f5af 100644 --- a/binding/android/PorcupineTestApp/build.gradle +++ b/binding/android/PorcupineTestApp/build.gradle @@ -7,7 +7,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1266/' } } dependencies { @@ -25,7 +25,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1266/' } } } diff --git a/demo/android/Activity/build.gradle b/demo/android/Activity/build.gradle index 38ec2ce3e3..abfc19f5af 100644 --- a/demo/android/Activity/build.gradle +++ b/demo/android/Activity/build.gradle @@ -7,7 +7,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1266/' } } dependencies { @@ -25,7 +25,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1266/' } } } diff --git a/demo/android/STT/build.gradle b/demo/android/STT/build.gradle index cf8547915a..5b7dd32a8c 100644 --- a/demo/android/STT/build.gradle +++ b/demo/android/STT/build.gradle @@ -8,7 +8,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1266/' } } dependencies { @@ -21,7 +21,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1266/' } } } diff --git a/demo/android/Service/build.gradle b/demo/android/Service/build.gradle index 276b67ea56..2ad1012592 100644 --- a/demo/android/Service/build.gradle +++ b/demo/android/Service/build.gradle @@ -8,7 +8,7 @@ buildscript { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1266/' } } dependencies { @@ -21,7 +21,7 @@ allprojects { google() mavenCentral() maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1263/' + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1266/' } } }