Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.1 flutter #372

Merged
merged 11 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
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
4 changes: 2 additions & 2 deletions binding/android/CheetahTestApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1352/'
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1353/'
}
}
dependencies {
Expand All @@ -20,7 +20,7 @@ allprojects {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1352/'
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1353/'
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions binding/flutter/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
group 'ai.picovoice.flutter.cheetah'
version '2.0.2'
version '2.1.0'

buildscript {
repositories {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1353/'
}
}

dependencies {
Expand All @@ -16,6 +19,9 @@ rootProject.allprojects {
repositories {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1353/'
}
}
}

Expand Down Expand Up @@ -44,5 +50,5 @@ android {
}

dependencies {
implementation 'ai.picovoice:cheetah-android:2.0.0'
implementation 'ai.picovoice:cheetah-android:2.1.0'
}
4 changes: 2 additions & 2 deletions binding/flutter/ios/cheetah_flutter.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'cheetah_flutter'
s.version = '2.0.2'
s.version = '2.1.0'
s.summary = 'A Flutter package plugin for Picovoice\'s Cheetah Speech-to-Text engine'
s.description = <<-DESC
A Flutter package plugin for Picovoice\'s Cheetah Speech-to-Text engine
Expand All @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.platform = :ios, '13.0'
s.dependency 'Flutter'
s.dependency 'Cheetah-iOS', '~> 2.0.1'
s.dependency 'Cheetah-iOS', '~> 2.1.0'

s.swift_version = '5.0'
end
Loading
Loading