# 錄音與播放

### MakeCode編程教學

在MakeCode打開專案，點擊擴展一頁。

<figure><img src="https://kittenbothk.readthedocs.io/en/latest/_images/16-1.png" alt=""><figcaption></figcaption></figure>

在搜尋欄輸入koi 2。

<figure><img src="/files/v8PGKqCshXiZsiXziuOs" alt=""><figcaption></figcaption></figure>

加載成功後，積木欄會新增koi2的積木。

<figure><img src="/files/nGf4RzfogJMXUu8gAZwE" alt=""><figcaption></figcaption></figure>

### 編程積木

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FQAKH0swJ9etd62AIfV4u%2Fimage.png?alt=media&#x26;token=71c6751c-de4c-42d1-8f44-63328568e674" alt=""><figcaption></figcaption></figure>

### 參考程式

{% hint style="info" %}
錄音與播放功能需要高速Micro SD卡(class 10或以上)，KOI原廠不配備SD卡，有需要的請自行預備。
{% endhint %}

{% hint style="info" %}
Armourbit用家請使用初始化Armourbit積木。
{% endhint %}

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FPGyECwlPd2M3JqUBLDfO%2Fimage.png?alt=media&#x26;token=662ace3f-a8eb-4fbf-8a10-1d9643c88b1e" alt=""><figcaption></figcaption></figure>

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

[參考程式](https://makecode.microbit.org/_Ug9RsvXpe8fg)

#### 程式解說

1. 按下B鍵，KOI會進行3秒的錄音並儲存為testing.wav。
2. 按下A鍵，KOI會播放SD卡中名為testing.wav的檔案。


---

# 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.kittenbot.hk/airelated/koi2/koi2makecode/recandplay.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.
