Prerequisites
- Set up Flutter development for your target platform. The example app requires Dart 3.4 or later, below 4.0.
- Get an API key. Choose a service endpoint in the same region as the API key. If you use a workspace-specific domain, also get your workspace ID.
Install the SDK
Open Mobile speech SDK selection and download, select Flutter, and download and extract the package.
Copy the extracted SDK directory to packages/aliyun_neonui in your Flutter project and add the local dependency to pubspec.yaml.
flutter pub get, then import the SDK in your Dart file.
Quick start
Run the example app
-
Connect your target device. Run these commands from the extracted SDK directory.
- In the example app, open 百炼(DashScope) from the home screen. Select a service endpoint and enter your API Key. If you use a workspace-specific domain, enter your WorkspaceId as well.
- Open Qwen-Audio-TTS/CosyVoice 双向流式语音合成 and run the example.
example/lib/pages/dashscope/dash_cosy_voice_stream_tts_page.dart in the SDK package.
Use model cosyvoice-v3-plus in the example.