Skip to content

Commit c2a77b1

Browse files
authored
v2.1 (#389)
1 parent 9b4faa7 commit c2a77b1

File tree

183 files changed

+2145
-903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+2145
-903
lines changed

.github/workflows/android-browserstack.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
- run:
3333
pip3 install requests
3434

35-
- name: set up JDK 11
35+
- name: set up JDK 17
3636
uses: actions/setup-java@v3
3737
with:
38-
java-version: '11'
38+
java-version: '17'
3939
distribution: 'temurin'
4040

4141
- name: Copy test_resources
@@ -70,8 +70,8 @@ jobs:
7070
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
7171
--project_name "Cheetah-Android"
7272
--devices "android-min-max"
73-
--app_path "cheetah-test-app/build/outputs/apk/debug/cheetah-test-app-debug.apk"
74-
--test_path "cheetah-test-app/build/outputs/apk/androidTest/debug/cheetah-test-app-debug-androidTest.apk"
73+
--app_path "cheetah-test-app/build/outputs/apk/en/debug/cheetah-test-app-en-debug.apk"
74+
--test_path "cheetah-test-app/build/outputs/apk/androidTest/en/debug/cheetah-test-app-en-debug-androidTest.apk"
7575

7676
build-integ:
7777
name: Run Android Integration Tests on BrowserStack
@@ -90,10 +90,10 @@ jobs:
9090
- name: Install AppCenter CLI
9191
run: npm install -g appcenter-cli
9292

93-
- name: set up JDK 11
93+
- name: set up JDK 17
9494
uses: actions/setup-java@v3
9595
with:
96-
java-version: '11'
96+
java-version: '17'
9797
distribution: 'temurin'
9898

9999
- name: Copy test_resources
@@ -128,6 +128,6 @@ jobs:
128128
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
129129
--project_name "Cheetah-Android-Integration"
130130
--devices "android-min-max"
131-
--app_path "cheetah-test-app/build/outputs/apk/release/cheetah-test-app-release.apk"
132-
--test_path "cheetah-test-app/build/outputs/apk/androidTest/release/cheetah-test-app-release-androidTest.apk"
131+
--app_path "cheetah-test-app/build/outputs/apk/en/release/cheetah-test-app-en-release.apk"
132+
--test_path "cheetah-test-app/build/outputs/apk/androidTest/en/release/cheetah-test-app-en-release-androidTest.apk"
133133

.github/workflows/android-perf.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
- run:
4343
pip3 install requests
4444

45-
- name: set up JDK 11
45+
- name: set up JDK 17
4646
uses: actions/setup-java@v3
4747
with:
48-
java-version: '11'
48+
java-version: '17'
4949
distribution: 'temurin'
5050

5151
- name: Copy test_resources
@@ -89,6 +89,6 @@ jobs:
8989
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
9090
--project_name "Cheetah-Android-Performance"
9191
--devices "${{ matrix.device }}"
92-
--app_path "cheetah-test-app/build/outputs/apk/debug/cheetah-test-app-debug.apk"
93-
--test_path "cheetah-test-app/build/outputs/apk/androidTest/debug/cheetah-test-app-debug-androidTest.apk"
92+
--app_path "cheetah-test-app/build/outputs/apk/en/debug/cheetah-test-app-en-debug.apk"
93+
--test_path "cheetah-test-app/build/outputs/apk/androidTest/en/debug/cheetah-test-app-en-debug-androidTest.apk"
9494

.github/workflows/flutter-codestyle.yml

-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ jobs:
2929
run: flutter analyze --no-fatal-infos --no-fatal-warnings
3030
working-directory: binding/flutter
3131

32-
- name: Copy Demo Assets
33-
run: ./copy_assets.sh
34-
working-directory: demo/flutter
35-
3632
- name: Run Demo Analyzer
3733
run: flutter analyze --no-fatal-infos --no-fatal-warnings
3834
working-directory: demo/flutter
39-

.github/workflows/flutter-demos.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,29 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@v3
3030

31-
- name: Set up JDK 11
31+
- name: Set up JDK 17
3232
uses: actions/setup-java@v3
3333
with:
34-
java-version: '11'
34+
java-version: '17'
3535
distribution: 'temurin'
3636

3737
- name: Install Flutter ${{ matrix.flutter-version }}
3838
uses: subosito/flutter-action@v2
3939
with:
4040
flutter-version: ${{ matrix.flutter-version }}
4141

42-
- name: Copy assets
43-
run: ./copy_assets.sh
44-
4542
- name: Install dependencies
4643
run: flutter pub get
4744

45+
- name: Prepare demo
46+
run: dart scripts/prepare_demo.dart en
47+
4848
- name: Build
4949
run: flutter build apk
5050

5151
build-ios:
5252
name: Build iOS demo
53-
runs-on: macos-12
53+
runs-on: macos-14
5454
strategy:
5555
matrix:
5656
flutter-version: ['3.3.0', '3.22.2']
@@ -64,11 +64,11 @@ jobs:
6464
flutter-version: ${{ matrix.flutter-version }}
6565
architecture: x64
6666

67-
- name: Copy assets
68-
run: ./copy_assets.sh
69-
7067
- name: Install dependencies
7168
run: flutter pub get
7269

70+
- name: Prepare demo
71+
run: dart scripts/prepare_demo.dart en
72+
7373
- name: Build
7474
run: flutter build ios --release --no-codesign

.github/workflows/flutter.yml

+19-13
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,31 @@ jobs:
3939
- name: Install dependencies
4040
run: flutter pub get
4141

42+
- name: Prepare demo
43+
run: dart scripts/prepare_demo.dart en
44+
4245
- name: Run integration tests
4346
run: flutter test integration_test
4447

4548
test-ios:
46-
name: Test iOS
47-
runs-on: pv-ios
49+
name: Test iOS
50+
runs-on: pv-ios
51+
52+
steps:
53+
- uses: actions/checkout@v3
4854

49-
steps:
50-
- uses: actions/checkout@v3
55+
- name: Copy test_resources
56+
run: ./copy_test_resources.sh
5157

52-
- name: Copy test_resources
53-
run: ./copy_test_resources.sh
58+
- name: Inject AppID
59+
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
60+
integration_test/app_test.dart
5461

55-
- name: Inject AppID
56-
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
57-
integration_test/app_test.dart
62+
- name: Install dependencies
63+
run: flutter pub get
5864

59-
- name: Install dependencies
60-
run: flutter pub get
65+
- name: Prepare demo
66+
run: dart scripts/prepare_demo.dart en
6167

62-
- name: Run integration tests
63-
run: flutter test integration_test
68+
- name: Run integration tests
69+
run: flutter test integration_test

.github/workflows/go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ jobs:
7878
run: go build
7979

8080
- name: Test
81-
run: go test -modfile="go_test.mod" -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}
81+
run: go test -modfile="go_test.mod" -timeout 30m -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}

