CosyVoice Android SDK

Updated at:

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 SDK and run the sample code:
    • Download the latest SDK package.
    • Unzip the package. The AAR-format SDK is in app/libs — add it to your project dependencies.
      For Android C++ integration, get the shared libraries from android_libs and the headers from android_include inside the ZIP.

Quick start

Open the project in Android Studio. The sample code is in DashCosyVoiceStreamTtsActivity.java — replace the API key with your own to try the feature.

Use model cosyvoice-v3-plus in the example.

Reference