Use xcframework for Flutter iOS plugin. (#1547)

This commit is contained in:
Fangjun Kuang
2024-11-16 16:42:02 +08:00
committed by GitHub
parent e993c08538
commit 9a48012648
24 changed files with 216 additions and 49 deletions

View File

@@ -136,14 +136,16 @@ flutter create --platforms ios ./
Connect your iPhone to the computer, and run `flutter devices`, which will print:
```bash
Found 3 connected devices:
iPhone (mobile)00008030-001064212E85802E • ios • iOS 16.3 20D47
macOS (desktop) • macos • darwin-x64macOS 13.1 22C65 darwin-x64
Chrome (web)chrome • web-javascript • Google Chrome 126.0.6478.127
Found 4 connected devices:
iPhone 14 (mobile)634110C4-168D-408F-A938-D7FC62222579 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
iPhone (mobile) • 00008030-001064212E85802E • ios iOS 16.3 20D47
macOS (desktop)macos • darwin-x64 • macOS 13.1 22C65 darwin-x64
Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.127
No wireless devices were found.
Run "flutter emulators" to list and start any available device emulators.
(E.g., flutter emulators --launch ios)
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait
for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.

View File

@@ -5,7 +5,7 @@ description: >
publish_to: 'none'
version: 1.10.30
version: 1.10.31
topics:
- speech-recognition
@@ -31,7 +31,7 @@ dependencies:
record: ^5.1.0
url_launcher: ^6.2.6
sherpa_onnx: ^1.10.30
sherpa_onnx: ^1.10.31
# sherpa_onnx:
# path: ../../flutter/sherpa_onnx

View File

@@ -79,16 +79,17 @@ Future<sherpa_onnx.OfflineTts> createOfflineTts() async {
// Example 7
// https://github.com/k2-fsa/sherpa-onnx/releases/tag/tts-models
// https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-melo-tts-zh_en.tar.bz2
modelDir = 'vits-melo-tts-zh_en';
modelName = 'model.onnx';
lexicon = 'lexicon.txt';
dictDir = 'vits-melo-tts-zh_en/dict';
// modelDir = 'vits-melo-tts-zh_en';
// modelName = 'model.onnx';
// lexicon = 'lexicon.txt';
// dictDir = 'vits-melo-tts-zh_en/dict';
// ============================================================
// Please don't change the remaining part of this function
// ============================================================
if (modelName == '') {
throw Exception('You are supposed to select a model by changing the code before you run the app');
throw Exception(
'You are supposed to select a model by changing the code before you run the app');
}
final Directory directory = await getApplicationDocumentsDirectory();

View File

@@ -5,7 +5,7 @@ description: >
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.10.30
version: 1.10.31
environment:
sdk: ">=2.17.0 <4.0.0"
@@ -18,7 +18,7 @@ dependencies:
cupertino_icons: ^1.0.6
path_provider: ^2.1.3
path: ^1.9.0
sherpa_onnx: ^1.10.30
sherpa_onnx: ^1.10.31
# sherpa_onnx:
# path: ../../flutter/sherpa_onnx
url_launcher: 6.2.6