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 #630

Merged
merged 53 commits into from
Oct 26, 2023
Merged

v3.0 #630

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
50ae28c
v3.0 libs + resources (#578)
laves Oct 6, 2023
b89b424
Fix bb libs
mrrostam Oct 6, 2023
65e7453
spelling fix
laves Oct 6, 2023
6a68ce1
update jni and node libs
ksyeo1010 Oct 11, 2023
d081b2a
update bb libs
ksyeo1010 Oct 12, 2023
6b12d94
thread patch
laves Oct 13, 2023
be7d4c4
bb
laves Oct 13, 2023
f4a4935
v3.0 python (#579)
laves Oct 16, 2023
398b895
v3.0 android (#586)
laves Oct 16, 2023
c91670a
v3.0 dotnet (#585)
laves Oct 16, 2023
fec973b
v3.0 ios (#584)
laves Oct 16, 2023
e93de2f
v3.0 changes
ksyeo1010 Oct 3, 2023
e457f47
v3.0 changes
ksyeo1010 Oct 3, 2023
4cc3c7a
update rhino api
ksyeo1010 Oct 5, 2023
120cc8d
update rust
ksyeo1010 Oct 16, 2023
a224ad3
update
ksyeo1010 Oct 16, 2023
4003199
revert
ksyeo1010 Oct 16, 2023
bdf732e
revert unwanted files
ksyeo1010 Oct 16, 2023
7ede88d
revert
ksyeo1010 Oct 16, 2023
4bd9e1e
fix test
ksyeo1010 Oct 16, 2023
3d13ec3
fix test
ksyeo1010 Oct 16, 2023
3bd3cdc
fix workflow
ksyeo1010 Oct 16, 2023
43ad198
v3.0 node (#588)
ksyeo1010 Oct 17, 2023
230a53a
v3.0 java (#590)
ksyeo1010 Oct 17, 2023
ed92410
v3.0 web (#591)
ksyeo1010 Oct 17, 2023
41c1d51
Merge pull request #592 from Picovoice/v3.0-rust
ErisMik Oct 18, 2023
6ff9ee8
update demo (#594)
ksyeo1010 Oct 18, 2023
82d58cf
v3.0 go (#589)
ksyeo1010 Oct 18, 2023
c076a8f
update error (#595)
ksyeo1010 Oct 18, 2023
c77fc31
v3.0 unity (#593)
ksyeo1010 Oct 18, 2023
469218d
ios list update
laves Oct 18, 2023
f11dd07
flutter (#606)
laves Oct 19, 2023
7cd1ba2
v3.0 unity (#605)
ksyeo1010 Oct 19, 2023
1973ed0
v3.0 web fix (#609)
ksyeo1010 Oct 19, 2023
0e4b8f0
v3.0 react native (#607)
laves Oct 19, 2023
4256187
v3.0 react native fix (#611)
laves Oct 20, 2023
988e7ce
v3.0 web UI (#610)
ksyeo1010 Oct 23, 2023
341a6a3
v3.0 web err stack update (#615)
ksyeo1010 Oct 24, 2023
28a2648
minor demo fixes
laves Oct 24, 2023
08e55dc
python release (#616)
laves Oct 25, 2023
12afc40
v3.0 java release (#618)
ksyeo1010 Oct 25, 2023
1eb4e29
v3.0 web release (#620)
ksyeo1010 Oct 25, 2023
22a0a21
v3.0 node release (#619)
ksyeo1010 Oct 25, 2023
dae8f6e
android release (#617)
laves Oct 25, 2023
5ad8a3d
v3.0 rust release (#621)
ksyeo1010 Oct 25, 2023
a889981
v3.0 go release (#622)
ksyeo1010 Oct 25, 2023
eebb96f
update package (#623)
ksyeo1010 Oct 25, 2023
29baae3
v3.0 web ui release (#624)
ksyeo1010 Oct 25, 2023
60bbf58
dotnet release (#626)
laves Oct 25, 2023
d91161c
ios release (#625)
laves Oct 25, 2023
2b779c3
flutter release (#627)
laves Oct 25, 2023
fb451b1
update package (#628)
ksyeo1010 Oct 25, 2023
da457fb
rn release (#629)
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 @@ -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/angular.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
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Dotnet build micdemo
run: dotnet build -c MicDemo.Release

- name: Dotnet build filedemo
run: dotnet build -c FileDemo.Release

Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:

- name: Dotnet build micdemo
run: dotnet build -c MicDemo.Release

- name: Dotnet build filedemo
run: dotnet build -c FileDemo.Release

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,7 +27,7 @@ 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' ]
include:
- os: ubuntu-latest
platform: linux
Expand All @@ -39,6 +39,12 @@ jobs:
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, macos-latest, windows-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: Setup 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]
include:
- os: ubuntu-latest
platform: linux
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-rhino-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-rhino-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 @@ -73,7 +73,7 @@ jobs:

- name: Cocoapods install
working-directory: binding/react-native/test-app/RhinoTestApp/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 @@ -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
4 changes: 4 additions & 0 deletions .github/workflows/rust-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
toolchain: stable
override: true

- name: Rust build binding
run: bash copy.sh && cargo build --verbose
working-directory: binding/rust

- name: Run clippy
run: cargo clippy -- -D warnings
working-directory: binding/rust
Expand Down
47 changes: 23 additions & 24 deletions .github/workflows/unity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,37 +64,35 @@ jobs:
Assets/Rhino/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: Clean conflicting dylib
run: rm -rf Assets/Rhino/Plugins/mac/arm64
# - name: Pre-build dependencies
# run: |
# ./copy.sh
# ./copy_test_resources.sh

- name: Inject AppID
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
Assets/Rhino/Tests/Integration.cs
# - name: Inject AppID
# run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
# Assets/Rhino/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 @@ -117,7 +115,8 @@ 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 Down Expand Up @@ -145,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 @@ -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/vue.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/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 @@ -35,7 +35,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/Rhino/rhino/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 = 'rhino-android'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2018-2022 Picovoice Inc.
Copyright 2018-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 Down Expand Up @@ -34,6 +34,7 @@ public class Rhino {

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

static {
System.loadLibrary("pv_rhino");
Expand All @@ -42,6 +43,10 @@ public class Rhino {
private long handle;
private boolean isFinalized;

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

/**
* Constructor.
*
Expand Down Expand Up @@ -72,6 +77,8 @@ private Rhino(String accessKey,
float sensitivity,
float endpointDurationSec,
boolean requireEndpoint) throws RhinoException {
RhinoNative.setSdk(Rhino._sdk);

handle = RhinoNative.init(
accessKey,
modelPath,
Expand Down Expand Up @@ -121,6 +128,20 @@ public boolean process(short[] pcm) throws RhinoException {
return isFinalized;
}

/**
* Resets the internal state of Rhino. It should be called before the engine can be
* used to infer intent from a new stream of audio.
*
* @throws RhinoException if reset fails.
*/
public void reset() throws RhinoException {
if (handle == 0) {
throw new RhinoInvalidStateException("Attempted to call Rhino reset after delete.");
}

RhinoNative.reset(handle);
}

/**
* Gets inference result from Rhino. If the spoken command was understood, it includes the
* specific intent name that was inferred, and (if applicable) slot keys and specific slot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,8 @@
package ai.picovoice.rhino;

import android.content.Context;
import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.os.Handler;
import android.os.Looper;
import android.os.Process;
import android.util.Log;

import java.util.concurrent.Callable;
import java.util.concurrent.Executors;

import ai.picovoice.android.voiceprocessor.VoiceProcessor;
import ai.picovoice.android.voiceprocessor.VoiceProcessorErrorListener;
import ai.picovoice.android.voiceprocessor.VoiceProcessorException;
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 RhinoNative {

static native String getVersion();

static native void setSdk(String sdk);

static native long init(
String accessKey,
String modelPath,
Expand All @@ -32,6 +34,8 @@ static native long init(

static native boolean process(long object, short[] pcm) throws RhinoException;

static native void reset(long object) throws RhinoException;

static native RhinoInference getInference(long object) throws RhinoException;

static native String getContextInfo(long object) throws RhinoException;
Expand Down
Loading
Loading