Speech to Text
Instance declaration
When you add a Speech to Text block to the workspace, the following instance declaration is automatically inserted into the Python code:
python
asr = ASR(0)
# When there are multiple instances
asr_1 = ASR(1)Parameters
| Name | Kind | Description | Range / Type | Default |
|---|---|---|---|---|
| index | Dropdown option | Instance number (starting from 0) | Integer 0 or greater | 0 |
Set the language
Sets the speech recognition language. It is set automatically even if you do not set it.

Parameters
| Name | Kind | Description | Range / Type | Default |
|---|---|---|---|---|
| unit | Dropdown option | Recognition language code | Codes for the 21 languages the program supports (e.g. 'ko-KR', 'en-US') | - |
Python
python
asr = ASR(0)
asr.lang('ko-KR')Start / stop speech recognition
Starts or stops speech recognition.

Parameters
| Name | Kind | Description | Range / Type | Default |
|---|---|---|---|---|
| unit | Dropdown option | Action | start, stop | - |
Python
python
asr = ASR(0)
# unit = "start"
asr.start()
# unit = "stop"
asr.stop()Speech recognition result
The speech recognition result

Parameters
(none)
Python
python
asr = ASR(0)
asr.result()Speech recognition active state
Returns whether speech recognition is active as true (True) / false (False).

Parameters
(none)
Python
python
asr = ASR(0)
asr.is_active()