All Products
Search
Document Center

Alibaba Cloud Model Studio:CosyVoice HarmonyOS SDK

Last Updated:Nov 23, 2026

Prerequisites

  1. Obtain and configure an API key. Do not hardcode a long-lived API key in a mobile app. We recommend generating a temporary API key on your application server and sending it to the client.

  2. Download the latest SDK package. Extract the package, copy entry/libs/neonui.har to the entry/libs directory of your application, and add the dependency to entry/oh-package.json5:

{
  "dependencies": {
    "neonui": "file:libs/neonui.har"
  }
}

Quick start

Open the sample project from the SDK package in DevEco Studio. The sample page is entry/src/main/ets/pages/dashscope/DashCosyVoiceStreamTtsPage.ets. Configure an API key and run the project.

Use model cosyvoice-v3-plus in the example.

Reference