Search in sources :

Example 1 with ValidateID

use of ai.saiy.android.cognitive.identity.provider.microsoft.http.ValidateID in project Saiy-PS by brandall76.

the class SpeakerIdentification method onFileWriteComplete.

@Override
public void onFileWriteComplete(final boolean success) {
    if (DEBUG) {
        MyLog.i(CLS_NAME, "onFileWriteComplete: " + success);
    }
    if (!mic.isInterrupted()) {
        if (success) {
            final LocalRequest localRequest = new LocalRequest(mic.getContext());
            localRequest.setSupportedLanguage(sl);
            localRequest.setAction(LocalRequest.ACTION_SPEAK_ONLY);
            localRequest.setTTSLocale(SPH.getTTSLocale(mic.getContext()));
            localRequest.setVRLocale(SPH.getVRLocale(mic.getContext()));
            localRequest.setUtterance(SaiyResourcesHelper.getStringResource(mic.getContext(), sl, R.string.vocal_notify_verify));
            localRequest.execute();
            new ValidateID(mic, sl, apiKey, profileId, shortAudio, mic.getFile()).stream();
        } else {
            onError(Speaker.ERROR_FILE);
        }
    } else {
        if (DEBUG) {
            MyLog.i(CLS_NAME, "onFileWriteComplete: mic interrupted");
        }
    }
}
Also used : LocalRequest(ai.saiy.android.service.helper.LocalRequest) ValidateID(ai.saiy.android.cognitive.identity.provider.microsoft.http.ValidateID)

Aggregations

ValidateID (ai.saiy.android.cognitive.identity.provider.microsoft.http.ValidateID)1 LocalRequest (ai.saiy.android.service.helper.LocalRequest)1