.github/workflows/ios-browserstack.yml

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
- name: Make build dir
3737
run: mkdir ddp
3838

39+
- name: Copy test_resources
40+
run: ./copy_test_resources.sh
41+
3942
- name: Inject AccessKey
4043
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
4144
CheetahAppTestUITests/CheetahAppTestUITests.swift

.github/workflows/ios-perf.yml

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
- name: Make build dir
4747
run: mkdir ddp
4848

49+
- name: Copy test_resources
50+
run: ./copy_test_resources.sh
51+
4952
- name: Inject AccessKey
5053
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
5154
PerformanceTest/PerformanceTest.swift

.github/workflows/react-demos.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,11 @@ jobs:
3939
- name: Pre-build dependencies
4040
run: npm install yarn
4141

42-
- name: Build Local Web SDK
43-
run: yarn && yarn copywasm && yarn build
44-
working-directory: binding/web
45-
46-
- name: Build Local React SDK
47-
run: yarn && yarn build
48-
working-directory: binding/react
49-
5042
- name: Install dependencies
5143
run: yarn install
5244

53-
- name: Build
54-
run: yarn build
45+
- name: Build English
46+
run: yarn build en
47+
48+
- name: Build Other Language
49+
run: yarn build es

.github/workflows/react-native-demos.yml

+20-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,16 @@ jobs:
3636
node-version: ${{ matrix.node-version }}
3737

3838
- name: Pre-build dependencies
39-
run: npm install yarn
39+
run: npm install -g yarn
40+
41+
# ************ REMOVE AFTER RELEASE *****************
42+
- name: Build and package binding
43+
working-directory: binding/react-native
44+
run: yarn && yarn pkg
45+
46+
- name: Add to demo
47+
run: yarn add ../../binding/react-native/pkg/picovoice-cheetah-react-native-2.1.0.tgz
48+
# ***************************************************
4049

4150
- name: Install dependencies
4251
run: yarn android-install
@@ -64,7 +73,16 @@ jobs:
6473
node-version: ${{ matrix.node-version }}
6574

