diff --git a/.github/workflows/android-perf.yml b/.github/workflows/android-perf.yml
index d9ea4b5a..033ea6d4 100644
--- a/.github/workflows/android-perf.yml
+++ b/.github/workflows/android-perf.yml
@@ -29,11 +29,11 @@ jobs:
device: [single-android, 32bit-android]
include:
- device: single-android
- initPerformanceThresholdSec: 3.25
- procPerformanceThresholdSec: 0.75
+ initPerformanceThresholdSec: 4.0
+ procPerformanceThresholdSec: 2.3
- device: 32bit-android
- initPerformanceThresholdSec: 10.0
- procPerformanceThresholdSec: 4.0
+ initPerformanceThresholdSec: 11.0
+ procPerformanceThresholdSec: 15.0
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/go-codestyle.yml b/.github/workflows/go-codestyle.yml
index 1a1f7d72..8de15cfd 100644
--- a/.github/workflows/go-codestyle.yml
+++ b/.github/workflows/go-codestyle.yml
@@ -29,6 +29,8 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
working-directory: binding/go
+ # TODO: figure out why the linter complains about this??
+ args: --exclude="could not import C"
check-go-micdemo-codestyle:
runs-on: ubuntu-latest
diff --git a/.github/workflows/go-demos.yml b/.github/workflows/go-demos.yml
index d8880c76..d55eaa6b 100644
--- a/.github/workflows/go-demos.yml
+++ b/.github/workflows/go-demos.yml
@@ -26,11 +26,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: Setup go
uses: actions/setup-go@v3
with:
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 6d365879..71973c8c 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -38,11 +38,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: Setup go
uses: actions/setup-go@v3
with:
@@ -58,7 +64,7 @@ jobs:
run: go build
- name: Test
- run: go test -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}
+ run: go test -modfile="go_test.mod" -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}
build-self-hosted:
runs-on: ${{ matrix.machine }}
@@ -80,4 +86,4 @@ jobs:
run: go build
- name: Test
- run: go test -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}
+ run: go test -modfile="go_test.mod" -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}
diff --git a/.github/workflows/ios-perf.yml b/.github/workflows/ios-perf.yml
index 272a493e..2805e7ae 100644
--- a/.github/workflows/ios-perf.yml
+++ b/.github/workflows/ios-perf.yml
@@ -29,8 +29,8 @@ jobs:
device: [ios-perf]
include:
- device: ios-perf
- initPerformanceThresholdSec: 1.5
- procPerformanceThresholdSec: 0.2
+ initPerformanceThresholdSec: 2.5
+ procPerformanceThresholdSec: 0.5
steps:
- name: Checkout
diff --git a/.github/workflows/java-demos.yml b/.github/workflows/java-demos.yml
index 28ea36d8..60f8c061 100644
--- a/.github/workflows/java-demos.yml
+++ b/.github/workflows/java-demos.yml
@@ -26,14 +26,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
+ java-version: ['11', '17', '19']
steps:
- uses: actions/checkout@v3
- - name: Set up JDK 11
+ - name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
- java-version: '11'
+ java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Build
diff --git a/.github/workflows/java-perf.yml b/.github/workflows/java-perf.yml
index 43c668ef..a22846ff 100644
--- a/.github/workflows/java-perf.yml
+++ b/.github/workflows/java-perf.yml
@@ -31,14 +31,14 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
- init_performance_threshold_sec: 2.0
- proc_performance_threshold_sec: 0.5
- - os: windows-latest
- init_performance_threshold_sec: 2.1
- proc_performance_threshold_sec: 0.6
+ init_performance_threshold_sec: 4.5
+ proc_performance_threshold_sec: 1.0
- os: macos-latest
- init_performance_threshold_sec: 2.5
- proc_performance_threshold_sec: 0.7
+ init_performance_threshold_sec: 5.5
+ proc_performance_threshold_sec: 3.0
+ - os: windows-latest
+ init_performance_threshold_sec: 4.5
+ proc_performance_threshold_sec: 1.0
steps:
- uses: actions/checkout@v3
@@ -64,20 +64,20 @@ jobs:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson]
include:
- machine: rpi3-32
- init_performance_threshold_sec: 7.5
- proc_performance_threshold_sec: 3.3
+ init_performance_threshold_sec: 14.0
+ proc_performance_threshold_sec: 9.3
- machine: rpi3-64
- init_performance_threshold_sec: 8.8
- proc_performance_threshold_sec: 3.3
+ init_performance_threshold_sec: 13.5
+ proc_performance_threshold_sec: 8.3
- machine: rpi4-32
- init_performance_threshold_sec: 5.6
- proc_performance_threshold_sec: 2.0
+ init_performance_threshold_sec: 8.5
+ proc_performance_threshold_sec: 4.6
- machine: rpi4-64
- init_performance_threshold_sec: 5.1
- proc_performance_threshold_sec: 1.9
+ init_performance_threshold_sec: 7.8
+ proc_performance_threshold_sec: 5.0
- machine: jetson
- init_performance_threshold_sec: 5.1
- proc_performance_threshold_sec: 2.0
+ init_performance_threshold_sec: 7.8
+ proc_performance_threshold_sec: 5.5
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml
index 52de5021..6c115811 100644
--- a/.github/workflows/java.yml
+++ b/.github/workflows/java.yml
@@ -30,14 +30,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
+ java-version: ['11', '17', '19']
steps:
- uses: actions/checkout@v3
- - name: Set up JDK 11
+ - name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
- java-version: '11'
+ java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Build
diff --git a/.github/workflows/nodejs-codestyle.yml b/.github/workflows/nodejs-codestyle.yml
index 5c7520a7..1c3d08e3 100644
--- a/.github/workflows/nodejs-codestyle.yml
+++ b/.github/workflows/nodejs-codestyle.yml
@@ -27,9 +27,6 @@ jobs:
with:
node-version: lts/*
- - name: Pre-build dependencies
- run: npm install yarn
-
- name: Run Binding Linter
run: yarn && yarn lint
working-directory: binding/nodejs
diff --git a/.github/workflows/nodejs-demos.yml b/.github/workflows/nodejs-demos.yml
index 89421029..44a3d2a2 100644
--- a/.github/workflows/nodejs-demos.yml
+++ b/.github/workflows/nodejs-demos.yml
@@ -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
@@ -39,9 +39,6 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- - name: Pre-build dependencies
- run: npm install yarn
-
- name: Install dependencies
run: yarn install
@@ -58,9 +55,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Pre-build dependencies
- run: npm install --global yarn
-
- name: Install dependencies
run: yarn install
diff --git a/.github/workflows/nodejs-perf.yml b/.github/workflows/nodejs-perf.yml
index 468fdf96..19010b65 100644
--- a/.github/workflows/nodejs-perf.yml
+++ b/.github/workflows/nodejs-perf.yml
@@ -32,14 +32,14 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
- init_performance_threshold_sec: 2.1
- proc_performance_threshold_sec: 0.5
+ init_performance_threshold_sec: 3.0
+ proc_performance_threshold_sec: 0.75
- os: windows-latest
- init_performance_threshold_sec: 2.5
+ init_performance_threshold_sec: 3.0
proc_performance_threshold_sec: 0.8
- os: macos-latest
- init_performance_threshold_sec: 2.3
- proc_performance_threshold_sec: 0.8
+ init_performance_threshold_sec: 3.5
+ proc_performance_threshold_sec: 4.0
steps:
- uses: actions/checkout@v3
@@ -49,9 +49,6 @@ jobs:
with:
node-version: lts/*
- - name: Pre-build dependencies
- run: npm install yarn
-
- name: Install dependencies
run: yarn install
@@ -67,27 +64,24 @@ jobs:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson]
include:
- machine: rpi3-32
- init_performance_threshold_sec: 7.5
- proc_performance_threshold_sec: 3.0
+ init_performance_threshold_sec: 9.0
+ proc_performance_threshold_sec: 8.5
- machine: rpi3-64
- init_performance_threshold_sec: 8.5
- proc_performance_threshold_sec: 3.0
+ init_performance_threshold_sec: 9.0
+ proc_performance_threshold_sec: 7.0
- machine: rpi4-32
- init_performance_threshold_sec: 5.7
- proc_performance_threshold_sec: 2.0
+ init_performance_threshold_sec: 6.2
+ proc_performance_threshold_sec: 4.0
- machine: rpi4-64
- init_performance_threshold_sec: 5.1
- proc_performance_threshold_sec: 1.9
+ init_performance_threshold_sec: 5.5
+ proc_performance_threshold_sec: 3.5
- machine: jetson
- init_performance_threshold_sec: 5.0
- proc_performance_threshold_sec: 2.0
+ init_performance_threshold_sec: 5.5
+ proc_performance_threshold_sec: 4.3
steps:
- uses: actions/checkout@v3
- - name: Pre-build dependencies
- run: npm install --global yarn
-
- name: Install dependencies
run: yarn install
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index 9b5a1f4a..8f4684c5 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -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
@@ -39,9 +39,6 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- - name: Pre-build dependencies
- run: npm install yarn
-
- name: Install dependencies
run: yarn install
@@ -58,9 +55,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Pre-build dependencies
- run: npm install --global yarn
-
- name: Install dependencies
run: yarn install
diff --git a/.github/workflows/python-codestyle.yml b/.github/workflows/python-codestyle.yml
index 09a056f6..56068ef0 100644
--- a/.github/workflows/python-codestyle.yml
+++ b/.github/workflows/python-codestyle.yml
@@ -3,12 +3,12 @@ name: Python Codestyle
on:
workflow_dispatch:
push:
- branches: [master]
+ branches: [ master ]
paths:
- 'binding/python/*.py'
- 'demo/python/*.py'
pull_request:
- branches: [master]
+ branches: [ master, 'v[0-9]+.[0-9]+' ]
paths:
- 'binding/python/*.py'
- 'demo/python/*.py'
diff --git a/.github/workflows/python-demos.yml b/.github/workflows/python-demos.yml
index a3969050..503f123e 100644
--- a/.github/workflows/python-demos.yml
+++ b/.github/workflows/python-demos.yml
@@ -3,13 +3,13 @@ name: Python Demos
on:
workflow_dispatch:
push:
- branches: [master]
+ branches: [ master ]
paths:
- '.github/workflows/python-demos.yml'
- 'demo/python/**'
- '!demo/python/README.md'
pull_request:
- branches: [master]
+ branches: [ master, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/python-demos.yml'
- 'demo/python/**'
diff --git a/.github/workflows/python-perf.yml b/.github/workflows/python-perf.yml
index 0013ef12..154bd74f 100644
--- a/.github/workflows/python-perf.yml
+++ b/.github/workflows/python-perf.yml
@@ -3,7 +3,7 @@ name: Python performance
on:
workflow_dispatch:
push:
- branches: [master]
+ branches: [ master ]
paths:
- '.github/workflows/python-perf.yml'
- 'binding/python/test_cheetah_perf.py'
@@ -14,7 +14,7 @@ on:
- 'lib/raspberry-pi/**'
- 'lib/windows/**'
pull_request:
- branches: [master]
+ branches: [ master, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/python-perf.yml'
- 'binding/python/test_cheetah_perf.py'
@@ -39,14 +39,14 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
- init_performance_threshold_sec: 2.1
- proc_performance_threshold_sec: 0.5
+ init_performance_threshold_sec: 4.0
+ proc_performance_threshold_sec: 0.8
- os: windows-latest
- init_performance_threshold_sec: 2.4
- proc_performance_threshold_sec: 0.6
+ init_performance_threshold_sec: 4.0
+ proc_performance_threshold_sec: 0.7
- os: macos-latest
- init_performance_threshold_sec: 3.0
- proc_performance_threshold_sec: 0.8
+ init_performance_threshold_sec: 4.5
+ proc_performance_threshold_sec: 2.5
steps:
- uses: actions/checkout@v3
@@ -74,20 +74,20 @@ jobs:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson]
include:
- machine: rpi3-32
- init_performance_threshold_sec: 7.5
- proc_performance_threshold_sec: 3.6
+ init_performance_threshold_sec: 9.0
+ proc_performance_threshold_sec: 9.0
- machine: rpi3-64
- init_performance_threshold_sec: 8.3
- proc_performance_threshold_sec: 3.5
+ init_performance_threshold_sec: 9.0
+ proc_performance_threshold_sec: 7.5
- machine: rpi4-32
- init_performance_threshold_sec: 5.7
- proc_performance_threshold_sec: 2.0
+ init_performance_threshold_sec: 7.5
+ proc_performance_threshold_sec: 4.0
- machine: rpi4-64
- init_performance_threshold_sec: 5.1
- proc_performance_threshold_sec: 1.9
+ init_performance_threshold_sec: 7.5
+ proc_performance_threshold_sec: 4.0
- machine: jetson
- init_performance_threshold_sec: 5.2
- proc_performance_threshold_sec: 1.9
+ init_performance_threshold_sec: 7.5
+ proc_performance_threshold_sec: 4.0
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index 5bc8fcbc..b9742bc2 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -3,7 +3,7 @@ name: Python
on:
workflow_dispatch:
push:
- branches: [master]
+ branches: [ master ]
paths:
- '.github/workflows/python.yml'
- 'binding/python/**'
@@ -15,7 +15,7 @@ on:
- 'lib/raspberry-pi/**'
- 'lib/windows/**'
pull_request:
- branches: [master]
+ branches: [ master, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/python.yml'
- 'binding/python/**'
diff --git a/.github/workflows/react-codestyle.yml b/.github/workflows/react-codestyle.yml
index e877f1d9..737996ed 100644
--- a/.github/workflows/react-codestyle.yml
+++ b/.github/workflows/react-codestyle.yml
@@ -31,6 +31,14 @@ jobs:
with:
node-version: lts/*
+ - name: Build Local Web SDK
+ run: yarn && yarn copywasm && yarn build
+ working-directory: binding/web
+
+ - name: Build Local React SDK
+ run: yarn && yarn build
+ working-directory: binding/react
+
- name: Pre-build dependencies
run: npm install yarn
diff --git a/.github/workflows/react-demos.yml b/.github/workflows/react-demos.yml
index 6dfc22b7..770f5fd3 100644
--- a/.github/workflows/react-demos.yml
+++ b/.github/workflows/react-demos.yml
@@ -38,6 +38,14 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn
+ - name: Build Local Web SDK
+ run: yarn && yarn copywasm && yarn build
+ working-directory: binding/web
+
+ - name: Build Local React SDK
+ run: yarn && yarn build
+ working-directory: binding/react
+
- name: Install dependencies
run: yarn install
diff --git a/.github/workflows/react-native-tests.yml b/.github/workflows/react-native-tests.yml
index 88606396..65e2612d 100644
--- a/.github/workflows/react-native-tests.yml
+++ b/.github/workflows/react-native-tests.yml
@@ -6,8 +6,6 @@ on:
paths:
- 'binding/react-native/**'
- 'lib/common/**'
- - 'lib/android/**'
- - 'lib/ios/**'
- '.github/workflows/react-native-tests.yml'
- 'resources/audio_samples/**'
pull_request:
@@ -15,8 +13,6 @@ on:
paths:
- 'binding/react-native/**'
- 'lib/common/**'
- - 'lib/android/**'
- - 'lib/ios/**'
- '.github/workflows/react-native-tests.yml'
- 'resources/audio_samples/**'
@@ -63,7 +59,7 @@ jobs:
./copy_test_resources.sh
- name: Cocoapods install
working-directory: binding/react-native/test-app/CheetahTestApp/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
diff --git a/.github/workflows/react-native.yml b/.github/workflows/react-native.yml
index 3fc646f8..71d4b59d 100644
--- a/.github/workflows/react-native.yml
+++ b/.github/workflows/react-native.yml
@@ -8,8 +8,6 @@ on:
- 'binding/react-native/**'
- '!binding/react-native/README.md'
- 'lib/common/**'
- - 'lib/android/**'
- - 'lib/ios/**'
- '.github/workflows/react-native.yml'
pull_request:
branches: [ master, 'v[0-9]+.[0-9]+' ]
@@ -17,8 +15,6 @@ on:
- 'binding/react-native/**'
- '!binding/react-native/README.md'
- 'lib/common/**'
- - 'lib/android/**'
- - 'lib/ios/**'
- '.github/workflows/react-native.yml'
defaults:
@@ -31,7 +27,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
@@ -48,4 +44,4 @@ jobs:
run: yarn install
- name: Build
- run: yarn
+ run: yarn prepare
diff --git a/.github/workflows/react.yml b/.github/workflows/react.yml
index d2922627..cb25b231 100644
--- a/.github/workflows/react.yml
+++ b/.github/workflows/react.yml
@@ -44,6 +44,10 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn
+ - name: Build Local Web SDK
+ run: yarn && yarn copywasm && yarn build
+ working-directory: binding/web
+
- name: Install dependencies
run: yarn install
diff --git a/.github/workflows/web-demos.yml b/.github/workflows/web-demos.yml
index 0595b6b8..7b09159c 100644
--- a/.github/workflows/web-demos.yml
+++ b/.github/workflows/web-demos.yml
@@ -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
diff --git a/.github/workflows/web-perf.yml b/.github/workflows/web-perf.yml
index 0aa782d2..7a5e2da8 100644
--- a/.github/workflows/web-perf.yml
+++ b/.github/workflows/web-perf.yml
@@ -28,8 +28,8 @@ jobs:
node-version: [lts/*]
include:
- node-version: lts/*
- initPerformanceThresholdSec: 4.5
- procPerformanceThresholdSec: 0.45
+ initPerformanceThresholdSec: 6.5
+ procPerformanceThresholdSec: 0.65
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml
index a2920820..04e14e3e 100644
--- a/.github/workflows/web.yml
+++ b/.github/workflows/web.yml
@@ -27,7 +27,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
diff --git a/README.md b/README.md
index f01d65b1..b0c3825e 100644
--- a/README.md
+++ b/README.md
@@ -160,7 +160,7 @@ For more information about Go demos go to [demo/go](./demo/go).
### React Native Demo
-To run the React Native Porcupine demo app you will first need to set up your React Native environment. For this,
+To run the React Native Cheetah demo app you will first need to set up your React Native environment. For this,
please refer to [React Native's documentation](https://reactnative.dev/docs/environment-setup). Once your environment has
been set up, navigate to [demo/react-native](./demo/react-native) to run the following commands:
diff --git a/binding/android/Cheetah/cheetah/build.gradle b/binding/android/Cheetah/cheetah/build.gradle
index 410aab2d..253acca1 100644
--- a/binding/android/Cheetah/cheetah/build.gradle
+++ b/binding/android/Cheetah/cheetah/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ai.picovoice'
- PUBLISH_VERSION = '1.1.2'
+ PUBLISH_VERSION = '2.0.0'
PUBLISH_ARTIFACT_ID = 'cheetah-android'
}
@@ -38,7 +38,7 @@ dependencies {
}
task copyLibs(type: Copy) {
- from("${rootDir}/../../lib/android")
+ from("${rootDir}/../../../lib/android")
into("${rootDir}/cheetah/src/main/jniLibs")
}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/Cheetah.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/Cheetah.java
index 05794f7b..08f1ef06 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/Cheetah.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/Cheetah.java
@@ -25,12 +25,18 @@
*/
public class Cheetah {
+ private static String _sdk = "android";
+
static {
System.loadLibrary("pv_cheetah");
}
private long handle;
+ public static void setSdk(String sdk) {
+ Cheetah._sdk = sdk;
+ }
+
/**
* Constructor.
*
@@ -48,6 +54,8 @@ private Cheetah(
String modelPath,
float endpointDuration,
boolean enableAutomaticPunctuation) throws CheetahException {
+ CheetahNative.setSdk(Cheetah._sdk);
+
handle = CheetahNative.init(
accessKey,
modelPath,
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/CheetahNative.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/CheetahNative.java
index b7d142fa..4f50f809 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/CheetahNative.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/CheetahNative.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.
@@ -14,11 +14,13 @@
class CheetahNative {
+ static native String getVersion();
+
static native int getFrameLength();
static native int getSampleRate();
- static native String getVersion();
+ static native void setSdk(String sdk) throws CheetahException;
static native long init(
String accessKey,
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/CheetahTranscript.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/CheetahTranscript.java
index 32c2061f..6c2880cf 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/CheetahTranscript.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/CheetahTranscript.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationException.java
index 7a12e1fe..71f11c09 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahActivationException(Throwable cause) {
public CheetahActivationException(String message) {
super(message);
}
-}
+ public CheetahActivationException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationLimitException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationLimitException.java
index b365b5ac..63a06c9a 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationLimitException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationLimitException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahActivationLimitException(Throwable cause) {
public CheetahActivationLimitException(String message) {
super(message);
}
-}
+ public CheetahActivationLimitException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationRefusedException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationRefusedException.java
index 6ee72ad9..9a2b7673 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationRefusedException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationRefusedException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahActivationRefusedException(Throwable cause) {
public CheetahActivationRefusedException(String message) {
super(message);
}
-}
+ public CheetahActivationRefusedException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationThrottledException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationThrottledException.java
index f3688d6d..9d597d2c 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationThrottledException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahActivationThrottledException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahActivationThrottledException(Throwable cause) {
public CheetahActivationThrottledException(String message) {
super(message);
}
-}
+ public CheetahActivationThrottledException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahException.java
index e712eefa..f527eba8 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -11,12 +13,42 @@
package ai.picovoice.cheetah;
public class CheetahException extends Exception {
+ private final String message;
+ private final String[] messageStack;
+
public CheetahException(Throwable cause) {
super(cause);
+ this.message = cause.getMessage();
+ this.messageStack = null;
}
public CheetahException(String message) {
super(message);
+ this.message = message;
+ this.messageStack = null;
}
-}
+ public CheetahException(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]));
+ }
+ }
+ }
+ return sb.toString();
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahIOException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahIOException.java
index 1b1473f0..853569ed 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahIOException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahIOException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahIOException(Throwable cause) {
public CheetahIOException(String message) {
super(message);
}
-}
+ public CheetahIOException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahInvalidArgumentException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahInvalidArgumentException.java
index 4583773a..49bf69cd 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahInvalidArgumentException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahInvalidArgumentException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahInvalidArgumentException(Throwable cause) {
public CheetahInvalidArgumentException(String message) {
super(message);
}
-}
+ public CheetahInvalidArgumentException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahInvalidStateException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahInvalidStateException.java
index 2c6c1129..b27ac39f 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahInvalidStateException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahInvalidStateException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahInvalidStateException(Throwable cause) {
public CheetahInvalidStateException(String message) {
super(message);
}
-}
+ public CheetahInvalidStateException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahKeyException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahKeyException.java
index 744537f0..d4bebf11 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahKeyException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahKeyException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahKeyException(Throwable cause) {
public CheetahKeyException(String message) {
super(message);
}
-}
+ public CheetahKeyException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahMemoryException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahMemoryException.java
index e7026aaf..d6b55af9 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahMemoryException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahMemoryException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahMemoryException(Throwable cause) {
public CheetahMemoryException(String message) {
super(message);
}
-}
+ public CheetahMemoryException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahRuntimeException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahRuntimeException.java
index 4b49ba0f..b13c9d0c 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahRuntimeException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahRuntimeException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahRuntimeException(Throwable cause) {
public CheetahRuntimeException(String message) {
super(message);
}
-}
+ public CheetahRuntimeException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahStopIterationException.java b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahStopIterationException.java
index 529ae915..9f3326ff 100644
--- a/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahStopIterationException.java
+++ b/binding/android/Cheetah/cheetah/src/main/java/ai/picovoice/cheetah/exception/CheetahStopIterationException.java
@@ -1,7 +1,9 @@
/*
- 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.
+
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing permissions and
@@ -18,5 +20,8 @@ public CheetahStopIterationException(Throwable cause) {
public CheetahStopIterationException(String message) {
super(message);
}
-}
+ public CheetahStopIterationException(String message, String[] messageStack) {
+ super(message, messageStack);
+ }
+}
diff --git a/binding/android/CheetahTestApp/cheetah-test-app/build.gradle b/binding/android/CheetahTestApp/cheetah-test-app/build.gradle
index 356f4006..93995241 100644
--- a/binding/android/CheetahTestApp/cheetah-test-app/build.gradle
+++ b/binding/android/CheetahTestApp/cheetah-test-app/build.gradle
@@ -116,7 +116,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
- implementation 'ai.picovoice:cheetah-android:1.1.2'
+ implementation 'ai.picovoice:cheetah-android:2.0.0'
// Espresso UI Testing
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
diff --git a/binding/android/CheetahTestApp/cheetah-test-app/src/androidTest/java/ai/picovoice/cheetah/testapp/CheetahTest.java b/binding/android/CheetahTestApp/cheetah-test-app/src/androidTest/java/ai/picovoice/cheetah/testapp/CheetahTest.java
index 69e95ca5..349ec73f 100644
--- a/binding/android/CheetahTestApp/cheetah-test-app/src/androidTest/java/ai/picovoice/cheetah/testapp/CheetahTest.java
+++ b/binding/android/CheetahTestApp/cheetah-test-app/src/androidTest/java/ai/picovoice/cheetah/testapp/CheetahTest.java
@@ -101,4 +101,31 @@ public void getSampleRate() throws CheetahException {
assertTrue(sampleRate > 0);
}
+
+ @Test
+ public void testErrorStack() {
+ String[] error = {};
+ try {
+ new Cheetah.Builder()
+ .setAccessKey("invalid")
+ .setModelPath(defaultModelPath)
+ .build(appContext);
+ } catch (CheetahException e) {
+ error = e.getMessageStack();
+ }
+
+ assertTrue(0 < error.length);
+ assertTrue(error.length <= 8);
+
+ try {
+ new Cheetah.Builder()
+ .setAccessKey("invalid")
+ .setModelPath(defaultModelPath)
+ .build(appContext);
+ } catch (CheetahException e) {
+ for (int i = 0; i < error.length; i++) {
+ assertEquals(e.getMessageStack()[i], error[i]);
+ }
+ }
+ }
}
diff --git a/binding/dotnet/Cheetah/Cheetah.cs b/binding/dotnet/Cheetah/Cheetah.cs
index 5e2efe43..a994e9e1 100644
--- a/binding/dotnet/Cheetah/Cheetah.cs
+++ b/binding/dotnet/Cheetah/Cheetah.cs
@@ -19,7 +19,7 @@ namespace Pv
///
/// Status codes returned by Cheetah library
///
- public enum PvStatus
+ public enum CheetahStatus
{
SUCCESS = 0,
OUT_OF_MEMORY = 1,
@@ -69,7 +69,7 @@ private static IntPtr ImportResolver(string libraryName, Assembly assembly, DllI
#endif
[DllImport(LIBRARY, CallingConvention = CallingConvention.Cdecl)]
- private static extern PvStatus pv_cheetah_init(
+ private static extern CheetahStatus pv_cheetah_init(
IntPtr accessKey,
IntPtr modelPath,
float endpointDurationSec,
@@ -83,17 +83,20 @@ private static extern PvStatus pv_cheetah_init(
private static extern void pv_cheetah_delete(IntPtr handle);
[DllImport(LIBRARY, CallingConvention = CallingConvention.Cdecl)]
- private static extern PvStatus pv_cheetah_process(
+ private static extern CheetahStatus pv_cheetah_process(
IntPtr handle,
Int16[] pcm,
out IntPtr transcriptPtr,
out bool isEndpoint);
[DllImport(LIBRARY, CallingConvention = CallingConvention.Cdecl)]
- private static extern PvStatus pv_cheetah_flush(
+ private static extern CheetahStatus pv_cheetah_flush(
IntPtr handle,
out IntPtr transcriptPtr);
+ [DllImport(LIBRARY, CallingConvention = CallingConvention.Cdecl)]
+ private static extern void pv_cheetah_transcript_delete(IntPtr transcriptPtr);
+
[DllImport(LIBRARY, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr pv_cheetah_version();
@@ -101,7 +104,14 @@ private static extern PvStatus pv_cheetah_flush(
private static extern Int32 pv_cheetah_frame_length();
[DllImport(LIBRARY, CallingConvention = CallingConvention.Cdecl)]
- private static extern void pv_free(IntPtr memoryPtr);
+
+ private static extern void pv_set_sdk(string sdk);
+
+ [DllImport(LIBRARY, CallingConvention = CallingConvention.Cdecl)]
+ private static extern CheetahStatus pv_get_error_stack(out IntPtr messageStack, out int messageStackDepth);
+
+ [DllImport(LIBRARY, CallingConvention = CallingConvention.Cdecl)]
+ private static extern void pv_free_error_stack(IntPtr messageStack);
///
/// Factory method for Cheetah Speech-to-Text engine.
@@ -163,7 +173,9 @@ private Cheetah(
IntPtr accessKeyPtr = Utils.GetPtrFromUtf8String(accessKey);
IntPtr modelPathPtr = Utils.GetPtrFromUtf8String(modelPath);
- PvStatus status = pv_cheetah_init(
+ pv_set_sdk("dotnet");
+
+ CheetahStatus status = pv_cheetah_init(
accessKeyPtr,
modelPathPtr,
endpointDurationSec,
@@ -173,9 +185,10 @@ private Cheetah(
Marshal.FreeHGlobal(accessKeyPtr);
Marshal.FreeHGlobal(modelPathPtr);
- if (status != PvStatus.SUCCESS)
+ if (status != CheetahStatus.SUCCESS)
{
- throw PvStatusToException(status);
+ string[] messageStack = GetMessageStack();
+ throw CheetahStatusToException(status, "Cheetah init failed", messageStack);
}
Version = Utils.GetUtf8StringFromPtr(pv_cheetah_version());
@@ -208,14 +221,16 @@ public CheetahTranscript Process(Int16[] pcm)
IntPtr transcriptPtr = IntPtr.Zero;
bool isEndpoint = false;
- PvStatus status = pv_cheetah_process(_libraryPointer, pcm, out transcriptPtr, out isEndpoint);
- if (status != PvStatus.SUCCESS)
+ CheetahStatus status = pv_cheetah_process(_libraryPointer, pcm, out transcriptPtr, out isEndpoint);
+ if (status != CheetahStatus.SUCCESS)
{
- throw PvStatusToException(status, "Cheetah failed to process the audio frame.");
+ string[] messageStack = GetMessageStack();
+ throw CheetahStatusToException(status, "Cheetah failed to process the audio frame.", messageStack);
}
string transcript = Utils.GetUtf8StringFromPtr(transcriptPtr);
- pv_free(transcriptPtr);
+ pv_cheetah_transcript_delete(transcriptPtr);
+
return new CheetahTranscript(transcript, isEndpoint);
}
@@ -228,14 +243,16 @@ public CheetahTranscript Process(Int16[] pcm)
public CheetahTranscript Flush()
{
IntPtr transcriptPtr = IntPtr.Zero;
- PvStatus status = pv_cheetah_flush(_libraryPointer, out transcriptPtr);
- if (status != PvStatus.SUCCESS)
+ CheetahStatus status = pv_cheetah_flush(_libraryPointer, out transcriptPtr);
+ if (status != CheetahStatus.SUCCESS)
{
- throw PvStatusToException(status, "Cheetah failed to process the audio frame.");
+ string[] messageStack = GetMessageStack();
+ throw CheetahStatusToException(status, "Cheetah failed to flush.", messageStack);
}
string transcript = Utils.GetUtf8StringFromPtr(transcriptPtr);
- pv_free(transcriptPtr);
+ pv_cheetah_transcript_delete(transcriptPtr);
+
return new CheetahTranscript(transcript, false);
}
@@ -261,35 +278,45 @@ public CheetahTranscript Flush()
/// Coverts status codes to relevant .NET exceptions
///
/// Picovoice library status code.
+ /// Default error message.
+ /// Error stack returned from Picovoice library.
/// .NET exception
- private static Exception PvStatusToException(PvStatus status, string message = "")
+ private static Exception CheetahStatusToException(
+ CheetahStatus status,
+ string message = "",
+ string[] messageStack = null)
{
+ if (messageStack == null)
+ {
+ messageStack = new string[] { };
+ }
+
switch (status)
{
- case PvStatus.OUT_OF_MEMORY:
- return new CheetahMemoryException(message);
- case PvStatus.IO_ERROR:
- return new CheetahIOException(message);
- case PvStatus.INVALID_ARGUMENT:
- return new CheetahInvalidArgumentException(message);
- case PvStatus.STOP_ITERATION:
- return new CheetahStopIterationException(message);
- case PvStatus.KEY_ERROR:
- return new CheetahKeyException(message);
- case PvStatus.INVALID_STATE:
- return new CheetahInvalidStateException(message);
- case PvStatus.RUNTIME_ERROR:
- return new CheetahRuntimeException(message);
- case PvStatus.ACTIVATION_ERROR:
- return new CheetahActivationException(message);
- case PvStatus.ACTIVATION_LIMIT_REACHED:
- return new CheetahActivationLimitException(message);
- case PvStatus.ACTIVATION_THROTTLED:
- return new CheetahActivationThrottledException(message);
- case PvStatus.ACTIVATION_REFUSED:
- return new CheetahActivationRefusedException(message);
+ case CheetahStatus.OUT_OF_MEMORY:
+ return new CheetahMemoryException(message, messageStack);
+ case CheetahStatus.IO_ERROR:
+ return new CheetahIOException(message, messageStack);
+ case CheetahStatus.INVALID_ARGUMENT:
+ return new CheetahInvalidArgumentException(message, messageStack);
+ case CheetahStatus.STOP_ITERATION:
+ return new CheetahStopIterationException(message, messageStack);
+ case CheetahStatus.KEY_ERROR:
+ return new CheetahKeyException(message, messageStack);
+ case CheetahStatus.INVALID_STATE:
+ return new CheetahInvalidStateException(message, messageStack);
+ case CheetahStatus.RUNTIME_ERROR:
+ return new CheetahRuntimeException(message, messageStack);
+ case CheetahStatus.ACTIVATION_ERROR:
+ return new CheetahActivationException(message, messageStack);
+ case CheetahStatus.ACTIVATION_LIMIT_REACHED:
+ return new CheetahActivationLimitException(message, messageStack);
+ case CheetahStatus.ACTIVATION_THROTTLED:
+ return new CheetahActivationThrottledException(message, messageStack);
+ case CheetahStatus.ACTIVATION_REFUSED:
+ return new CheetahActivationRefusedException(message, messageStack);
default:
- return new CheetahException("Unmapped error code returned from Cheetah.");
+ return new CheetahException("Unmapped error code returned from Cheetah.", messageStack);
}
}
@@ -312,5 +339,29 @@ public void Dispose()
{
Dispose();
}
+
+ private string[] GetMessageStack()
+ {
+ int messageStackDepth;
+ IntPtr messageStackRef;
+
+ CheetahStatus status = pv_get_error_stack(out messageStackRef, out messageStackDepth);
+ if (status != CheetahStatus.SUCCESS)
+ {
+ throw CheetahStatusToException(status, "Unable to get Cheetah error state");
+ }
+
+ int elementSize = Marshal.SizeOf(typeof(IntPtr));
+ string[] messageStack = new string[messageStackDepth];
+
+ for (int i = 0; i < messageStackDepth; i++)
+ {
+ messageStack[i] = Marshal.PtrToStringAnsi(Marshal.ReadIntPtr(messageStackRef, i * elementSize));
+ }
+
+ pv_free_error_stack(messageStackRef);
+
+ return messageStack;
+ }
}
}
\ No newline at end of file
diff --git a/binding/dotnet/Cheetah/Cheetah.csproj b/binding/dotnet/Cheetah/Cheetah.csproj
index b61ca5de..b6b65ffc 100644
--- a/binding/dotnet/Cheetah/Cheetah.csproj
+++ b/binding/dotnet/Cheetah/Cheetah.csproj
@@ -1,7 +1,7 @@
net6.0;netcoreapp3.0;netstandard2.0
- 1.1.2
+ 2.0.0
Picovoice
Cheetah Speech-to-Text Engine
diff --git a/binding/dotnet/Cheetah/CheetahException.cs b/binding/dotnet/Cheetah/CheetahException.cs
index 534fc8b5..22508c3e 100644
--- a/binding/dotnet/Cheetah/CheetahException.cs
+++ b/binding/dotnet/Cheetah/CheetahException.cs
@@ -15,10 +15,36 @@ namespace Pv
{
public class CheetahException : Exception
{
+ private readonly string[] _messageStack;
+
public CheetahException() { }
public CheetahException(string message) : base(message) { }
+ public CheetahException(string message, string[] messageStack) : base(ModifyMessages(message, messageStack))
+ {
+ this._messageStack = messageStack;
+ }
+
+ public string[] MessageStack
+ {
+ get => _messageStack;
+ }
+
+ private static string ModifyMessages(string message, string[] messageStack)
+ {
+ string messageString = message;
+ if (messageStack.Length > 0)
+ {
+ messageString += ":";
+ for (int i = 0; i < messageStack.Length; i++)
+ {
+ messageString += $"\n [{i}] {messageStack[i]}";
+ }
+ }
+ return messageString;
+ }
+
}
public class CheetahMemoryException : CheetahException
@@ -26,6 +52,8 @@ public class CheetahMemoryException : CheetahException
public CheetahMemoryException() { }
public CheetahMemoryException(string message) : base(message) { }
+
+ public CheetahMemoryException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahIOException : CheetahException
@@ -33,6 +61,8 @@ public class CheetahIOException : CheetahException
public CheetahIOException() { }
public CheetahIOException(string message) : base(message) { }
+
+ public CheetahIOException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahInvalidArgumentException : CheetahException
@@ -40,6 +70,8 @@ public class CheetahInvalidArgumentException : CheetahException
public CheetahInvalidArgumentException() { }
public CheetahInvalidArgumentException(string message) : base(message) { }
+
+ public CheetahInvalidArgumentException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahStopIterationException : CheetahException
@@ -47,6 +79,8 @@ public class CheetahStopIterationException : CheetahException
public CheetahStopIterationException() { }
public CheetahStopIterationException(string message) : base(message) { }
+
+ public CheetahStopIterationException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahKeyException : CheetahException
@@ -54,6 +88,8 @@ public class CheetahKeyException : CheetahException
public CheetahKeyException() { }
public CheetahKeyException(string message) : base(message) { }
+
+ public CheetahKeyException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahInvalidStateException : CheetahException
@@ -61,6 +97,8 @@ public class CheetahInvalidStateException : CheetahException
public CheetahInvalidStateException() { }
public CheetahInvalidStateException(string message) : base(message) { }
+
+ public CheetahInvalidStateException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahRuntimeException : CheetahException
@@ -68,6 +106,8 @@ public class CheetahRuntimeException : CheetahException
public CheetahRuntimeException() { }
public CheetahRuntimeException(string message) : base(message) { }
+
+ public CheetahRuntimeException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahActivationException : CheetahException
@@ -75,6 +115,8 @@ public class CheetahActivationException : CheetahException
public CheetahActivationException() { }
public CheetahActivationException(string message) : base(message) { }
+
+ public CheetahActivationException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahActivationLimitException : CheetahException
@@ -82,6 +124,8 @@ public class CheetahActivationLimitException : CheetahException
public CheetahActivationLimitException() { }
public CheetahActivationLimitException(string message) : base(message) { }
+
+ public CheetahActivationLimitException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahActivationThrottledException : CheetahException
@@ -89,6 +133,8 @@ public class CheetahActivationThrottledException : CheetahException
public CheetahActivationThrottledException() { }
public CheetahActivationThrottledException(string message) : base(message) { }
+
+ public CheetahActivationThrottledException(string message, string[] messageStack) : base(message, messageStack) { }
}
public class CheetahActivationRefusedException : CheetahException
@@ -96,6 +142,8 @@ public class CheetahActivationRefusedException : CheetahException
public CheetahActivationRefusedException() { }
public CheetahActivationRefusedException(string message) : base(message) { }
+
+ public CheetahActivationRefusedException(string message, string[] messageStack) : base(message, messageStack) { }
}
}
\ No newline at end of file
diff --git a/binding/dotnet/CheetahTest/CheetahTest.csproj b/binding/dotnet/CheetahTest/CheetahTest.csproj
index 40aa4d34..10b485e1 100644
--- a/binding/dotnet/CheetahTest/CheetahTest.csproj
+++ b/binding/dotnet/CheetahTest/CheetahTest.csproj
@@ -6,6 +6,7 @@
+
diff --git a/binding/dotnet/CheetahTest/MainTest.cs b/binding/dotnet/CheetahTest/MainTest.cs
index bf8e8c19..081218f6 100644
--- a/binding/dotnet/CheetahTest/MainTest.cs
+++ b/binding/dotnet/CheetahTest/MainTest.cs
@@ -12,6 +12,9 @@ specific language governing permissions and limitations under the License.
using System;
using System.Collections.Generic;
using System.IO;
+using System.Reflection;
+
+using Fastenshtein;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -44,6 +47,31 @@ private List GetPcmFromFile(string audioFilePath, int expectedSampleRate)
return data;
}
+ public static IEnumerable
diff --git a/demo/flutter/android/app/build.gradle b/demo/flutter/android/app/build.gradle
index 7aaa4411..bf4baa26 100644
--- a/demo/flutter/android/app/build.gradle
+++ b/demo/flutter/android/app/build.gradle
@@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 31
+ compileSdkVersion 33
lintOptions {
disable 'InvalidPackage'
@@ -35,7 +35,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "ai.picovoice.flutter.cheetahdemo"
minSdkVersion 21
- targetSdkVersion 31
+ targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
diff --git a/demo/flutter/ios/Podfile b/demo/flutter/ios/Podfile
index 313ea4a1..8324249c 100644
--- a/demo/flutter/ios/Podfile
+++ b/demo/flutter/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-platform :ios, '11.0'
+platform :ios, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -28,6 +28,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup
target 'Runner' do
+ pod 'Cheetah-iOS', '~> 2.0.0'
use_frameworks!
use_modular_headers!
diff --git a/demo/flutter/ios/Podfile.lock b/demo/flutter/ios/Podfile.lock
index edc294e0..3cf87094 100644
--- a/demo/flutter/ios/Podfile.lock
+++ b/demo/flutter/ios/Podfile.lock
@@ -1,7 +1,7 @@
PODS:
- - Cheetah-iOS (1.1.0)
- - cheetah_flutter (1.1.1):
- - Cheetah-iOS (~> 1.1.0)
+ - Cheetah-iOS (2.0.0)
+ - cheetah_flutter (2.0.0):
+ - Cheetah-iOS (~> 2.0.0)
- Flutter
- Flutter (1.0.0)
- flutter_voice_processor (1.1.0):
@@ -14,6 +14,7 @@ PODS:
- Flutter
DEPENDENCIES:
+ - Cheetah-iOS (~> 2.0.0)
- cheetah_flutter (from `.symlinks/plugins/cheetah_flutter/ios`)
- Flutter (from `Flutter`)
- flutter_voice_processor (from `.symlinks/plugins/flutter_voice_processor/ios`)
@@ -38,14 +39,14 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_ios/ios"
SPEC CHECKSUMS:
- Cheetah-iOS: 6fb7be693878f5b1dec0ea5b6534fbba30954afc
- cheetah_flutter: 1733299241a5babdc9ed3d0f3fdd4c14991e30cf
- Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
+ Cheetah-iOS: d98a5edcbf3b74dda6027aeac6a8c0f5997a47a2
+ cheetah_flutter: 3f7be021953be4901655a0f4d9741bf8ac5f3413
+ Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_voice_processor: 53afbf59ad3feb82f4a379fea9ed8dc98495210f
- integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
+ integration_test: 13825b8a9334a850581300559b8839134b124670
ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1
path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5
-PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
+PODFILE CHECKSUM: fa538244b9317538f8f97c51ffbb5162f461f06e
COCOAPODS: 1.11.3
diff --git a/demo/flutter/ios/Runner.xcodeproj/project.pbxproj b/demo/flutter/ios/Runner.xcodeproj/project.pbxproj
index c9ca4ee8..c39069fa 100644
--- a/demo/flutter/ios/Runner.xcodeproj/project.pbxproj
+++ b/demo/flutter/ios/Runner.xcodeproj/project.pbxproj
@@ -339,7 +339,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
STRIP_STYLE = "non-global";
@@ -429,7 +429,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -479,7 +479,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
STRIP_STYLE = "non-global";
diff --git a/demo/flutter/lib/main.dart b/demo/flutter/lib/main.dart
index 4c6b25bd..2b49b2a3 100644
--- a/demo/flutter/lib/main.dart
+++ b/demo/flutter/lib/main.dart
@@ -61,9 +61,6 @@ class _MyAppState extends State {
try {
_cheetahManager = await CheetahManager.create(
accessKey, modelPath, transcriptCallback, errorCallback);
- } on CheetahInvalidArgumentException catch (ex) {
- errorCallback(CheetahInvalidArgumentException(
- "${ex.message}\nEnsure your accessKey '$accessKey' is a valid access key."));
} on CheetahActivationException {
errorCallback(CheetahActivationException("AccessKey activation error."));
} on CheetahActivationLimitException {
diff --git a/demo/flutter/pubspec.lock b/demo/flutter/pubspec.lock
index 3fe8db24..13361a81 100644
--- a/demo/flutter/pubspec.lock
+++ b/demo/flutter/pubspec.lock
@@ -1,90 +1,78 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
- archive:
- dependency: transitive
- description:
- name: archive
- url: "https://pub.dartlang.org"
- source: hosted
- version: "3.1.11"
async:
dependency: transitive
description:
name: async
- url: "https://pub.dartlang.org"
+ sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+ url: "https://pub.dev"
source: hosted
- version: "2.8.2"
+ version: "2.11.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
- url: "https://pub.dartlang.org"
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.2.0"
- charcode:
- dependency: transitive
- description:
- name: charcode
- url: "https://pub.dartlang.org"
+ sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+ url: "https://pub.dev"
source: hosted
- version: "1.3.1"
+ version: "1.3.0"
cheetah_flutter:
dependency: "direct main"
description:
name: cheetah_flutter
- url: "https://pub.dartlang.org"
+ sha256: c1283f35cc175f589b5e77dec23e8f6f85477e26bf7b194b7d468387a20ddb3f
+ url: "https://pub.dev"
source: hosted
- version: "1.1.1"
+ version: "2.0.0"
clock:
dependency: transitive
description:
name: clock
- url: "https://pub.dartlang.org"
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.16.0"
- crypto:
- dependency: transitive
- description:
- name: crypto
- url: "https://pub.dartlang.org"
+ sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
+ url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "1.17.1"
fake_async:
dependency: transitive
description:
name: fake_async
- url: "https://pub.dartlang.org"
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ url: "https://pub.dev"
source: hosted
- version: "1.3.0"
+ version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
- url: "https://pub.dartlang.org"
+ sha256: "35d0f481d939de0d640b3db9a7aa36a52cd22054a798a73b4f50bdad5ce12678"
+ url: "https://pub.dev"
source: hosted
version: "1.1.2"
file:
dependency: transitive
description:
name: file
- url: "https://pub.dartlang.org"
+ sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
+ url: "https://pub.dev"
source: hosted
- version: "6.1.2"
+ version: "6.1.4"
flutter:
dependency: "direct main"
description: flutter
@@ -104,7 +92,8 @@ packages:
dependency: "direct main"
description:
name: flutter_voice_processor
- url: "https://pub.dartlang.org"
+ sha256: fb511a2f0ca9540c4b7c6715515389d27b5bbd332138ab3a300078fb243a0caf
+ url: "https://pub.dev"
source: hosted
version: "1.1.0"
fuchsia_remote_debug_protocol:
@@ -117,109 +106,132 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.7"
lints:
dependency: "direct dev"
description:
name: lints
- url: "https://pub.dartlang.org"
+ sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
+ url: "https://pub.dev"
source: hosted
version: "1.0.1"
matcher:
dependency: transitive
description:
name: matcher
- url: "https://pub.dartlang.org"
+ sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+ url: "https://pub.dev"
source: hosted
- version: "0.12.11"
+ version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- url: "https://pub.dartlang.org"
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ url: "https://pub.dev"
source: hosted
- version: "0.1.4"
+ version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
- url: "https://pub.dartlang.org"
+ sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
+ url: "https://pub.dev"
source: hosted
- version: "1.7.0"
+ version: "1.9.1"
path:
dependency: transitive
description:
name: path
- url: "https://pub.dartlang.org"
+ sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
+ url: "https://pub.dev"
source: hosted
- version: "1.8.1"
+ version: "1.8.3"
path_provider:
dependency: transitive
description:
name: path_provider
- url: "https://pub.dartlang.org"
+ sha256: e92dee4d38a9044605cb3fb253e9b46eb9375dfcad4515d0379b44ac90797568
+ url: "https://pub.dev"
source: hosted
version: "2.0.9"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
- url: "https://pub.dartlang.org"
+ sha256: c69109bae02c6116bd8ac81319b13eb73dfae02ef74690d2a1a98c1ddd3aaefc
+ url: "https://pub.dev"
source: hosted
version: "2.0.11"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
- url: "https://pub.dartlang.org"
+ sha256: "038d0141ff5d08c60ed071eee2758b68c50c42a1c10066a1fb6c28ab32fac84c"
+ url: "https://pub.dev"
source: hosted
version: "2.0.7"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
- url: "https://pub.dartlang.org"
+ sha256: "1e109f4df28bd95eab71e323008b53d19c4d633bc1ab05b577518773474e9621"
+ url: "https://pub.dev"
source: hosted
version: "2.1.5"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
- url: "https://pub.dartlang.org"
+ sha256: "0adeb313e1f2c3fc52baeeee59b0fe9c2d1f7da56fd96a9234e1702ec653a453"
+ url: "https://pub.dev"
source: hosted
version: "2.0.5"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
- url: "https://pub.dartlang.org"
+ sha256: "3dc0d51b07f85fec3746d9f4e8d31c73bb173cafa2e763f03f8df2e8d1878882"
+ url: "https://pub.dev"
source: hosted
version: "2.0.3"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
- url: "https://pub.dartlang.org"
+ sha256: "366ad4e3541ea707f859e7148d4d5aba67d589d7936cee04a05c464a277eeb27"
+ url: "https://pub.dev"
source: hosted
version: "2.0.5"
platform:
dependency: transitive
description:
name: platform
- url: "https://pub.dartlang.org"
+ sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
+ url: "https://pub.dev"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
- url: "https://pub.dartlang.org"
+ sha256: "075f927ebbab4262ace8d0b283929ac5410c0ac4e7fc123c76429564facfb757"
+ url: "https://pub.dev"
source: hosted
version: "2.1.2"
process:
dependency: transitive
description:
name: process
- url: "https://pub.dartlang.org"
+ sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
+ url: "https://pub.dev"
source: hosted
version: "4.2.4"
sky_engine:
@@ -231,93 +243,98 @@ packages:
dependency: transitive
description:
name: source_span
- url: "https://pub.dartlang.org"
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ url: "https://pub.dev"
source: hosted
- version: "1.8.2"
+ version: "1.9.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
- url: "https://pub.dartlang.org"
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
source: hosted
- version: "1.10.0"
+ version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
- url: "https://pub.dartlang.org"
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
- url: "https://pub.dartlang.org"
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
source: hosted
- version: "1.1.0"
+ version: "1.2.0"
sync_http:
dependency: transitive
description:
name: sync_http
- url: "https://pub.dartlang.org"
+ sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961"
+ url: "https://pub.dev"
source: hosted
- version: "0.3.0"
+ version: "0.3.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
- url: "https://pub.dartlang.org"
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
- url: "https://pub.dartlang.org"
+ sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
+ url: "https://pub.dev"
source: hosted
- version: "0.4.9"
- typed_data:
- dependency: transitive
- description:
- name: typed_data
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.3.0"
+ version: "0.5.1"
vector_math:
dependency: transitive
description:
name: vector_math
- url: "https://pub.dartlang.org"
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.2"
+ version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
- url: "https://pub.dartlang.org"
+ sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe
+ url: "https://pub.dev"
source: hosted
- version: "8.2.2"
+ version: "11.3.0"
webdriver:
dependency: transitive
description:
name: webdriver
- url: "https://pub.dartlang.org"
+ sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49"
+ url: "https://pub.dev"
source: hosted
- version: "3.0.0"
+ version: "3.0.2"
win32:
dependency: transitive
description:
name: win32
- url: "https://pub.dartlang.org"
+ sha256: cde1e6d546d8cfd0b3c72bc6f29d980fa629d1cb107f38e2a039ca5d10d79e41
+ url: "https://pub.dev"
source: hosted
version: "2.4.1"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
- url: "https://pub.dartlang.org"
+ sha256: "060b6e1c891d956f72b5ac9463466c37cce3fa962a921532fc001e86fe93438e"
+ url: "https://pub.dev"
source: hosted
version: "0.2.0+1"
sdks:
- dart: ">=2.17.0-0 <3.0.0"
+ dart: ">=3.0.0-0 <4.0.0"
flutter: ">=2.8.1"
diff --git a/demo/flutter/pubspec.yaml b/demo/flutter/pubspec.yaml
index c698f346..b1d27705 100644
--- a/demo/flutter/pubspec.yaml
+++ b/demo/flutter/pubspec.yaml
@@ -3,7 +3,7 @@ description: Demonstrates how to use the cheetah plugin.
publish_to: 'none'
-version: 1.0.0
+version: 2.0.0
environment:
sdk: ">=2.14.0 <3.0.0"
@@ -14,7 +14,7 @@ dependencies:
sdk: flutter
flutter_voice_processor: ^1.1.0
- cheetah_flutter: ^1.1.1
+ cheetah_flutter: ^2.0.0
dev_dependencies:
integration_test:
diff --git a/demo/go/filedemo/cheetah_file_demo.go b/demo/go/filedemo/cheetah_file_demo.go
index 32b5be85..9710804b 100644
--- a/demo/go/filedemo/cheetah_file_demo.go
+++ b/demo/go/filedemo/cheetah_file_demo.go
@@ -1,4 +1,4 @@
-// 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.
@@ -17,7 +17,7 @@ import (
"os"
"path/filepath"
- cheetah "github.com/Picovoice/cheetah/binding/go"
+ cheetah "github.com/Picovoice/cheetah/binding/go/v2"
"github.com/go-audio/audio"
"github.com/go-audio/wav"
)
diff --git a/demo/go/go.mod b/demo/go/go.mod
index 79052e67..16a86cba 100644
--- a/demo/go/go.mod
+++ b/demo/go/go.mod
@@ -3,8 +3,9 @@ module cheetahdemo
go 1.16
require (
- github.com/Picovoice/cheetah/binding/go v1.1.3
+ github.com/Picovoice/cheetah/binding/go/v2 v2.0.0
github.com/Picovoice/pvrecorder/binding/go v1.2.1
+ github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/go-audio/audio v1.0.0
github.com/go-audio/wav v1.0.0
)
diff --git a/demo/go/go.sum b/demo/go/go.sum
index 648ceb59..571407f5 100644
--- a/demo/go/go.sum
+++ b/demo/go/go.sum
@@ -1,7 +1,11 @@
-github.com/Picovoice/cheetah/binding/go v1.1.3 h1:YmSguA8aLXbJUN6aWseejXXXg/FsiblIClUpg9Zlqgc=
-github.com/Picovoice/cheetah/binding/go v1.1.3/go.mod h1:+7UFRMp3uyXYt/wZ0bFCqifjue7p4O7A0+LP09FWN+o=
+github.com/Picovoice/cheetah/binding/go/v2 v2.0.0 h1:BiMaqxjeQetR0cF8rhX+gTq7kMMZroE7aBZVvfpx2Ns=
+github.com/Picovoice/cheetah/binding/go/v2 v2.0.0/go.mod h1:BKQPVuV+8xxEBLuCdwTxgj4bVsUTiuQg4YJ7oJt9uh4=
github.com/Picovoice/pvrecorder/binding/go v1.2.1 h1:p99fkYMFbTS4g4WwbhSPkT9PHvlEoVYGaNoqxCITiEo=
github.com/Picovoice/pvrecorder/binding/go v1.2.1/go.mod h1:gQdvBAjoKmRxMFh8W9cVKWcqHsWvu+d13sCPVFm7dhg=
+github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
+github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
+github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
+github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
github.com/go-audio/audio v1.0.0 h1:zS9vebldgbQqktK4H0lUqWrG8P0NxCJVqcj7ZpNnwd4=
github.com/go-audio/audio v1.0.0/go.mod h1:6uAu0+H2lHkwdGsAY+j2wHPNPpPoeg5AaEFh9FlA+Zs=
github.com/go-audio/riff v1.0.0 h1:d8iCGbDvox9BfLagY94fBynxSPHO80LmZCaOsmKxokA=
diff --git a/demo/go/micdemo/cheetah_mic_demo.go b/demo/go/micdemo/cheetah_mic_demo.go
index 9161ac93..450c8995 100644
--- a/demo/go/micdemo/cheetah_mic_demo.go
+++ b/demo/go/micdemo/cheetah_mic_demo.go
@@ -18,7 +18,7 @@ import (
"os/signal"
"path/filepath"
- cheetah "github.com/Picovoice/cheetah/binding/go"
+ cheetah "github.com/Picovoice/cheetah/binding/go/v2"
pvrecorder "github.com/Picovoice/pvrecorder/binding/go"
"github.com/go-audio/wav"
)
@@ -67,7 +67,6 @@ func main() {
if err != nil {
log.Fatal(err)
}
-
defer func() {
err := c.Delete()
diff --git a/demo/ios/CheetahDemo/CheetahDemo/ViewModel.swift b/demo/ios/CheetahDemo/CheetahDemo/ViewModel.swift
index 834a0784..85628e22 100644
--- a/demo/ios/CheetahDemo/CheetahDemo/ViewModel.swift
+++ b/demo/ios/CheetahDemo/CheetahDemo/ViewModel.swift
@@ -51,7 +51,7 @@ class ViewModel: ObservableObject {
state = UIState.READY
} catch let error as CheetahInvalidArgumentError {
- errorMessage = "\(error.localizedDescription)\nEnsure your AccessKey '\(ACCESS_KEY)' is valid."
+ errorMessage = "\(error.localizedDescription)"
} catch is CheetahActivationError {
errorMessage = "ACCESS_KEY activation error"
} catch is CheetahActivationRefusedError {
diff --git a/demo/ios/CheetahDemo/Podfile b/demo/ios/CheetahDemo/Podfile
index 07469de2..89c96448 100644
--- a/demo/ios/CheetahDemo/Podfile
+++ b/demo/ios/CheetahDemo/Podfile
@@ -1,7 +1,7 @@
source 'https://cdn.cocoapods.org/'
-platform :ios, '11.0'
+platform :ios, '13.0'
target 'CheetahDemo' do
- pod 'Cheetah-iOS', '~> 1.1.0'
+ pod 'Cheetah-iOS', '~> 2.0.0'
pod 'ios-voice-processor', '~> 1.1.0'
end
diff --git a/demo/ios/CheetahDemo/Podfile.lock b/demo/ios/CheetahDemo/Podfile.lock
index 56786c9e..5650d028 100644
--- a/demo/ios/CheetahDemo/Podfile.lock
+++ b/demo/ios/CheetahDemo/Podfile.lock
@@ -1,9 +1,9 @@
PODS:
- - Cheetah-iOS (1.1.0)
+ - Cheetah-iOS (2.0.0)
- ios-voice-processor (1.1.0)
DEPENDENCIES:
- - Cheetah-iOS (~> 1.1.0)
+ - Cheetah-iOS (~> 2.0.0)
- ios-voice-processor (~> 1.1.0)
SPEC REPOS:
@@ -12,9 +12,9 @@ SPEC REPOS:
- ios-voice-processor
SPEC CHECKSUMS:
- Cheetah-iOS: 6fb7be693878f5b1dec0ea5b6534fbba30954afc
+ Cheetah-iOS: d98a5edcbf3b74dda6027aeac6a8c0f5997a47a2
ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1
-PODFILE CHECKSUM: 9b9aa7cee64517773071f86ed45a3b16f8ffddad
+PODFILE CHECKSUM: 26feb763b95a821d785ddd8a03bd5182cd65fdd2
COCOAPODS: 1.11.3
diff --git a/demo/java/build.gradle b/demo/java/build.gradle
index 3e19bfff..eabcaa8e 100644
--- a/demo/java/build.gradle
+++ b/demo/java/build.gradle
@@ -15,14 +15,14 @@ sourceSets {
}
dependencies {
- implementation 'ai.picovoice:cheetah-java:1.1.1'
+ implementation 'ai.picovoice:cheetah-java:2.0.0'
implementation 'commons-cli:commons-cli:1.4'
}
jar {
manifest {
attributes "Main-Class": "ai.picovoice.cheetahdemo.MicDemo",
- "Class-Path": "cheetah-1.1.1.jar;commons-cli-1.4.jar"
+ "Class-Path": "cheetah-2.0.0.jar;commons-cli-1.4.jar"
}
from sourceSets.main.output
exclude "**/FileDemo.class"
@@ -33,7 +33,7 @@ jar {
task fileDemoJar(type: Jar) {
manifest {
attributes "Main-Class": "ai.picovoice.cheetahdemo.FileDemo",
- "Class-Path": "cheetah-1.1.1.jar;commons-cli-1.4.jar"
+ "Class-Path": "cheetah-2.0.0.jar;commons-cli-1.4.jar"
}
from sourceSets.main.output
exclude "**/MicDemo.class"
diff --git a/demo/java/gradle/wrapper/gradle-wrapper.properties b/demo/java/gradle/wrapper/gradle-wrapper.properties
index d2880ba8..774fae87 100644
--- a/demo/java/gradle/wrapper/gradle-wrapper.properties
+++ b/demo/java/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/demo/nodejs/package.json b/demo/nodejs/package.json
index 733f6b73..d3eacb41 100644
--- a/demo/nodejs/package.json
+++ b/demo/nodejs/package.json
@@ -1,6 +1,6 @@
{
"name": "@picovoice/cheetah-node-demo",
- "version": "1.1.4",
+ "version": "2.0.0",
"description": "Picovoice Cheetah Node.js file-based and microphone demos",
"scripts": {
"file": "node file.js",
@@ -16,7 +16,7 @@
"author": "Picovoice Inc.",
"license": "Apache-2.0",
"dependencies": {
- "@picovoice/cheetah-node": "^1.1.1",
+ "@picovoice/cheetah-node": "=2.0.0",
"@picovoice/pvrecorder-node": "^1.2.1",
"commander": "^6.1.0",
"readline": "^1.3.0",
@@ -30,7 +30,7 @@
"directory": "demo/nodejs"
},
"engines": {
- "node": ">=14.0.0"
+ "node": ">=16.0.0"
},
"cpu": [
"!ia32",
diff --git a/demo/nodejs/yarn.lock b/demo/nodejs/yarn.lock
index 24370679..e727b7c0 100644
--- a/demo/nodejs/yarn.lock
+++ b/demo/nodejs/yarn.lock
@@ -2,10 +2,10 @@
# yarn lockfile v1
-"@picovoice/cheetah-node@^1.1.1":
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/@picovoice/cheetah-node/-/cheetah-node-1.1.1.tgz#56068802b287d0f2590699bf8b85f05a283f0dd9"
- integrity sha512-EnbbOjDBerscyOzqYTXOf8LqY9NsO7Ro5xn5C1z51puQW3voNhtoZeV86ObgDXGki+cpjGw/BwFxYsUN7lVY4w==
+"@picovoice/cheetah-node@=2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@picovoice/cheetah-node/-/cheetah-node-2.0.0.tgz#147b22f60f9c3f9c33d8703d07324be479be01d4"
+ integrity sha512-UrodmClxc2ImMjG3nBrZ/tHEt2hBDRbZQeYfGAWQVIKNRQkk0zqFMlJe/Fu5Wrpu/yc1T6PaCuesftBGl10Zfg==
"@picovoice/pvrecorder-node@^1.2.1":
version "1.2.1"
diff --git a/demo/python/requirements.txt b/demo/python/requirements.txt
index 5c874acf..280aec39 100644
--- a/demo/python/requirements.txt
+++ b/demo/python/requirements.txt
@@ -1,2 +1,2 @@
-pvcheetah==1.1.3
+pvcheetah==2.0.0
pvrecorder==1.2.1
diff --git a/demo/python/setup.py b/demo/python/setup.py
index ed130af0..aa5c1f68 100644
--- a/demo/python/setup.py
+++ b/demo/python/setup.py
@@ -28,7 +28,7 @@
setuptools.setup(
name="pvcheetahdemo",
- version="1.1.6",
+ version="2.0.0",
author="Picovoice",
author_email="hello@picovoice.ai",
description="Cheetah speech-to-text engine demos",
@@ -36,7 +36,7 @@
long_description_content_type="text/markdown",
url="https://github.com/Picovoice/cheetah",
packages=["pvcheetahdemo"],
- install_requires=["pvcheetah==1.1.3", "pvrecorder==1.2.1"],
+ install_requires=["pvcheetah==2.0.0", "pvrecorder==1.2.1"],
include_package_data=True,
classifiers=[
"Development Status :: 5 - Production/Stable",
diff --git a/demo/react-native/App.tsx b/demo/react-native/App.tsx
index f93c0a84..b9408e94 100644
--- a/demo/react-native/App.tsx
+++ b/demo/react-native/App.tsx
@@ -125,7 +125,7 @@ export default class App extends Component {
handleError(err: any) {
let errorMessage: string;
if (err instanceof CheetahErrors.CheetahInvalidArgumentError) {
- errorMessage = `${err.message}\nPlease make sure accessKey ${this._accessKey} is a valid access key.`;
+ errorMessage = `${err.message}`;
} else if (err instanceof CheetahErrors.CheetahActivationError) {
errorMessage = 'AccessKey activation error';
} else if (err instanceof CheetahErrors.CheetahActivationLimitError) {
diff --git a/demo/react-native/android/gradle/wrapper/gradle-wrapper.properties b/demo/react-native/android/gradle/wrapper/gradle-wrapper.properties
index 991f0739..d42b2de8 100644
--- a/demo/react-native/android/gradle/wrapper/gradle-wrapper.properties
+++ b/demo/react-native/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Tue Nov 02 11:32:43 PDT 2021
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
diff --git a/demo/react-native/ios/CheetahDemo.xcodeproj/project.pbxproj b/demo/react-native/ios/CheetahDemo.xcodeproj/project.pbxproj
index 7955d3bc..d3808ef8 100644
--- a/demo/react-native/ios/CheetahDemo.xcodeproj/project.pbxproj
+++ b/demo/react-native/ios/CheetahDemo.xcodeproj/project.pbxproj
@@ -295,7 +295,7 @@
DEVELOPMENT_TEAM = 65723695GD;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = CheetahDemo/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
@@ -320,7 +320,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 65723695GD;
INFOPLIST_FILE = CheetahDemo/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
@@ -382,7 +382,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
@@ -434,7 +434,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
diff --git a/demo/react-native/ios/Podfile b/demo/react-native/ios/Podfile
index e5a81214..fd1c675e 100644
--- a/demo/react-native/ios/Podfile
+++ b/demo/react-native/ios/Podfile
@@ -1,9 +1,10 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
-platform :ios, '11.0'
+platform :ios, '13.0'
target 'CheetahDemo' do
config = use_native_modules!
+ pod 'Cheetah-iOS', '~> 2.0.0'
use_react_native!(:path => config["reactNativePath"])
end
diff --git a/demo/react-native/ios/Podfile.lock b/demo/react-native/ios/Podfile.lock
index 8b16da5d..2b8b1bf8 100644
--- a/demo/react-native/ios/Podfile.lock
+++ b/demo/react-native/ios/Podfile.lock
@@ -1,8 +1,8 @@
PODS:
- boost (1.76.0)
- - Cheetah-iOS (1.1.0)
- - cheetah-react-native (1.1.1):
- - Cheetah-iOS (~> 1.1.0)
+ - Cheetah-iOS (2.0.0)
+ - cheetah-react-native (2.0.0):
+ - Cheetah-iOS (~> 2.0.0)
- React
- DoubleConversion (1.1.6)
- FBLazyVector (0.68.7)
@@ -299,6 +299,7 @@ PODS:
DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
+ - Cheetah-iOS (~> 2.0.0)
- "cheetah-react-native (from `../node_modules/@picovoice/cheetah-react-native`)"
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
@@ -416,8 +417,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
- Cheetah-iOS: 6fb7be693878f5b1dec0ea5b6534fbba30954afc
- cheetah-react-native: a7b750ffeff3fbcab49335a5f0d84f06cbce4815
+ Cheetah-iOS: d98a5edcbf3b74dda6027aeac6a8c0f5997a47a2
+ cheetah-react-native: 58a4b8cc29e1aeb342952a32590fc28839e59bba
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
FBLazyVector: 63b89dc85804d5817261f56dc4cfb43a9b6d57f5
FBReactNativeSpec: 1fa200a9862d9369a53b6fddbbfcdc22bab24062
@@ -454,6 +455,6 @@ SPEC CHECKSUMS:
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
Yoga: 0bc4b37c3b8a345336ff601e2cf7d9704bab7e93
-PODFILE CHECKSUM: eecdda7e5ef8e4b3162634729aaad4fa0babb35b
+PODFILE CHECKSUM: ee702823999352222dce8488a268138e2c400719
-COCOAPODS: 1.12.1
+COCOAPODS: 1.11.3
diff --git a/demo/react-native/package.json b/demo/react-native/package.json
index 632c4733..edfa3ec0 100644
--- a/demo/react-native/package.json
+++ b/demo/react-native/package.json
@@ -1,6 +1,6 @@
{
"name": "cheetah-react-native-demo",
- "version": "1.0.0",
+ "version": "2.0.0",
"private": true,
"scripts": {
"start": "react-native start",
@@ -16,7 +16,7 @@
"postinstall": "node copy.js"
},
"dependencies": {
- "@picovoice/cheetah-react-native": "^1.1.1",
+ "@picovoice/cheetah-react-native": "~2.0.0",
"@picovoice/react-native-voice-processor": "^1.2.0",
"@react-native-picker/picker": "^1.9.2",
"react": "^17.0.2",
diff --git a/demo/react-native/yarn.lock b/demo/react-native/yarn.lock
index a7623431..f0cd2eec 100644
--- a/demo/react-native/yarn.lock
+++ b/demo/react-native/yarn.lock
@@ -1090,10 +1090,10 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"
-"@picovoice/cheetah-react-native@^1.1.1":
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/@picovoice/cheetah-react-native/-/cheetah-react-native-1.1.1.tgz#1cc7957fea53c63e0c7c7de87373d197c3471080"
- integrity sha512-cB8rsZKJY1F61gcPaaYJIEZ9hHTRWYgiKyK1Laa9e4d212O5Rnu2ggLVp//dOs8EY7YK6cQ1puJ8h+wTvqgx9Q==
+"@picovoice/cheetah-react-native@~2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@picovoice/cheetah-react-native/-/cheetah-react-native-2.0.0.tgz#5884d8c3b5d7b2ddc0bbc305e0e14dacb88f4192"
+ integrity sha512-hHdT/0i2DbfMOj95NPQmSRK0Y3r4Vby7mYQgZ1AslK6S5+5I1g3jck/Q38l8SVOyPhrBLGzZlywaNyClBQo3zg==
"@picovoice/react-native-voice-processor@^1.2.0":
version "1.2.0"
diff --git a/demo/react/package.json b/demo/react/package.json
index 161be518..6f0ddd24 100644
--- a/demo/react/package.json
+++ b/demo/react/package.json
@@ -1,10 +1,10 @@
{
"name": "cheetah-react-demo",
- "version": "1.1.0",
+ "version": "2.0.0",
"private": true,
"description": "Cheetah React demo (made with Create React App)",
"dependencies": {
- "@picovoice/cheetah-react": "~1.1.0",
+ "@picovoice/cheetah-react": "~2.0.0",
"@picovoice/web-voice-processor": "~4.0.8",
"@types/node": "^18.11.9",
"@types/react": "^18.0.17",
diff --git a/demo/react/yarn.lock b/demo/react/yarn.lock
index 54258930..90353a26 100644
--- a/demo/react/yarn.lock
+++ b/demo/react/yarn.lock
@@ -1608,17 +1608,17 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"
-"@picovoice/cheetah-react@~1.1.0":
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/@picovoice/cheetah-react/-/cheetah-react-1.1.0.tgz#6be98cb02735c9ab2bd203739c50495f59bf0fd7"
- integrity sha512-v1QmQ6th+p7y6DtHGeR3u5AOel9yH6Svsab/zdSfymRNZfDk+H+GrczMRkL17D7pknm7KnB0xrFXu0Df/NX/UA==
+"@picovoice/cheetah-react@~2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@picovoice/cheetah-react/-/cheetah-react-2.0.0.tgz#00bdd9377f2d141d07e6a08a9d57183cda7c9090"
+ integrity sha512-t6x3RVzmeUpm4+r/0+b6VMJhmzSVuoyXgvquU/K4HpM0gsJIfIruZOzTOEDsnVae/rmw61v98spxT9NjorZZ8g==
dependencies:
- "@picovoice/cheetah-web" "=1.1.15"
+ "@picovoice/cheetah-web" "=2.0.0"
-"@picovoice/cheetah-web@=1.1.15":
- version "1.1.15"
- resolved "https://registry.yarnpkg.com/@picovoice/cheetah-web/-/cheetah-web-1.1.15.tgz#9545212be4d59dec6fbbcbaba9f9800b741c8732"
- integrity sha512-UMKOPqZopcMX3fLQaD3eDRAcUph/6CuirNxQ1SUlNXSxlWO9pdsfdpikaoZ8gx59vbw6l/c8bSB3OicV9Gl2Sw==
+"@picovoice/cheetah-web@=2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@picovoice/cheetah-web/-/cheetah-web-2.0.0.tgz#d4415c25e324726356f979bed3761a94e884198e"
+ integrity sha512-WqxHUznNS7Rf8XfJCp0m0l+xeYFDSFhzOTg+b2DJn06x1slhpJA4CiK4egiH7FzhHiJtvqjLF0dO14LA8e1Gpg==
dependencies:
"@picovoice/web-utils" "=1.3.1"
diff --git a/demo/rust/filedemo/Cargo.lock b/demo/rust/filedemo/Cargo.lock
index b56690a2..311e4c32 100644
--- a/demo/rust/filedemo/Cargo.lock
+++ b/demo/rust/filedemo/Cargo.lock
@@ -125,9 +125,9 @@ checksum = "648001efe5d5c0102d8cea768e348da85d90af8ba91f0bea908f157951493cd4"
[[package]]
name = "pv_cheetah"
-version = "1.1.0"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2924b4d578bab4f12bc6137e353f39514b382e4c5fdc8511e570d1fbd582eab5"
+checksum = "8dbc9bf92574ffb65e919487c09bbd916f7d31a2db0fe67d63fff0c4e8af483d"
dependencies = [
"libc",
"libloading",
@@ -135,7 +135,7 @@ dependencies = [
[[package]]
name = "pv_cheetah_filedemo"
-version = "1.1.0"
+version = "2.0.0"
dependencies = [
"clap",
"hound",
diff --git a/demo/rust/filedemo/Cargo.toml b/demo/rust/filedemo/Cargo.toml
index d76cd4a5..1f983990 100644
--- a/demo/rust/filedemo/Cargo.toml
+++ b/demo/rust/filedemo/Cargo.toml
@@ -1,10 +1,10 @@
[package]
name = "pv_cheetah_filedemo"
-version = "1.1.0"
+version = "2.0.0"
edition = "2018"
[dependencies]
clap = "3.2.16"
hound = "3.4.0"
itertools = "0.10.3"
-pv_cheetah = "=1.1.0"
+pv_cheetah = "=2.0.0"
diff --git a/demo/rust/micdemo/Cargo.lock b/demo/rust/micdemo/Cargo.lock
index f99b2d03..e143616d 100644
--- a/demo/rust/micdemo/Cargo.lock
+++ b/demo/rust/micdemo/Cargo.lock
@@ -267,9 +267,9 @@ dependencies = [
[[package]]
name = "pv_cheetah"
-version = "1.1.0"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2924b4d578bab4f12bc6137e353f39514b382e4c5fdc8511e570d1fbd582eab5"
+checksum = "8dbc9bf92574ffb65e919487c09bbd916f7d31a2db0fe67d63fff0c4e8af483d"
dependencies = [
"libc",
"libloading 0.7.4",
@@ -277,7 +277,7 @@ dependencies = [
[[package]]
name = "pv_cheetah_micdemo"
-version = "1.1.0"
+version = "2.0.0"
dependencies = [
"chrono",
"clap",
diff --git a/demo/rust/micdemo/Cargo.toml b/demo/rust/micdemo/Cargo.toml
index b87a55d4..9c397081 100644
--- a/demo/rust/micdemo/Cargo.toml
+++ b/demo/rust/micdemo/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "pv_cheetah_micdemo"
-version = "1.1.0"
+version = "2.0.0"
edition = "2018"
[dependencies]
@@ -9,5 +9,5 @@ clap = "3.2.16"
ctrlc = "3.2.2"
hound = "3.4.0"
itertools = "0.10.3"
-pv_cheetah = "=1.1.0"
+pv_cheetah = "=2.0.0"
pv_recorder = "=1.2.1"
diff --git a/demo/web/index.html b/demo/web/index.html
index c1a3b570..66800d85 100644
--- a/demo/web/index.html
+++ b/demo/web/index.html
@@ -78,7 +78,7 @@ Cheetah Web Demo
onclick="startCheetah(document.getElementById('accessKey').value)"
/>
-
+