LiveData Conversation Intelligence
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 LiveData Conversation Intelligence extension is an encapsulation of the real-time speech recognition and translation core API on the cloud. You can quickly integrate the LiveData Conversation Intelligence capabilities by passing in the specified key
and value
parameters to the setExtensionProperty method provided in Agora SDK v4.x.
The key parameter of the setExtensionProperty
method corresponds to the name of the API, and the value parameter wraps some or all of the parameters of the API in JSON format. Therefore, by passing in the specified key
and value
parameters, you can call the corresponding cloud API to realize the functions of LiveData Conversation Intelligence.
Prerequisites
Ensure that your development environment meets the following requirements:
- Android Studio 4.1 or later.
- A physical device (not an emulator) running Android 5.0 or later.
-
LiveData Conversation Intelligence is used with Agora Video SDK v4.x.
Refer to the SDK quickstart to integrate Video SDK v4.x and implement basic video calling.
Project Setup
The LiveData Conversation Intelligence extension provides a sample project on GitHub to help you get started quickly.
-
Setup the sample project
To set up and run the LiveData Conversation Intelligence sample project, do the following:
-
Clone the Github repository.
Execute the following command in the terminal:
-
Open the sample project in Android Studio.
-
Sync project with Gradle files.
-
Connect a real Android device (not a simulator) and run the project.
-
-
Test translation and transcription features
Once you have installed the sample project on your device, follow these steps to test the translation and transcription features:
- Start the app. Fill in the channel name in the input box, and click Join.
- Click Start Translation to begin the translation. Speak into the device. You see the transcription and translation on the screen in real-time.
- Click End Translation to end transcription and translation.
- Click End Plug-in to stop using the extension.
Integrate the extension
This section shows you how to integrate the LiveData Conversation Intelligence extension, and call the core API to perform real-time speech recognition and translation.
To integrate the extension in your project:
-
Purchase and activate the extension
Visit the Extensions Marketplace and follow the prompts to purchase the LiveData Conversation Intelligence extension. Save the
appKey
andappSecret
you obtain. You use these values to initialize the extension.
-
Integrate the extension
Refer to the following steps:
-
From the Extensions Marketplace, download the Android extension package of the LiveData Conversation Intelligence extension. Unzip the package and save all
.aar
files to the/app/libs
path in your project folder. -
Open
app/build.gradle
and add the following line underdependencies
:
-
-
Enable the extension
When initializing the Agora Engine, call
addExtension
to load the extension and then callenableExtension
to enable it: -
Start transcription and translation
Prepare a JSON object to pass in values for the
appKey
andappSecret
parameters:Call
setExtensionProperty
with astartAudioTranslation
key -
Get transcription and translation results
After successful initialization, the LiveData Conversation Intelligence extension returns the transcription and translation results using the
onEvent
callback. -
Stop using the extension
Call the
setExtensionProperty
method and specify the key ascloseAudioTranslation
to end the use of the LiveData Conversation Intelligence extension:
Reference
This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product.
API reference
- addExtension in the
RtcEngineConfig
class - enableExtension in the
RtcEngine
class - setExtensionProperty in the
RtcEngine
class