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

v3.0 #1146

Merged
merged 60 commits into from
Oct 26, 2023
Merged

v3.0 #1146

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e6ec955
v3.0 libs + resources (#1092)
laves Oct 6, 2023
687477c
wip
Oct 6, 2023
3bb6e9d
Fix bb libs
Oct 6, 2023
8123772
MCU - v3.0 (#1099)
mrrostam Oct 10, 2023
9fc1a31
v3.0 c (#1095)
ksyeo1010 Oct 11, 2023
080ce0a
update jni and node
ksyeo1010 Oct 11, 2023
3818207
fix bb build
ksyeo1010 Oct 12, 2023
3d98db1
threading patch
laves Oct 13, 2023
598ab78
bb
laves Oct 13, 2023
eaad31e
Initial Rust Binding Changes
ErisMik Sep 26, 2023
33d3eff
Address pv_error API changes
ErisMik Sep 27, 2023
1287a6d
Properly convert strings to rust strings
ErisMik Sep 27, 2023
e098f8c
More stable string conversion
ErisMik Sep 28, 2023
ba02a58
update error and test
ksyeo1010 Oct 3, 2023
353373c
update demo
ksyeo1010 Oct 10, 2023
60e6485
udpate workflow
ksyeo1010 Oct 10, 2023
e4f1ce8
update
ksyeo1010 Oct 10, 2023
2caf0c3
fix lint
ksyeo1010 Oct 10, 2023
fe5da6a
fix build
ksyeo1010 Oct 10, 2023
53fedae
fix build
ksyeo1010 Oct 10, 2023
14e671e
fix build
ksyeo1010 Oct 10, 2023
d9ac3de
v3.0 dotnet (#1106)
laves Oct 13, 2023
bc5c626
v3.0 python (#1093)
laves Oct 13, 2023
f4dc03b
v3.0 ios (#1100)
laves Oct 13, 2023
07acef7
v3.0 android (#1096)
laves Oct 13, 2023
c240f9d
pod update
laves Oct 13, 2023
5ea73c8
v3.0 node (#1097)
ksyeo1010 Oct 16, 2023
1523441
v3.0 web (#1094)
ksyeo1010 Oct 16, 2023
557bd74
v3.0 java (#1098)
ksyeo1010 Oct 16, 2023
5ebb6bb
update message
ksyeo1010 Oct 16, 2023
1a3cc35
v3.0 go (#1107)
ksyeo1010 Oct 16, 2023
5e3f1fb
Merge pull request #1105 from Picovoice/v3.0-rust
ErisMik Oct 16, 2023
da93a95
v3.0 unity (#1101)
ksyeo1010 Oct 16, 2023
8ec8ab4
fix wasm output (#1111)
ksyeo1010 Oct 17, 2023
db95052
Add static (#1114)
ksyeo1010 Oct 18, 2023
5ddba97
update node errors (#1113)
ksyeo1010 Oct 18, 2023
d8806a2
update unity workflow
ksyeo1010 Oct 18, 2023
9240a2e
new ios lib
laves Oct 18, 2023
237d0c4
update
laves Oct 18, 2023
6a7b1d5
v3.0 rn (#1110)
laves Oct 19, 2023
d0390d3
v3.0 Flutter (#1108)
laves Oct 19, 2023
1055e0f
v3.0 rn sdk (#1127)
laves Oct 20, 2023
4574fbb
v3.0 web UI (#1126)
ksyeo1010 Oct 23, 2023
60f107a
minor
laves Oct 24, 2023
b0313b5
minor demo fixes
laves Oct 24, 2023
a52c79a
python release (#1134)
laves Oct 25, 2023
8f9a5a6
v3.0 web release (#1133)
ksyeo1010 Oct 25, 2023
8cf2818
v3.0 rust release (#1135)
ksyeo1010 Oct 25, 2023
449cd2a
v3.0 node release (#1136)
ksyeo1010 Oct 25, 2023
63a101d
v3.0 unity release (#1137)
ksyeo1010 Oct 25, 2023
b9364d5
v3.0 go release (#1138)
ksyeo1010 Oct 25, 2023
3818e0d
v3.0 java release (#1140)
ksyeo1010 Oct 25, 2023
beb6fef
android release (#1139)
laves Oct 25, 2023
ad8c493
pod cor
laves Oct 25, 2023
4f08325
minor
laves Oct 25, 2023
2712aba
v3.0 web ui release (#1141)
ksyeo1010 Oct 25, 2023
5abec9b
dotnet release (#1143)
laves Oct 25, 2023
8ce3ae5
ios release (#1142)
laves Oct 25, 2023
a7ceccd
flutter release (#1144)
laves Oct 25, 2023
a4edb1e
rn release (#1145)
laves Oct 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/angular-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: demo/dotnet-vui/
working-directory: demo/dotnet-vui/AvaloniaVUI

strategy:
matrix:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/go-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: [ '1.16', '1.17', '1.18' ]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', 'stable' ]

steps:
- uses: actions/checkout@v3

- name: Set up Mingw
uses: egor-tensin/setup-mingw@v2
if: ${{ (matrix.os == 'windows-latest') && (matrix.go != 'stable') && (matrix.go < 1.20) }}
with:
version: 11.2.0

- name: Set up go
uses: actions/setup-go@v4
with:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,17 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: [ '1.16', '1.17', '1.18' ]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', 'stable' ]

steps:
- uses: actions/checkout@v3

- name: Set up Mingw
uses: egor-tensin/setup-mingw@v2
if: ${{ (matrix.os == 'windows-latest') && (matrix.go != 'stable') && (matrix.go < 1.20) }}
with:
version: 11.2.0

- name: Set up go
uses: actions/setup-go@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/react-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/react-native-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Pre-build dependencies
run: npm install yarn
# ************ REMOVE AFTER RELEASE *****************
- name: Build and package binding
working-directory: binding/react-native
run: yarn && yarn pkg

- name: Add to demo
run: yarn add ../../binding/react-native/pkg/picovoice-porcupine-react-native-3.0.0.tgz
# ***************************************************

- name: Install dependencies
run: yarn android-install
Expand All @@ -63,8 +69,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Pre-build dependencies
run: npm install yarn
# ************ REMOVE AFTER RELEASE *****************
- name: Build and package binding
working-directory: binding/react-native
run: yarn && yarn pkg

- name: Add to demo
run: yarn add ../../binding/react-native/pkg/picovoice-porcupine-react-native-3.0.0.tgz
# ***************************************************

- name: Install dependencies
run: yarn ios-install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/react-native-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Cocoapods install
working-directory: binding/react-native/test-app/PorcupineTestApp/ios
run: pod install
run: pod install --repo-update

- name: Inject AppID
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:' Tests.ts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
50 changes: 22 additions & 28 deletions .github/workflows/unity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,38 +65,35 @@ jobs:
Assets/Porcupine/Tests/Integration.cs

- name: Run tests
run: xvfb-run --auto-servernum --server-args='-screen 0 640x480x24'
/home/picovoice/Unity/Hub/Editor/2019.4.34f1/Editor/Unity -runTests -batchmode -projectPath . -testResults unityresults.xml -testPlatform StandaloneLinux64 -logFile -
run: xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' /home/picovoice/Unity/Hub/Editor/2021.3.31f1/Editor/Unity -runTests -batchmode -projectPath . -testResults unityresults.xml -testPlatform StandaloneLinux64 -logFile -

- name: Check Results
run: sed -n 2p unityresults.xml | grep 'result="Passed"'

playtest-mac:
name: Run PlayTest unit tests on macOS
runs-on: pv-ios
# NOTE: fix later as mac runner halts unity test app in between runs. Running locally works fine as well as first try after restarting runner.
# playtest-mac:
# name: Run PlayTest unit tests on macOS
# runs-on: pv-ios

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: 'recursive'

- name: Pre-build dependencies
run: |
./copy.sh
./copy_test_resources.sh
# - name: Pre-build dependencies
# run: |
# ./copy.sh
# ./copy_test_resources.sh

- name: Clean conflicting dylib
run: rm -rf Assets/Porcupine/Plugins/mac/arm64
# - name: Inject AppID
# run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
# Assets/Porcupine/Tests/Integration.cs

- name: Inject AppID
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
Assets/Porcupine/Tests/Integration.cs

- name: Run tests
run: /Applications/Unity/Hub/Editor/2019.4.34f1/Unity.app/Contents/MacOS/Unity -runTests -batchmode -projectPath . -testResults unityresults.xml -testPlatform StandaloneOSX -logFile -
# - name: Run tests
# run: /Applications/Unity/Hub/Editor/2021.3.31f1/Unity.app/Contents/MacOS/Unity -runTests -batchmode -projectPath . -testResults unityresults.xml -testPlatform StandaloneOSX -logFile -

- name: Check Results
run: sed -n 2p unityresults.xml | grep 'result="Passed"'
# - name: Check Results
# run: sed -n 2p unityresults.xml | grep 'result="Passed"'

playtest-windows:
name: Run PlayTest unit tests on Windows
Expand All @@ -120,7 +117,7 @@ jobs:

- name: Run tests
run: >
& "C:\Program Files\Unity\Hub\Editor\2019.4.34f1\Editor\Unity.exe" -runTests -batchmode -projectPath . -testResults unityresults.xml -testPlatform StandaloneWindows64 -logFile - | Out-Host
& "C:\Program Files\Unity\Hub\Editor\2021.3.31f1\Editor\Unity.exe" -runTests -batchmode -projectPath . -testResults unityresults.xml -testPlatform StandaloneWindows64 -logFile - | Out-Host
- name: Check Results
run: bash -c "sed -n 2p unityresults.xml | grep Passed"
Expand All @@ -139,9 +136,6 @@ jobs:
./copy.sh
./copy_test_resources.sh
- name: Clean conflicting dylib
run: rm -rf Assets/Porcupine/Plugins/mac/arm64

- name: Inject AppID
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
Assets/Porcupine/Tests/Integration.cs
Expand All @@ -150,7 +144,7 @@ jobs:
run: /Users/alirezakenarsari-anhari/Library/Android/sdk/emulator/emulator -avd Pixel_6_API_33 &

- name: Run tests
run: /Applications/Unity/Hub/Editor/2019.4.34f1/Unity.app/Contents/MacOS/Unity -runTests -batchmode -projectPath . -testResults unityresults.xml -testPlatform Android -logFile -
run: /Applications/Unity/Hub/Editor/2021.3.31f1/Unity.app/Contents/MacOS/Unity -runTests -batchmode -buildTarget Android -projectPath . -testResults unityresults.xml -testPlatform Android -logFile -

- name: Check Results
run: sed -n 2p unityresults.xml | grep 'result="Passed"'
2 changes: 1 addition & 1 deletion .github/workflows/vue-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion binding/android/Porcupine/porcupine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -43,13 +43,18 @@ public class Porcupine {

private static String DEFAULT_MODEL_PATH;
private static boolean isExtracted;
private static String _sdk = "android";

static {
System.loadLibrary("pv_porcupine");
}

private long handle;

public static void setSdk(String sdk) {
Porcupine._sdk = sdk;
}

/**
* Constructor.
*
Expand All @@ -66,6 +71,8 @@ private Porcupine(
String modelPath,
String[] keywordPaths,
float[] sensitivities) throws PorcupineException {
PorcupineNative.setSdk(Porcupine._sdk);

handle = PorcupineNative.init(
accessKey,
modelPath,
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -20,6 +20,8 @@ class PorcupineNative {

static native int getSampleRate();

static native void setSdk(String sdk);

static native long init(
String accessKey,
String modelPath,
Expand All @@ -31,5 +33,4 @@ static native long init(
static native int process(
long object,
short[] pcm) throws PorcupineException;

}
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,4 +18,8 @@ public PorcupineActivationException(Throwable cause) {
public PorcupineActivationException(String message) {
super(message);
}

public PorcupineActivationException(String message, String[] messageStack) {
super(message, messageStack);
}
}
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,4 +18,8 @@ public PorcupineActivationLimitException(Throwable cause) {
public PorcupineActivationLimitException(String message) {
super(message);
}

public PorcupineActivationLimitException(String message, String[] messageStack) {
super(message, messageStack);
}
}
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,4 +18,8 @@ public PorcupineActivationRefusedException(Throwable cause) {
public PorcupineActivationRefusedException(String message) {
super(message);
}

public PorcupineActivationRefusedException(String message, String[] messageStack) {
super(message, messageStack);
}
}
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,4 +18,8 @@ public PorcupineActivationThrottledException(Throwable cause) {
public PorcupineActivationThrottledException(String message) {
super(message);
}

public PorcupineActivationThrottledException(String message, String[] messageStack) {
super(message, messageStack);
}
}
Loading
Loading