# Sugar ASR Programming

#### Hardware Wiring

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/asr_robotbit_edu.png)

### Programming Instructions

#### Microbit MakeCode

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/mcbanner.png)

#### Import ASR Extension

#### Search "sugar" in the search bar.

![](https://kittenbothk.readthedocs.io/en/latest/_images/sugar_search.gif)

#### You can also search the following link.

Sugar extension: <https://github.com/KittenBot/pxt-sugar>

#### Sugar ASR Module Blocks

![](https://kittenbothk.readthedocs.io/en/latest/_images/asr_sugar_1.png)

#### Voice Recognition Sample Program

{% embed url="<https://makecode.microbit.org/_RCWckUH0bcXe>" %}

[Sample Program Download](https://makecode.microbit.org/_RCWckUH0bcXe)

```
    Note: Adding a pause between TTS commands will prevent the speech overlapping.
```

Program Instructions:

#### Operating Instructions:

#### 1. The module will read out the firmware version after powering on.

#### 2. Wake up the module by saying one of these awake commands, the module replies ‘Uh huh’ when a wake-up command is heard.

Wake-up Commands:

1. Hey Sugar
2. Hello KittenBot
3. Hello Kitty

#### 3. Say the commands, module replies ‘OK’ when a command is heard.

#### 4. After idling for 10 seconds, the module will go into sleep mode after saying “Uh oh”, use a wake-up command to wake the module

#### 5. Press A or B to make the module speak the corresponding text.

#### Demo Video

{% embed url="<https://www.youtube.com/watch?v=nvV9uM8g3gs>" %}

#### FutureBoard KittenBlock Programming Instructions

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/kbbanner.png)

#### Voice Recognition Sample Program

![](https://kittenbothk.readthedocs.io/en/latest/_images/asr_code2.png)

Program Instructions:

#### Operating Instructions:

#### 1. The module will read out the firmware version after powering on.

#### 2. Wake up the module by saying one of these awake commands, the module replies ‘Uh huh’ when a wake-up command is heard.

Wake-up Commands:

1. Hey Sugar
2. Hello KittenBot
3. Hello Kitty

#### 3. Say the commands, module replies ‘OK’ when a command is heard.

#### 4. After idling for 10 seconds, the module will go into sleep mode after saying “Uh oh”, use a wake-up command to wake the module

#### TTS Sample Program

![](https://kittenbothk.readthedocs.io/en/latest/_images/asr_code4.png)

Program Instructions:

#### 1. Press A or B to make the module speak the corresponding text.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sharinghub-eng.kittenbot.hk/airelated/asr/coding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