6675
- name: Pre-build dependencies
67-
run: npm install yarn
76+
run: npm install -g yarn
77+
78+
# ************ REMOVE AFTER RELEASE *****************
79+
- name: Build and package binding
80+
working-directory: binding/react-native
81+
run: yarn && yarn pkg
82+
83+
- name: Add to demo
84+
run: yarn add ../../binding/react-native/pkg/picovoice-cheetah-react-native-2.1.0.tgz
85+
# ***************************************************
6886

6987
- name: Install dependencies
7088
run: yarn ios-install

.github/workflows/react.yml

-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ jobs:
4444
- name: Pre-build dependencies
4545
run: npm install yarn
4646

47-
- name: Build Local Web SDK
48-
run: yarn && yarn copywasm && yarn build
49-
working-directory: binding/web
50-
5147
- name: Install dependencies
5248
run: yarn install
5349

.github/workflows/swift-codestyle.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- '**/*.swift'
1313

1414
jobs:
15-
check-switch-codestyle:
15+
check-swift-codestyle:
1616
runs-on: ubuntu-latest
1717

1818
steps:
@@ -21,4 +21,4 @@ jobs:
2121
- name: Check swift codestyle
2222
uses: norio-nomura/[email protected]
2323
with:
24-
args: lint --config resources/.lint/swift/.swiftlint.yml --strict
24+
args: lint --config resources/.lint/swift/.swiftlint.yml --strict

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ AccessKey also verifies that your usage is within the limits of your account. Ev
8383

8484
## Language Support
8585

86-
- Cheetah Streaming Speech-to-Text currently supports English only.
86+
- Cheetah Streaming Speech-to-Text currently supports English, French, German, Italian, Portuguese, and Spanish.
8787
- Support for [additional languages is available for commercial customers](https://picovoice.ai/consulting/) on a case-by-case basis.
8888

8989
## Demos
@@ -154,7 +154,11 @@ Replace `"${YOUR_ACCESS_KEY_HERE}"` in the file [MainActivity.java](./demo/andro
154154

155155
To run the Cheetah demo on Android or iOS with Flutter, you must have the [Flutter SDK](https://flutter.dev/docs/get-started/install) installed on your system. Once installed, you can run `flutter doctor` to determine any other missing requirements for your relevant platform. Once your environment has been set up, launch a simulator or connect an Android/iOS device.
156156

157-
Before launching the app, use the [copy_assets.sh](./demo/flutter/copy_assets.sh) script to copy the cheetah demo model file into the demo project. (**NOTE**: on Windows, Git Bash or another bash shell is required, or you will have to manually copy the context into the project.).
157+
Run the `prepare_demo` script from [demo/flutter](.) with a language code to set up the demo in the language of your choice (e.g. `de` -> German, `ko` -> Korean). To see a list of available languages, run `prepare_demo` without a language code.
158+
159+
```console
160+
dart scripts/prepare_demo.dart ${LANGUAGE}
161+
```
158162

159163
Replace `"${YOUR_ACCESS_KEY_HERE}"` in the file [main.dart](./demo/flutter/lib/main.dart) with your `AccessKey`.
160164

@@ -828,6 +832,11 @@ function App(props) {
828832

829833
## Releases
830834

835+
### v2.1.0 - December 10th, 2024
836+
837+
- Added language support for French, German, Italian, Portuguese and Spanish
838+
- Various bug fixes and performance improvements
839+
831840
### v2.0.0 - November 27th, 2023
832841

833842
- Improvements to error reporting

binding/android/Cheetah/cheetah/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22

33
ext {
44
PUBLISH_GROUP_ID = 'ai.picovoice'
5-
PUBLISH_VERSION = '2.0.0'
5+
PUBLISH_VERSION = '2.1.0'
66
PUBLISH_ARTIFACT_ID = 'cheetah-android'
77
}
88

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Jun 29 22:27:49 PDT 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

binding/android/CheetahTestApp/.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
.externalNativeBuild
99
release
1010
test_resources
11-
cheetah_params.pv
11+
cheetah_params*.pv
1212

1313
*.wav
1414
*.jks
15-
!.dummy.jks
15+
!.dummy.jks

binding/android/CheetahTestApp/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
mavenCentral()
99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.2.2'
11+
classpath 'com.android.tools.build:gradle:8.2.2'
1212
}
1313
}
1414

0 commit comments

Comments
 (0)