# Speech Recognizer

## Properties

`Default Language`: Set component to recognize text and speak in this language. Can be changed in blocks.

## Blocks

### Functions

#### Listen

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MYddcKQfCACzAt9Tu_0%2F-MYde3980WbyD9Lx2ej5%2FScreen%20Shot%202021-04-19%20at%2011.23.38%20AM.png?alt=media\&token=7f8503a3-14ee-444b-9c1a-e982782756e8)

Outputs

| Name  | Data Type | Data                                          |
| ----- | --------- | --------------------------------------------- |
| error | text      | if error, returns error; else, returns `null` |
| value | text      | text of speech that was recognized            |

#### Listen with Partial Result

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MYddcKQfCACzAt9Tu_0%2F-MYdeDLNS-62kZLBiAHL%2FScreen%20Shot%202021-04-19%20at%2011.24.20%20AM.png?alt=media\&token=d8ac8a49-eaf5-4768-b0a5-791837a8d6e9)

Outputs

| Name           | Data Type | Data                                          |
| -------------- | --------- | --------------------------------------------- |
| error          | text      | if error, returns error; else, returns `null` |
| partial result | text      | text of speech that was recognized            |

### Properties

#### Set/Get Default Language

Set default language to item from drop-down menu. Can also use [Text](https://docs.thunkable.com/snap-to-place/text) block or [variable](https://docs.thunkable.com/snap-to-place/variables) to set language.

Get current language of Speech Recognizer component.

![](https://689802330-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MYddcKQfCACzAt9Tu_0%2F-MYdeLnF_u9KFW2jgAmm%2FScreen%20Shot%202021-04-19%20at%2011.24.54%20AM.png?alt=media\&token=709b22f4-fbcc-4ae5-b3d2-bae8bf88175e)
