CosyVoice iOS 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 bundle.
    • Extract the .tar.gz SDK package and add Release/nuisdk.xcframework to your Xcode project.
    • In Build Phases > Link Binary With Libraries, add nuisdk.xcframework.
    • In General > Frameworks, Libraries, and Embedded Content, set nuisdk.xcframework to Embed & Sign.

Quick start

Open the sample project in Xcode. The sample code is in DashCosyVoiceStreamInputTTSViewController.m. Replace the placeholder API key with your own and run the app to try it out.

Use model cosyvoice-v3-plus in the example.

Reference