Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java rpi5 support #1216

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/java-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/java-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions binding/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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

Expand Down
6 changes: 4 additions & 2 deletions binding/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down Expand Up @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion binding/java/src/ai/picovoice/porcupine/Utils.java
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions demo/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,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"
Expand All @@ -33,7 +33,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"
Expand Down
Loading