From cf3761fb4ec5abb6564e46cdafac331bf00d4e15 Mon Sep 17 00:00:00 2001 From: Kwangsoo Yeo Date: Tue, 30 Jan 2024 16:00:05 -0800 Subject: [PATCH 1/2] java rpi5 support --- .github/workflows/java-demos.yml | 2 +- .github/workflows/java-perf.yml | 5 ++++- .github/workflows/java.yml | 2 +- binding/java/README.md | 4 ++-- binding/java/build.gradle | 6 ++++-- binding/java/src/ai/picovoice/porcupine/Utils.java | 5 ++++- demo/java/build.gradle | 9 ++++++--- 7 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/java-demos.yml b/.github/workflows/java-demos.yml index 57d68c25df..0953592eaa 100644 --- a/.github/workflows/java-demos.yml +++ b/.github/workflows/java-demos.yml @@ -47,7 +47,7 @@ jobs: strategy: matrix: - machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone] + machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/java-perf.yml b/.github/workflows/java-perf.yml index a8fef8cf93..456e8edd26 100644 --- a/.github/workflows/java-perf.yml +++ b/.github/workflows/java-perf.yml @@ -69,7 +69,7 @@ jobs: strategy: fail-fast: false matrix: - machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone] + machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone] include: - machine: rpi2 num_test_iterations: 20 @@ -86,6 +86,9 @@ jobs: - machine: rpi4-64 num_test_iterations: 50 performance_threshold_sec: 1.5 + - machine: rpi5-64 + num_test_iterations: 50 + performance_threshold_sec: 1.0 - machine: jetson num_test_iterations: 50 performance_threshold_sec: 2.0 diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index c9b97c83d1..7540fff280 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -67,7 +67,7 @@ jobs: strategy: matrix: - machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone] + machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson, beaglebone] steps: - uses: actions/checkout@v3 diff --git a/binding/java/README.md b/binding/java/README.md index d57cdd1767..19abc74495 100644 --- a/binding/java/README.md +++ b/binding/java/README.md @@ -3,7 +3,7 @@ Made in Vancouver, Canada by [Picovoice](https://picovoice.ai) Porcupine is a highly-accurate and lightweight wake word engine. It enables building always-listening voice-enabled -applications. +applications. Porcupine is: @@ -25,7 +25,7 @@ To learn more about Porcupine, see the [product](https://picovoice.ai/products/p - Linux (x86_64) - macOS (x86_64, arm64) - Windows (x86_64) -- Raspberry Pi 2, Raspberry Pi 3 (32 and 64 bit), Raspberry Pi 4 (32 and 64 bit) +- Raspberry Pi 2, Raspberry Pi 3 (32 and 64 bit), Raspberry Pi 4 (32 and 64 bit), Raspberry Pi 5 (32 and 64 bit) - Jetson Nano - BeagleBone diff --git a/binding/java/build.gradle b/binding/java/build.gradle index 3444f90852..7add44f9b1 100644 --- a/binding/java/build.gradle +++ b/binding/java/build.gradle @@ -8,7 +8,7 @@ plugins { ext { PUBLISH_GROUP_ID = 'ai.picovoice' - PUBLISH_VERSION = '3.0.1' + PUBLISH_VERSION = '3.0.2' PUBLISH_ARTIFACT_ID = 'porcupine-java' } @@ -168,7 +168,9 @@ task copyRPiLib(type: Copy) { 'cortex-a53/libpv_porcupine_jni.so', 'cortex-a53-aarch64/libpv_porcupine_jni.so', 'cortex-a72/libpv_porcupine_jni.so', - 'cortex-a72-aarch64/libpv_porcupine_jni.so') + 'cortex-a72-aarch64/libpv_porcupine_jni.so', + 'cortex-a76/libpv_porcupine_jni.so', + 'cortex-a76-aarch64/libpv_porcupine_jni.so') into("${outputDir}/porcupine/lib/java/raspberry-pi/") } task copyJetsonLib(type: Copy) { diff --git a/binding/java/src/ai/picovoice/porcupine/Utils.java b/binding/java/src/ai/picovoice/porcupine/Utils.java index 92e5a92b9e..cf28f88039 100644 --- a/binding/java/src/ai/picovoice/porcupine/Utils.java +++ b/binding/java/src/ai/picovoice/porcupine/Utils.java @@ -1,5 +1,5 @@ /* - Copyright 2018-2021 Picovoice Inc. + Copyright 2018-2024 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. @@ -135,6 +135,7 @@ public static String getEnvironmentName() throws RuntimeException { case "0xc07": case "0xd03": case "0xd08": + case "0xd0b": return "raspberry-pi"; case "0xd07": return "jetson"; @@ -185,6 +186,8 @@ private static String getArchitecture() throws RuntimeException { return "cortex-a57" + archInfo; case "0xd08": return "cortex-a72" + archInfo; + case "0xd0b": + return "cortex-a76" + archInfo; case "0xc08": return ""; default: diff --git a/demo/java/build.gradle b/demo/java/build.gradle index a8683fc3c9..e584c2812c 100644 --- a/demo/java/build.gradle +++ b/demo/java/build.gradle @@ -4,6 +4,9 @@ plugins { repositories { mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1313/' + } } sourceSets { @@ -15,14 +18,14 @@ sourceSets { } dependencies { - implementation 'ai.picovoice:porcupine-java:3.0.1' + implementation 'ai.picovoice:porcupine-java:3.0.2' implementation 'commons-cli:commons-cli:1.4' } jar { manifest { attributes "Main-Class": "ai.picovoice.porcupinedemo.MicDemo", - "Class-Path" : "porcupine-3.0.1.jar;commons-cli-1.4.jar" + "Class-Path" : "porcupine-3.0.2.jar;commons-cli-1.4.jar" } from sourceSets.main.output exclude "**/FileDemo.class" @@ -33,7 +36,7 @@ jar { task fileDemoJar(type: Jar) { manifest { attributes "Main-Class": "ai.picovoice.porcupinedemo.FileDemo", - "Class-Path" : "porcupine-3.0.1.jar;commons-cli-1.4.jar" + "Class-Path" : "porcupine-3.0.2.jar;commons-cli-1.4.jar" } from sourceSets.main.output exclude "**/MicDemo.class" From c1e9e655d7a0dcca2c4d1f4a9c47eaad0d5acbf3 Mon Sep 17 00:00:00 2001 From: Kwangsoo Yeo Date: Wed, 31 Jan 2024 10:21:01 -0800 Subject: [PATCH 2/2] release + update --- demo/java/build.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/demo/java/build.gradle b/demo/java/build.gradle index e584c2812c..64369749b9 100644 --- a/demo/java/build.gradle +++ b/demo/java/build.gradle @@ -4,9 +4,6 @@ plugins { repositories { mavenCentral() - maven { - url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1313/' - } } sourceSets {