Upgrade Intelligent Speech Interaction 1.0 to 2.0

更新时间:
复制 MD 格式

This guide helps you upgrade to version 2.0 of Intelligent Speech Interaction.

Step 1: Activate the service

First, activate version 2.0 of Intelligent Speech Interaction. See Activate the Service.

The free trial of the speech recognition service supports a maximum of two concurrent channels. If you need higher concurrency, upgrade to the commercial edition. Before you upgrade, review the billing methods. See Pricing.

Step 2: Log on to the console

The Intelligent Speech Interaction console is exclusive to version 2.0 of the service.

Step 3: Create a project

After you create a project in the console, an Appkey is generated. It serves the same purpose as the Appkey in version 1.0 and is a critical parameter for the SDK.

In Intelligent Speech Interaction 1.0, the Appkey was a fixed string provided in the official documentation and shared by all users.

In Intelligent Speech Interaction 2.0, a unique Appkey is generated for each project.

Important

To manage projects that use version 1.0 services, you still need to use the fixed Appkey from the official documentation. After you upgrade to version 2.0, you must reconfigure your project in the console and use the newly generated project Appkey.

Step 4: Configure the model

On the Speech Recognition tab, in the Scenario section, click Switch Scenario.

Configure the features for your project and select the appropriate scenario based on your audio files.

Important

A mismatch between the scenario settings and the audio file's sample rate can cause recognition failures or inaccuracies.

Step 5: Upgrade the SDK

The SDKs for Intelligent Speech Interaction 1.0 and 2.0 differ as follows:

  • Similarity: Both versions are based on persistent websocket connections. The basic process is the same: establish a connection, send a request, send audio data, asynchronously receive results, and close the connection.

  • Difference: The authentication method is different. In version 2.0, you must first obtain an access token to authenticate service requests. See Obtain a token.

  1. Download the SDK sample for your programming language.

    Run the sample code using your AccessKey ID, AccessKey Secret, and Appkey. For detailed instructions, see Run the SDK.

  2. Replace the SDK.

    Replace the Intelligent Speech Interaction 1.0 SDK with the 2.0 SDK, and then refactor the code in your project.

    Service

    Intelligent Speech Interaction 1.0

    Intelligent Speech Interaction 2.0

    Short-sentence recognition

    nls-service-sdk

    nls-sdk-recognizer

    Real-time speech recognition

    nls-realtime-sdk

    nls-sdk-transcriber

    Speech synthesis

    nls-service-sdk

    nls-sdk-tts