Marsview
Updated
Accurately transcribe a conversation and discover insights.
This guide is provided by Marsview. Agora is planning a documentation upgrade program for all extensions on the marketplace. Please stay tuned.
Marsview Speech Analytics is a cloud-hosted or containerized API service that helps you accurately transcribe a conversation and discover insights. It is packed with models for automatic speech recognition (ASR), intent recognition, tone analysis, and natural language classifiers to uncover topics, keywords, entities, and sentiments.
This extension is provided for Android only.
Prerequisites
Android
Integrate Marsview Speech Analytics
Follow the step-by-step process to implement the Marsview Speech Analytics extension in your application. The sample code below is written in Java.
-
Unzip the delivery package and keep the
.aarfile in your native project. -
Use the extension package
agoramarketplace.marsview.extension. -
You receive an API key and secret when you create a project with Marsview through Agora.
-
Import
agoramarketplace.marsview.extension.ExtensionManager. -
Add the credentials to your file:
private final String API_KEY = "84e**** **** **** **** 4823470a7876"; private final String SECRET_KEY = "GKHJ**** **** ****-8W57GXJ"; private final String USER_ID = "yourcustomerid@agora.io"; -
Implement the interface
io.agora.rtc2.IMediaExtensionObserver. -
Enable the extension before starting Video SDK streaming:
mRtcEngine.enableExtension( ExtensionManager.EXTENSION_VENDOR_NAME, ExtensionManager.EXTENSION_AUDIO_FILTER_NAME, true ); -
Pass the API credentials to the extension for authentication:
mRtcEngine.setExtensionProperty( ExtensionManager.EXTENSION_VENDOR_NAME, ExtensionManager.EXTENSION_AUDIO_FILTER_NAME, "API_KEY", API_KEY ); mRtcEngine.setExtensionProperty( ExtensionManager.EXTENSION_VENDOR_NAME, ExtensionManager.EXTENSION_AUDIO_FILTER_NAME, "SECRET_KEY", SECRET_KEY ); mRtcEngine.setExtensionProperty( ExtensionManager.EXTENSION_VENDOR_NAME, ExtensionManager.EXTENSION_AUDIO_FILTER_NAME, "USER_ID", USER_ID ); -
Disable the transcription service when it is no longer needed:
mRtcEngine.enableExtension( ExtensionManager.EXTENSION_VENDOR_NAME, ExtensionManager.EXTENSION_AUDIO_FILTER_NAME, false ); -
Marsview currently emits two main events:
connectionState: describes the authentication status of the user. If the credentials do not match the values issued for the extension, the connection fails.transactionId: used to fetch transcribed data from Marsview.
Run the demo
@Override
public void onEvent(String vendor, String extension, String key, String value) {
Log.d(TAG, "\nVendor: " + vendor + "\nExtension:" + extension + "\nKey:" + key + "\nValue:" + value);
if (vendor == "Marsview" && extension == "TranscriptProvider") {
if (key == "transactionId") {
// Save transaction id for future purposes
} else if (key == "connectionState") {
try {
JSONObject reader = new JSONObject(value);
String connectionState = reader.getString("connection-state");
if (connectionState != "true") {
// provide proper api key, secret key, and user ID
}
} catch (Exception e) {}
}
}
}Reference
Refer to Marsview Speech Analytics metadata docs.
Support URL: https://docs.marsview.ai/contact-support.
