Publish flutter packages for Android (#1074)
This commit is contained in:
62
flutter/notes2.md
Normal file
62
flutter/notes2.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Some use commands while learning flutter/dart
|
||||
|
||||
## macOS
|
||||
|
||||
1. Build required libraries
|
||||
|
||||
```bash
|
||||
git clone https://github.com/k2-fsa/sherpa-onnx
|
||||
cd sherpa-onnx
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ..
|
||||
make install
|
||||
cd ../sherpa-onnx/flutter/
|
||||
cp -v ../../build/install/lib/lib* ./macos/
|
||||
```
|
||||
|
||||
2. Test for speaker identification
|
||||
|
||||
```bash
|
||||
cd sherpa-onnx/sherpa-onnx/flutter/example
|
||||
mkdir assets
|
||||
```
|
||||
|
||||
|
||||
## Useful commands
|
||||
```
|
||||
flutter pub publish --dry-run
|
||||
flutter run -d macos
|
||||
flutter run -d linux
|
||||
flutter run -d windows
|
||||
|
||||
flutter build macos
|
||||
|
||||
flutter run --release -d macos
|
||||
|
||||
# add platform to an existing project
|
||||
flutter create --platforms=windows,macos,linux .
|
||||
|
||||
dart analyze
|
||||
|
||||
FLUTTER_XCODE_ARCHS=arm64
|
||||
FLUTTER_XCODE_ARCHS=x86_64
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
- https://dart.dev/tools/pub/automated-publishing
|
||||
|
||||
Use GitHub actions to publish
|
||||
|
||||
- https://dart.dev/tools/pub/pubspec
|
||||
|
||||
It describes the format of ./pubspec.yaml
|
||||
|
||||
- https://github.com/folksable/blurhash_ffi/
|
||||
|
||||
It supports ios, android, linux, macos, and windows.
|
||||
|
||||
- https://github.com/alexmercerind/dart_vlc
|
||||
- https://github.com/dart-lang/native/tree/main/pkgs/jni
|
||||
@@ -1,35 +0,0 @@
|
||||
## 1.10.7
|
||||
|
||||
* Support Android
|
||||
|
||||
## 1.10.2
|
||||
|
||||
* Fix passing C# string to C++
|
||||
|
||||
## 1.10.1
|
||||
|
||||
* Enable to stop TTS generation
|
||||
|
||||
## 1.10.0
|
||||
|
||||
* Add inverse text normalization
|
||||
|
||||
## 1.9.30
|
||||
|
||||
* Add TTS
|
||||
|
||||
## 1.9.29
|
||||
|
||||
* Publish with CI
|
||||
|
||||
## 0.0.3
|
||||
|
||||
* Fix path separator on Windows.
|
||||
|
||||
## 0.0.2
|
||||
|
||||
* Support specifying lib path.
|
||||
|
||||
## 0.0.1
|
||||
|
||||
* Initial release.
|
||||
@@ -1,3 +0,0 @@
|
||||
# sherpa_onnx
|
||||
|
||||
Please see <https://github.com/k2-fsa/sherpa-onnx>
|
||||
@@ -1,20 +1,16 @@
|
||||
# sherpa-onnx app example
|
||||
|
||||
See also <https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples>
|
||||
## Flutter examples
|
||||
|
||||
## Streaming speech recognition
|
||||
| Functions | URL | Supported Platforms|
|
||||
|---|---|---|
|
||||
|Streaming speech recognition| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples/streaming_asr)| Android, macOS, Windows|
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr
|
||||
|
||||
## Non-streaming speech recognition
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr
|
||||
|
||||
## Text to speech (TTS)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts
|
||||
|
||||
## Voice activity detection (VAD)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad
|
||||
## Pure dart-examples
|
||||
|
||||
| Functions | URL | Supported Platforms|
|
||||
|---|---|---|
|
||||
|Streaming speech recognition| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr)| macOS, Windows, Linux|
|
||||
|Non-Streaming speech recognition| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr)| macOS, Windows, Linux|
|
||||
|Text to speech| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts)| macOS, Windows, Linux|
|
||||
|Voice activity detection (VAD)| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad)| macOS, Windows, Linux|
|
||||
|
||||
@@ -4,7 +4,7 @@ description: >
|
||||
Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi
|
||||
with onnxruntime without Internet connection.
|
||||
|
||||
repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/sherpa-onnx/flutter
|
||||
repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter
|
||||
|
||||
issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues
|
||||
documentation: https://k2-fsa.github.io/sherpa/onnx/
|
||||
@@ -16,8 +16,8 @@ topics:
|
||||
- audio-tagging
|
||||
- voice-activity-detection
|
||||
|
||||
# remember to change the version in ../sherpa_onnx_macos/macos/sherpa_onnx.podspec
|
||||
version: 1.10.7
|
||||
# remember to change the version in ../sherpa_onnx_macos/macos/sherpa_onnx_macos.podspec
|
||||
version: 1.10.9
|
||||
|
||||
homepage: https://github.com/k2-fsa/sherpa-onnx
|
||||
|
||||
@@ -30,16 +30,16 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
sherpa_onnx_android:
|
||||
sherpa_onnx_android: ^1.10.9
|
||||
# path: ../sherpa_onnx_android
|
||||
|
||||
sherpa_onnx_macos:
|
||||
sherpa_onnx_macos: ^1.10.9
|
||||
# path: ../sherpa_onnx_macos
|
||||
|
||||
sherpa_onnx_linux:
|
||||
sherpa_onnx_linux: ^1.10.9
|
||||
# path: ../sherpa_onnx_linux
|
||||
#
|
||||
sherpa_onnx_windows:
|
||||
sherpa_onnx_windows: ^1.10.9
|
||||
# path: ../sherpa_onnx_windows
|
||||
|
||||
flutter:
|
||||
|
||||
43
flutter/sherpa_onnx_android/example/.gitignore
vendored
43
flutter/sherpa_onnx_android/example/.gitignore
vendored
@@ -1,43 +0,0 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
@@ -1,9 +0,0 @@
|
||||
# Introduction
|
||||
|
||||
Please find examples at
|
||||
|
||||
https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples
|
||||
|
||||
and
|
||||
|
||||
https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples
|
||||
@@ -1,18 +0,0 @@
|
||||
# sherpa-onnx app example
|
||||
|
||||
## Streaming speech recognition
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr
|
||||
|
||||
## Non-streaming speech recognition
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr
|
||||
|
||||
## Text to speech (TTS)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts
|
||||
|
||||
## Voice activity detection (VAD)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad
|
||||
|
||||
3
flutter/sherpa_onnx_android/lib/README.md
Normal file
3
flutter/sherpa_onnx_android/lib/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Introduction
|
||||
|
||||
This directory is left empty intentionally.
|
||||
@@ -1,7 +1,24 @@
|
||||
name: sherpa_onnx_android
|
||||
description: "A new Flutter FFI plugin project."
|
||||
|
||||
description: >
|
||||
Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi
|
||||
with onnxruntime without Internet connection.
|
||||
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
|
||||
repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter
|
||||
|
||||
issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues
|
||||
documentation: https://k2-fsa.github.io/sherpa/onnx/
|
||||
|
||||
homepage: https://github.com/k2-fsa/sherpa-onnx
|
||||
|
||||
topics:
|
||||
- speech-recognition
|
||||
- speech-synthesis
|
||||
- speaker-identification
|
||||
- audio-tagging
|
||||
- voice-activity-detection
|
||||
|
||||
environment:
|
||||
sdk: '>=3.4.0 <4.0.0'
|
||||
|
||||
43
flutter/sherpa_onnx_linux/example/.gitignore
vendored
43
flutter/sherpa_onnx_linux/example/.gitignore
vendored
@@ -1,43 +0,0 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
@@ -1,9 +0,0 @@
|
||||
# Introduction
|
||||
|
||||
Please find examples at
|
||||
|
||||
https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples
|
||||
|
||||
and
|
||||
|
||||
https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples
|
||||
@@ -1,18 +0,0 @@
|
||||
# sherpa-onnx app example
|
||||
|
||||
## Streaming speech recognition
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr
|
||||
|
||||
## Non-streaming speech recognition
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr
|
||||
|
||||
## Text to speech (TTS)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts
|
||||
|
||||
## Voice activity detection (VAD)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad
|
||||
|
||||
3
flutter/sherpa_onnx_linux/lib/README.md
Normal file
3
flutter/sherpa_onnx_linux/lib/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Introduction
|
||||
|
||||
This directory is left empty intentionally.
|
||||
@@ -1,7 +1,23 @@
|
||||
name: sherpa_onnx_linux
|
||||
description: "A new Flutter FFI plugin project."
|
||||
description: >
|
||||
Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi
|
||||
with onnxruntime without Internet connection.
|
||||
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
|
||||
repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter
|
||||
|
||||
issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues
|
||||
documentation: https://k2-fsa.github.io/sherpa/onnx/
|
||||
|
||||
homepage: https://github.com/k2-fsa/sherpa-onnx
|
||||
|
||||
topics:
|
||||
- speech-recognition
|
||||
- speech-synthesis
|
||||
- speaker-identification
|
||||
- audio-tagging
|
||||
- voice-activity-detection
|
||||
|
||||
environment:
|
||||
sdk: '>=3.4.0 <4.0.0'
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# Introduction
|
||||
|
||||
Please find examples at
|
||||
|
||||
https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples
|
||||
|
||||
and
|
||||
|
||||
https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples
|
||||
@@ -1,18 +0,0 @@
|
||||
# sherpa-onnx app example
|
||||
|
||||
## Streaming speech recognition
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr
|
||||
|
||||
## Non-streaming speech recognition
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr
|
||||
|
||||
## Text to speech (TTS)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts
|
||||
|
||||
## Voice activity detection (VAD)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad
|
||||
|
||||
3
flutter/sherpa_onnx_macos/lib/README.md
Normal file
3
flutter/sherpa_onnx_macos/lib/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Introduction
|
||||
|
||||
This directory is left empty intentionally.
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'sherpa_onnx_macos'
|
||||
s.version = '1.10.6'
|
||||
s.version = '1.10.7'
|
||||
s.summary = 'sherpa-onnx Flutter FFI plugin project.'
|
||||
s.description = <<-DESC
|
||||
sherpa-onnx Flutter FFI plugin project.
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
name: sherpa_onnx_macos
|
||||
description: "A new Flutter FFI plugin project."
|
||||
|
||||
description: >
|
||||
Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi
|
||||
with onnxruntime without Internet connection.
|
||||
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
|
||||
repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter
|
||||
|
||||
issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues
|
||||
documentation: https://k2-fsa.github.io/sherpa/onnx/
|
||||
|
||||
homepage: https://github.com/k2-fsa/sherpa-onnx
|
||||
|
||||
topics:
|
||||
- speech-recognition
|
||||
- speech-synthesis
|
||||
- speaker-identification
|
||||
- audio-tagging
|
||||
- voice-activity-detection
|
||||
|
||||
environment:
|
||||
sdk: '>=3.4.0 <4.0.0'
|
||||
|
||||
43
flutter/sherpa_onnx_windows/example/.gitignore
vendored
43
flutter/sherpa_onnx_windows/example/.gitignore
vendored
@@ -1,43 +0,0 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
@@ -1,9 +0,0 @@
|
||||
# Introduction
|
||||
|
||||
Please find examples at
|
||||
|
||||
https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples
|
||||
|
||||
and
|
||||
|
||||
https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples
|
||||
@@ -1,18 +0,0 @@
|
||||
# sherpa-onnx app example
|
||||
|
||||
## Streaming speech recognition
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr
|
||||
|
||||
## Non-streaming speech recognition
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr
|
||||
|
||||
## Text to speech (TTS)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts
|
||||
|
||||
## Voice activity detection (VAD)
|
||||
|
||||
Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad
|
||||
|
||||
3
flutter/sherpa_onnx_windows/lib/README.md
Normal file
3
flutter/sherpa_onnx_windows/lib/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Introduction
|
||||
|
||||
This directory is left empty intentionally.
|
||||
@@ -1,7 +1,24 @@
|
||||
name: sherpa_onnx_windows
|
||||
description: "A new Flutter FFI plugin project."
|
||||
|
||||
description: >
|
||||
Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi
|
||||
with onnxruntime without Internet connection.
|
||||
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
|
||||
repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter
|
||||
|
||||
issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues
|
||||
documentation: https://k2-fsa.github.io/sherpa/onnx/
|
||||
|
||||
homepage: https://github.com/k2-fsa/sherpa-onnx
|
||||
|
||||
topics:
|
||||
- speech-recognition
|
||||
- speech-synthesis
|
||||
- speaker-identification
|
||||
- audio-tagging
|
||||
- voice-activity-detection
|
||||
|
||||
environment:
|
||||
sdk: '>=3.4.0 <4.0.0'
|
||||
|
||||
Reference in New Issue
Block a user