# Class RecognitionOptions

java.lang.Object
com.codename1.media.RecognitionOptions

public final class RecognitionOptions extends java.lang.Object
Tuning knobs for `SpeechRecognizer`. All fields are optional; the platform picks sensible defaults for anything left unset.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RecognitionOptions()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getLanguageTag()`
  `int`
  `getMaxResults()`
  `boolean`
  `isContinuous()`
  `boolean`
  `isPartialResults()`
  `RecognitionOptions`
  `setContinuous(boolean c)`
  Whether recognition should keep listening across silences.
  `RecognitionOptions`
  `setLanguageTag(String tag)`
  BCP-47 language tag (e.g. `"en-US"`, `"de-DE"`, `"fr-CA"`).
  `RecognitionOptions`
  `setMaxResults(int n)`
  Maximum alternative transcripts requested per final result.
  `RecognitionOptions`
  `setPartialResults(boolean partial)`
  Whether the callback should receive partial transcripts as the user speaks.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RecognitionOptions

    public RecognitionOptions()

- ## Method Details

  - ### setLanguageTag

    public RecognitionOptions setLanguageTag(String tag)
    BCP-47 language tag (e.g. `"en-US"`, `"de-DE"`, `"fr-CA"`). Defaults to `"en-US"`.

  - ### getLanguageTag

    public String getLanguageTag()

  - ### setPartialResults

    public RecognitionOptions setPartialResults(boolean partial)
    Whether the callback should receive partial transcripts as the user speaks. Defaults to `true`.

  - ### isPartialResults

    public boolean isPartialResults()

  - ### setContinuous

    public RecognitionOptions setContinuous(boolean c)
    Whether recognition should keep listening across silences. Defaults to `false` (single-utterance).

  - ### isContinuous

    public boolean isContinuous()

  - ### setMaxResults

    public RecognitionOptions setMaxResults(int n)
    Maximum alternative transcripts requested per final result. iOS supports up to 10; Android up to ~5 depending on the vendor. Defaults to 1.

  - ### getMaxResults

    public int getMaxResults()