Week 15 Interface and Application Programming
Group assignment
Week 15 Chaihuo group assignment.
Individual assignment
Based on my final project, I used Cursor for the ASR development.
Voice-to-text ASR (Automated Speech Recognition)
Connect device to Wi-Fi



Provide the Wi-Fi account and password to generate the firmware, and burn the firmware.

Testing
Testing: when the display shows green, it means the device is connected to Wi-Fi.
- Green: connected
- Red: disconnected
- Yellow: connecting

How to change the Wi-Fi configuration
Step 1
Revise the Wi-Fi information in include/secrets.h.
Step 2
Burn the firmware again.

Record voice and recognize with FunASR
The mic collects audio and converts it to text with FunASR in the cloud, and saves the data to the database.
Steps:
2.1 Find the IP address of the Mac.
2.2 Install ASR on the Mac and start the service.
2.3 Use ESP32-C3 to record voice and recognize.

Testing
Run the command in the terminal:
cd "/Users/jerryrong/Fablab/Final project/Final- coding"
python3 -m platformio device monitor
When the display shows green, the Wi-Fi connection is good.
In the terminal, type r to start testing.
| Indicator | Terminal output |
|---|---|
| Light blue | [REC] Recording 3s... |
| Yellow | [ASR] POST http://192.168.3.153:8765/asr... |
| Green | [ASR] Text: the content I said |


There was an error — it did not return the content I said, so I sent the screenshot above to Cursor to debug.
It recovered, but a new problem came up: "Malloc failed".

I sent it to Cursor to debug again. I learned that "Malloc failed" means there is no more storage. Cursor sent me new firmware and I ran it again.

It works again. Attach with video "ASR Testing":
