Refactor flutter to support Android (#1072)
This commit is contained in:
29
flutter/sherpa_onnx_linux/.gitignore
vendored
Normal file
29
flutter/sherpa_onnx_linux/.gitignore
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# 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
|
||||
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
|
||||
/pubspec.lock
|
||||
**/doc/api/
|
||||
.dart_tool/
|
||||
build/
|
||||
30
flutter/sherpa_onnx_linux/.metadata
Normal file
30
flutter/sherpa_onnx_linux/.metadata
Normal file
@@ -0,0 +1,30 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1"
|
||||
channel: "stable"
|
||||
|
||||
project_type: plugin_ffi
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
|
||||
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
|
||||
- platform: linux
|
||||
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
|
||||
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
|
||||
|
||||
# User provided section
|
||||
|
||||
# List of Local paths (relative to this file) that should be
|
||||
# ignored by the migrate tool.
|
||||
#
|
||||
# Files that are not part of the templates will be ignored by default.
|
||||
unmanaged_files:
|
||||
- 'lib/main.dart'
|
||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
||||
7
flutter/sherpa_onnx_linux/README.md
Normal file
7
flutter/sherpa_onnx_linux/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# sherpa_onnx_linux
|
||||
|
||||
This is a sub project of [sherpa-onnx](https://github.com/k2-fsa/sherpa-onnx).
|
||||
|
||||
You are not expected to use this package directly.
|
||||
|
||||
Please see the entry point at <https://pub.dev/packages/sherpa_onnx>.
|
||||
4
flutter/sherpa_onnx_linux/analysis_options.yaml
Normal file
4
flutter/sherpa_onnx_linux/analysis_options.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
43
flutter/sherpa_onnx_linux/example/.gitignore
vendored
Normal file
43
flutter/sherpa_onnx_linux/example/.gitignore
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# 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
|
||||
9
flutter/sherpa_onnx_linux/example/README.md
Normal file
9
flutter/sherpa_onnx_linux/example/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# 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
|
||||
18
flutter/sherpa_onnx_linux/example/example.md
Normal file
18
flutter/sherpa_onnx_linux/example/example.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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
|
||||
|
||||
0
flutter/sherpa_onnx_linux/lib/.gitkeep
Normal file
0
flutter/sherpa_onnx_linux/lib/.gitkeep
Normal file
27
flutter/sherpa_onnx_linux/linux/CMakeLists.txt
Normal file
27
flutter/sherpa_onnx_linux/linux/CMakeLists.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
# The Flutter tooling requires that developers have CMake 3.10 or later
|
||||
# installed. You should not increase this version, as doing so will cause
|
||||
# the plugin to fail to compile for some customers of the plugin.
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
# Project-level configuration.
|
||||
set(PROJECT_NAME "sherpa_onnx_linux")
|
||||
project(${PROJECT_NAME} LANGUAGES CXX)
|
||||
|
||||
# List of absolute paths to libraries that should be bundled with the plugin.
|
||||
# This list could contain prebuilt libraries, or libraries created by an
|
||||
# external build triggered from this build file.
|
||||
set(sherpa_onnx_linux_bundled_libraries
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libsherpa-onnx-c-api.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libsherpa-onnx-core.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libkaldi-decoder-core.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libsherpa-onnx-kaldifst-core.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libsherpa-onnx-fstfar.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libsherpa-onnx-fst.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libkaldi-native-fbank-core.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libpiper_phonemize.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libespeak-ng.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libucd.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libonnxruntime.so"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/libssentencepiece_core.so"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
5
flutter/sherpa_onnx_linux/linux/README.md
Normal file
5
flutter/sherpa_onnx_linux/linux/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Introduction
|
||||
|
||||
`*.so` files are generated dynamically using GitHub actions during a new release.
|
||||
|
||||
We don't check-in pre-built library files into git.
|
||||
18
flutter/sherpa_onnx_linux/pubspec.yaml
Normal file
18
flutter/sherpa_onnx_linux/pubspec.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
name: sherpa_onnx_linux
|
||||
description: "A new Flutter FFI plugin project."
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
|
||||
environment:
|
||||
sdk: '>=3.4.0 <4.0.0'
|
||||
flutter: '>=3.3.0'
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
flutter:
|
||||
plugin:
|
||||
platforms:
|
||||
linux:
|
||||
ffiPlugin: true
|
||||
Reference in New Issue
Block a user