Skip to content

NICEElevateAI/ElevateAIJavaSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ElevateAI Java SDK

ElevateAI provides an API for Speech-to-text (ASR), behavioral analysis and sentiment analysis of voice interactions.

Example

  1. Signup and retrieve API token from ElevateAI.
  2. Declare an interaction. Provide a URI if you want ElevateAI to download the interaction via a Public URI.
  3. Retrieve Interaction ID from JSON response and store.
  4. Upload a file.
  5. Check status every 30 seconds using Interaction ID until status returns 'processed' or an error status.
  6. Retrieve results - phrase-by-phrase transcript, punctuated transcript, and AI results.
import elevateAi.client.Client;

        ... ... 
        var cli = Client.newInstance(baseUrl, apiToken);

        // Step 2,3
        var it = cli.declare("en-us", "default", "highAccuracy", null, null, false);

        // Step 4
        var uploadOk = cli.upload(it, "d:/dev/elevateai-cli/sample-media/media.wav");

        // Step 5
        while (true){
            var s = cli.status(it);
            if("processed".equals(s))
                break;
            Thread.sleep(60000);
        }
        
        var tx = cli.transcripts(it, true);
        var ai = cli.aiResults(it);
        System.out.println(String.format("Interaction [%s]: \nTranscripts: %s, \nAiResults: %s", it, tx, ai));