|
| 1 | +# Flutter Speech Recognition |
| 2 | + |
| 3 | + |
| 4 | +### 简介 |
| 5 | + |
| 6 | +本项目展示了如何在 Flutter 应用中使用 Sherpa-ONNX 进行实时语音识别。它基于 Sherpa-ONNX 项目的官方 streaming_asr 示例,但增加了额外的功能和优化。 |
| 7 | + |
| 8 | +### 主要特点 |
| 9 | + |
| 10 | +- **按需加载模型**:语音识别模型可在需要时动态下载,显著减少应用初始大小 |
| 11 | +- **实时识别**:以最小延迟处理语音 |
| 12 | +- **跨平台支持**:同时支持 iOS 和 Android 设备 |
| 13 | + |
| 14 | +### 实现细节 |
| 15 | + |
| 16 | +本示例展示了如何: |
| 17 | +- 在 Flutter 环境中初始化 Sherpa-ONNX 运行时 |
| 18 | +- 实时捕获和处理音频流 |
| 19 | +- 处理模型下载和缓存 |
| 20 | +- 通过用户友好的界面显示识别结果 |
| 21 | +## 应用截图 Screenshots |
| 22 | + |
| 23 | +### 首次启动时的模型下载提示界面 Initial Model Download Prompt |
| 24 | + |
| 25 | + |
| 26 | +### 模型下载进度展示 Model Download Progress |
| 27 | + |
| 28 | + |
| 29 | +### 模型解压缩过程界面 Model Extraction Process |
| 30 | + |
| 31 | + |
| 32 | +### 模型准备完成界面 Model Preparation Complete |
| 33 | + |
| 34 | + |
| 35 | +### 实时语音识别运行界面 Real-time Speech Recognition |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +### 参考资料 |
| 40 | + |
| 41 | +- [Sherpa-ONNX](https://github.com/k2-fsa/sherpa-onnx) |
| 42 | +- [Streaming ASR Example](https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples/streaming_asr) |
| 43 | + |
| 44 | + |
| 45 | +## Introduction |
| 46 | + |
| 47 | +This project demonstrates real-time speech recognition in Flutter applications using the Sherpa-ONNX runtime. It's based on the official streaming_asr example from the Sherpa-ONNX project but extends it with additional features and optimizations. |
| 48 | + |
| 49 | +### Key Features |
| 50 | + |
| 51 | +- **On-demand Model Loading**: Speech recognition models are downloaded dynamically when needed, significantly reducing the app's initial size |
| 52 | +- **Real-time Recognition**: Process speech as it's being spoken with minimal latency |
| 53 | +- **Cross-platform Support**: Works on both iOS and Android devices |
| 54 | + |
| 55 | +## Implementation Details |
| 56 | + |
| 57 | +The example showcases how to: |
| 58 | +- Initialize the Sherpa-ONNX runtime in a Flutter environment |
| 59 | +- Capture and process audio streams in real-time |
| 60 | +- Handle model downloading and caching |
| 61 | +- Display recognition results with a user-friendly interface |
| 62 | + |
| 63 | +## References |
| 64 | + |
| 65 | +- [Sherpa-ONNX GitHub Repository](https://github.com/k2-fsa/sherpa-onnx) |
| 66 | +- [Original Streaming ASR Example](https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples/streaming_asr) |
0 commit comments