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:
-
Clone the repository:
git clone https://github.com/highras/rtvt-agora-marketplace.git -
Open the sample project in Android Studio.
-
Sync the project with Gradle files.
-
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
-
Download the extension package from Extensions Marketplace.
-
Save all
.aarfiles to/app/libs. -
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"
);