# Speech recognition

An action block that records your speech and transcribes the spoken word into text.

The fiber will pause until the user stops speaking.

The result of the speech recognition are assigned as two arrays, both with the same lengths. The elements of the spoken texts array contain alternative interpretations, with the first element being the most likely interpretation. An array of confidence scores may be assigned, where each element holds a confidence score for the interpretation. A score close to 1 indicate high confidence, 0 low confidence or -1 for score not available.

Not all devices come shipped with an speech recognition engine, try installing Google Voice Search if an UnsupportedOperationException failure occur. If a failure is due to the language not being supported then ensure the engine has it installed, e.g. in Google (app) settings.

## Input arguments

- Language — language spoken, default is the device language.
- Model — model of interpretation, default is Free form.
- Maximum silence duration — Duration of silence to consider as end of speech, default depends on engine (~0.5 second).
- Offline — whether to prevent network requests and only use on-device recognition, if supported by engine.

## Output variables

- Spoken texts — variable to assign an array of interpretation alternatives.
- Confidence scores — variable to assign an array of interpretation confidence scores.