Search in sources :

Example 1 with CreateIDEnrollment

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

the class SpeakerEnrollment 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_enroll));
            localRequest.execute();
            new CreateIDEnrollment(mic, apiKey, profileId, shortAudio, mic.getFile()).stream();
        } else {
            onError(Speaker.ERROR_FILE);
        }
    } else {
        if (DEBUG) {
            MyLog.i(CLS_NAME, "onFileWriteComplete: mic interrupted");
        }
    }
}
Also used : CreateIDEnrollment(ai.saiy.android.cognitive.identity.provider.microsoft.http.CreateIDEnrollment) LocalRequest(ai.saiy.android.service.helper.LocalRequest)

Aggregations

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