All Products
Search
Document Center

Run SDK

Last Updated: Oct 17, 2019

This topic describes how to run an SDK to call Intelligent Speech Interaction services.

Preparations

Before calling Intelligent Speech Interaction services, you must:

Call Intelligent Speech Interaction services (using the Java SDK as an example)

  • Install Maven.

  • Download the SDK package and decompress it.

  • Run code to call the short sentence recognition service.

    Decompress the demo package, and run the mvn package command in the pom directory. An executable JAR package nls-example-recognizer-2.0.0-jar-with-dependencies.jar is generated in the target directory. Copy this JAR package to the target server and run it. The logs/nls.log file is generated in the same directory as that of the JAR package.

  1. java -cp nls-example-recognizer-2.0.0-jar-with-dependencies.jar com.alibaba.nls.client.SpeechRecognizerDemo <app-key> <token> [<url>]
  • Run code to call the real-time speech recognition service.

    Decompress the demo package, and run the mvn package command in the pom directory. An executable JAR package nls-example-transcriber-2.0.0-jar-with-dependencies.jar is generated in the target directory. Copy this JAR package to the target server and run it. The logs/nls.log file is generated in the same directory as that of the JAR package.

  1. java -cp nls-example-transcriber-2.0.0-jar-with-dependencies.jar com.alibaba.nls.client.SpeechTranscriberDemo <app-key> <token> [<url>]
  • Run code to call the speech synthesis service.

    Decompress the demo package, and run the mvn package command in the pom directory. An executable JAR package nls-example-tts-2.0.0-jar-with-dependencies.jar is generated in the target directory. Copy this JAR package to the target server and run it. The logs/nls.log file is generated in the same directory as that of the JAR package.

  1. java -cp nls-example-tts-2.0.0-jar-with-dependencies.jar com.alibaba.nls.client.SpeechSynthesizerDemo <app-key> <token> [<url>]

Next steps

  • Read the sample code in the SDK package to learn about the SDK call process.
  • Learn about the terms of Intelligent Speech Interaction, which helps you better understand this product.
  • Read Before you begin to learn how to call Intelligent Speech Interaction services.