Search in sources :

Example 6 with Qubit

use of ai.saiy.android.processing.Qubit in project Saiy-PS by brandall76.

the class CommandSpellLocal method setOutcomeParams.

/**
 * Set the parameters to the {@link Outcome}
 *
 * @param ctx     the application context
 * @param sl      the {@link SupportedLanguage}
 * @param toSpell to word to spell
 */
private void setOutcomeParams(@NonNull final Context ctx, @NonNull final SupportedLanguage sl, @NonNull final String toSpell) {
    if (DEBUG) {
        MyLog.v(CLS_NAME, "spell: " + toSpell);
    }
    final Qubit qubit = new Qubit();
    qubit.setSpellContent(toSpell);
    outcome.setQubit(qubit);
    final String separated = getSeparated(toSpell);
    outcome.setUtterance(getResponseUtterance(ctx, sl, separated));
    entangledPair.setToastContent(separated);
    outcome.setEntangledPair(entangledPair);
    outcome.setOutcome(Outcome.SUCCESS);
}
Also used : Qubit(ai.saiy.android.processing.Qubit)

Aggregations

Qubit (ai.saiy.android.processing.Qubit)6 UtilsString (ai.saiy.android.utils.UtilsString)3 CommandTranslateValues (ai.saiy.android.command.translate.CommandTranslateValues)2 EntangledPair (ai.saiy.android.processing.EntangledPair)2 Speaker (ai.saiy.android.cognitive.identity.provider.microsoft.Speaker)1 ProfileItem (ai.saiy.android.cognitive.identity.provider.microsoft.containers.ProfileItem)1 TranslationLanguageBing (ai.saiy.android.command.translate.provider.bing.TranslationLanguageBing)1 TranslationLanguageGoogle (ai.saiy.android.command.translate.provider.google.TranslationLanguageGoogle)1 Outcome (ai.saiy.android.processing.Outcome)1 SaiyAccount (ai.saiy.android.user.SaiyAccount)1 SaiyAccountList (ai.saiy.android.user.SaiyAccountList)1