Skip to content

Commit

Permalink
v2.1 (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErisMik authored Dec 11, 2024
1 parent 9b4faa7 commit c2a77b1
Show file tree
Hide file tree
Showing 183 changed files with 2,145 additions and 903 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/android-browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
- run:
pip3 install requests

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Copy test_resources
Expand Down Expand Up @@ -70,8 +70,8 @@ jobs:
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Cheetah-Android"
--devices "android-min-max"
--app_path "cheetah-test-app/build/outputs/apk/debug/cheetah-test-app-debug.apk"
--test_path "cheetah-test-app/build/outputs/apk/androidTest/debug/cheetah-test-app-debug-androidTest.apk"
--app_path "cheetah-test-app/build/outputs/apk/en/debug/cheetah-test-app-en-debug.apk"
--test_path "cheetah-test-app/build/outputs/apk/androidTest/en/debug/cheetah-test-app-en-debug-androidTest.apk"

build-integ:
name: Run Android Integration Tests on BrowserStack
Expand All @@ -90,10 +90,10 @@ jobs:
- name: Install AppCenter CLI
run: npm install -g appcenter-cli

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Copy test_resources
Expand Down Expand Up @@ -128,6 +128,6 @@ jobs:
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Cheetah-Android-Integration"
--devices "android-min-max"
--app_path "cheetah-test-app/build/outputs/apk/release/cheetah-test-app-release.apk"
--test_path "cheetah-test-app/build/outputs/apk/androidTest/release/cheetah-test-app-release-androidTest.apk"
--app_path "cheetah-test-app/build/outputs/apk/en/release/cheetah-test-app-en-release.apk"
--test_path "cheetah-test-app/build/outputs/apk/androidTest/en/release/cheetah-test-app-en-release-androidTest.apk"

8 changes: 4 additions & 4 deletions .github/workflows/android-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
- run:
pip3 install requests

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Copy test_resources
Expand Down Expand Up @@ -89,6 +89,6 @@ jobs:
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Cheetah-Android-Performance"
--devices "${{ matrix.device }}"
--app_path "cheetah-test-app/build/outputs/apk/debug/cheetah-test-app-debug.apk"
--test_path "cheetah-test-app/build/outputs/apk/androidTest/debug/cheetah-test-app-debug-androidTest.apk"
--app_path "cheetah-test-app/build/outputs/apk/en/debug/cheetah-test-app-en-debug.apk"
--test_path "cheetah-test-app/build/outputs/apk/androidTest/en/debug/cheetah-test-app-en-debug-androidTest.apk"

5 changes: 0 additions & 5 deletions .github/workflows/flutter-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ jobs:
run: flutter analyze --no-fatal-infos --no-fatal-warnings
working-directory: binding/flutter

- name: Copy Demo Assets
run: ./copy_assets.sh
working-directory: demo/flutter

- name: Run Demo Analyzer
run: flutter analyze --no-fatal-infos --no-fatal-warnings
working-directory: demo/flutter

18 changes: 9 additions & 9 deletions .github/workflows/flutter-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,29 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Install Flutter ${{ matrix.flutter-version }}
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}

- name: Copy assets
run: ./copy_assets.sh

- name: Install dependencies
run: flutter pub get

- name: Prepare demo
run: dart scripts/prepare_demo.dart en

- name: Build
run: flutter build apk

build-ios:
name: Build iOS demo
runs-on: macos-12
runs-on: macos-14
strategy:
matrix:
flutter-version: ['3.3.0', '3.22.2']
Expand All @@ -64,11 +64,11 @@ jobs:
flutter-version: ${{ matrix.flutter-version }}
architecture: x64

- name: Copy assets
run: ./copy_assets.sh

- name: Install dependencies
run: flutter pub get

- name: Prepare demo
run: dart scripts/prepare_demo.dart en

- name: Build
run: flutter build ios --release --no-codesign
32 changes: 19 additions & 13 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,31 @@ jobs:
- name: Install dependencies
run: flutter pub get

