LiveData Conversation Intelligence

Updated

Integrate and use the LiveData Conversation Intelligence extension in your Android or iOS app.

The LiveData Conversation Intelligence extension enables you to quickly add real-time speech transcription and translation features to your app.

This page shows you how to integrate and use the extension in your app.

Understand the tech

The extension is an encapsulation of a cloud real-time speech recognition and translation API. You can integrate its capabilities by passing the specified key and value parameters to the setExtensionProperty method provided by the Video SDK.

Prerequisites

  • Android Studio 4.1 or later.
  • A physical device (not an emulator) running Android 5.0 or later.
  • Integrated the Video SDK and implemented basic video calling, see SDK quickstart.

Project setup

The extension provides a sample project on GitHub:

  1. Clone the repository:

    git clone https://github.com/highras/rtvt-agora-marketplace.git
  2. Open the sample project in Android Studio.

  3. Sync the project with Gradle files.

  4. Connect a real Android device and run the project.

Integrate the extension

Purchase and activate the extension

Visit Extensions Marketplace and purchase the extension. Save the appKey and appSecret used to initialize it.

Add the extension package

  1. Download the extension package from Extensions Marketplace.

  2. Save all .aar files to /app/libs.

  3. Add the Gradle dependency:

    implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])

Enable the extension

RtcEngineConfig config = new RtcEngineConfig();
config.addExtension("agora-iLiveData-filter");
engine = RtcEngine.create(config);
engine.enableExtension("iLiveData", "RTVT", true);

Start transcription and translation

JSONObject jsonObject = new JSONObject();
jsonObject.put("appKey", "80001000");
jsonObject.put("appSecret", "qwerty");
jsonObject.put("srclang", "zh");
jsonObject.put("dstLang", "en");

engine.setExtensionProperty(
  EXTENSION_VENDOR_NAME,
  EXTENSION_AUDIO_FILTER_VOLUME,
  "startAudioTranslation",
  jsonObject.toString()
);

Get transcription and translation results

After successful initialization, the extension returns transcription and translation results through the onEvent callback.

Stop using the extension

engine.setExtensionProperty(
  EXTENSION_VENDOR_NAME,
  EXTENSION_AUDIO_FILTER_VOLUME,
  "closeAudioTranslation",
  "end"
);

Reference