Prerequisites
- Obtain and configure an API Key. Do not hardcode long-term API Keys in mobile apps. We recommend that your app server generate a temporary API Key and then distribute it to the client.
-
Download the latest SDK integration package. After extracting it, copy
entry/libs/neonui.harto theentry/libsfolder of your app project, and add the dependency inentry/oh-package.json5:To integrate through HarmonyOS C++ interfaces, you can use the dynamic libraries in thenative/libsfolder and the header files in thenative/includefolder of the integration package. -
Declare the network and microphone permissions in your app's
module.json5, and request the microphone permission at runtime.reason_internetandreason_microphoneare example resource names; define the corresponding descriptions in your app resources.
QuickStart
Use DevEco Studio to open the sample project in the integration package. The sample page is located at entry/src/main/ets/pages/dashscope/DashFunAsrSpeechTranscriberPage.ets. Configure an API Key and you can run it.
Use model qwen-audio-3.1-asr-flash-streaming in the example.