FileDocCategorySizeDatePackage
KeyphraseMetadata.javaAPI DocAndroid 5.1 API1932Thu Mar 12 22:22:10 GMT 2015android.hardware.soundtrigger

KeyphraseMetadata

public class KeyphraseMetadata extends Object
A Voice Keyphrase metadata read from the enrollment application.
hide

Fields Summary
public final int
id
public final String
keyphrase
public final android.util.ArraySet
supportedLocales
public final int
recognitionModeFlags
Constructors Summary
public KeyphraseMetadata(int id, String keyphrase, android.util.ArraySet supportedLocales, int recognitionModeFlags)

        this.id = id;
        this.keyphrase = keyphrase;
        this.supportedLocales = supportedLocales;
        this.recognitionModeFlags = recognitionModeFlags;
    
Methods Summary
public booleansupportsLocale(java.util.Locale locale)

return
Indicates if we support the given locale.

        return supportedLocales.isEmpty() || supportedLocales.contains(locale);
    
public booleansupportsPhrase(java.lang.String phrase)

return
Indicates if we support the given phrase.

        return keyphrase.isEmpty() || keyphrase.equalsIgnoreCase(phrase);
    
public java.lang.StringtoString()

        return "id=" + id + ", keyphrase=" + keyphrase + ", supported-locales=" + supportedLocales
                + ", recognition-modes=" + recognitionModeFlags;