- name: Prepare demo
run: dart scripts/prepare_demo.dart en

- name: Run integration tests
run: flutter test integration_test

test-ios:
name: Test iOS
runs-on: pv-ios
name: Test iOS
runs-on: pv-ios

steps:
- uses: actions/checkout@v3

steps:
- uses: actions/checkout@v3
- name: Copy test_resources
run: ./copy_test_resources.sh

- name: Copy test_resources
run: ./copy_test_resources.sh
- name: Inject AppID
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
integration_test/app_test.dart

- name: Inject AppID
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
integration_test/app_test.dart
- name: Install dependencies
run: flutter pub get

- name: Install dependencies
run: flutter pub get
- name: Prepare demo
run: dart scripts/prepare_demo.dart en

- name: Run integration tests
run: flutter test integration_test
- name: Run integration tests
run: flutter test integration_test
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ jobs:
run: go build

- name: Test
run: go test -modfile="go_test.mod" -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}
run: go test -modfile="go_test.mod" -timeout 30m -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}
3 changes: 3 additions & 0 deletions .github/workflows/ios-browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
- name: Make build dir
run: mkdir ddp

- name: Copy test_resources
run: ./copy_test_resources.sh

- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
CheetahAppTestUITests/CheetahAppTestUITests.swift
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ios-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
- name: Make build dir
run: mkdir ddp

- name: Copy test_resources
run: ./copy_test_resources.sh

- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
PerformanceTest/PerformanceTest.swift
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/react-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,11 @@ 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

- name: Build
run: yarn build
- name: Build English
run: yarn build en

- name: Build Other Language
run: yarn build es
22 changes: 20 additions & 2 deletions .github/workflows/react-native-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Pre-build dependencies
run: npm install yarn
run: npm install -g yarn

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

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

- name: Install dependencies
run: yarn android-install
Expand Down Expand Up @@ -64,7 +73,16 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Pre-build dependencies
run: npm install yarn
run: npm install -g yarn

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

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

- name: Install dependencies
run: yarn ios-install
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ 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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/swift-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- '**/*.swift'

jobs:
check-switch-codestyle:
check-swift-codestyle:
runs-on: ubuntu-latest

steps:
Expand All @@ -21,4 +21,4 @@ jobs:
- name: Check swift codestyle
uses: norio-nomura/[email protected]
with:
args: lint --config resources/.lint/swift/.swiftlint.yml --strict
args: lint --config resources/.lint/swift/.swiftlint.yml --strict
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ AccessKey also verifies that your usage is within the limits of your account. Ev

## Language Support

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

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

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.

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.).
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.

```console
dart scripts/prepare_demo.dart ${LANGUAGE}
```

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

Expand Down Expand Up @@ -828,6 +832,11 @@ function App(props) {

## Releases

### v2.1.0 - December 10th, 2024

- Added language support for French, German, Italian, Portuguese and Spanish
- Various bug fixes and performance improvements

### v2.0.0 - November 27th, 2023

- Improvements to error reporting
Expand Down
2 changes: 1 addition & 1 deletion binding/android/Cheetah/cheetah/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'

ext {
PUBLISH_GROUP_ID = 'ai.picovoice'
PUBLISH_VERSION = '2.0.0'
PUBLISH_VERSION = '2.1.0'
PUBLISH_ARTIFACT_ID = 'cheetah-android'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Jun 29 22:27:49 PDT 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
4 changes: 2 additions & 2 deletions binding/android/CheetahTestApp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
.externalNativeBuild
release
test_resources
cheetah_params.pv
cheetah_params*.pv

*.wav
*.jks
!.dummy.jks
!.dummy.jks
2 changes: 1 addition & 1 deletion binding/android/CheetahTestApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:8.2.2'
}
}

Expand Down
Loading

0 comments on commit c2a77b1

Please sign in to comment.