Add By URL
Sample Java Code for sending audio URL link to Nexiwave SpeechIndexing
(all required Java classes can be downloaded from here: http://nexiwave.com/static/api/sample/java/Client.Sample/lib/):
SpeechIndexingStub.Add req = new SpeechIndexingStub.Add();
SpeechIndexingStub.AuthData authData = new SpeechIndexingStub.AuthData();
authData.setEmail(email);
authData.setPasswd(passwd);
req.setAuthData(authData);
AudioUploadData uploadData = new AudioUploadData();
uploadData.setMediaURL("http://www.mycompany.com/audio/123.wav");
req.setData(uploadData);
SpeechIndexingStub stub = new SpeechIndexingStub(
"https://api.nexiwave.com/SpeechIndexing/services/SpeechIndexing");
// make the call:
AddResponse resAdd = stub.add(req);
// obtain response:
long newRecordingId = resAdd.get_return();
System.out.println("add result " + newRecordingId);
if (newRecordingId <= 0)
throw new RuntimeException("Hmm, invalid recording id returned.");
