Skip to content

Voice Interaction Hat for MaESP ESP32

Introduction

Voice Interaction Hat is a dual-microphone expansion board for MaESP ESP32, it is designed for voice applications, with this module you can add voice-related functions to your ESP32/MakePython projects, such as speech recognition, invoice recording/controlling... It is based on WM8960, a low-power stereo codec, and 2 microphones on both sides of the board for collecting sounds.

Model:VI3W1MA

Voice_Interaction_Hat_for_MaESP ESP32_101.jpg

Features

  • Dual-Microphones
  • Programmable Navigator, normally for Volume controlling
  • Stereo Codec with Class D Speaker Driver
  • Onboard SD card socket for invoice recording
  • Onboard earphone connector

Usage

Hardware

1.Voice Interaction Hat for MakePython can’t work independently because it is not equipped with an MCU, it need work with MaESP ESP32(Wrover), also can work with other controller connection pins. You can get the Makepython ESP32(Wrover) module from here MaESP ESP32(Wrover)

2.The connection between the controller and the module can be made according to the pin description when other microcontrollers are used.

Voice_Interaction_Hat_for_MaESP ESP32_102.jpg

3.Combined with MaESP ESP32, insert the SD card, plug in the cable for power supply.

Arduino IDE preparations

1.Install Arduino IDE.

2.Install ESP32-supported packages after the Arduino IDE installed. The detailed installation tutorial can be viewed here: Arduino_ESP32

Select “File>Preferences>settings>Additional Boards Manager URLs” to fill the link: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json

Voice_Interaction_Hat_for_MaESP ESP32_103.jpg

  • Click “Tools>Board>Boards Manager” to search for and install the ESP32 library.

Please using the version of ESP32 board as follows.

Voice_Interaction_Hat_for_MaESP ESP32_104.jpg

3.Install the Adafruit_GFX.h library.

Click “Tools> Manager Libraries” to search for and install Adafruit GFX library.

Voice_Interaction_Hat_for_MaESP ESP32_105.jpg

4.Install the Adafruit_SSD1306.h library.

Click “Tools> Manager Libraries” to search for and install Adafruit_SSD1306 library.

Voice_Interaction_Hat_for_MaESP ESP32_106.jpg

Record Demo

1.Download the codes from github, open the code Project_ESP32-Voice-Interaction/example/record/record.ino with Arduino.

2.Select Tools-> Board-> ESP32 Wrover Module , and Tools-> Port-> COM… .

Voice_Interaction_Hat_for_MaESP ESP32_107.jpg

3.Verify and upload the code.

Voice_Interaction_Hat_for_MaESP ESP32_108.jpg

4.Make sure you've inserted the SD card, otherwise it might not work.

5.Reset ESP32, press the left button to start recording, recording will end at 5S.

6.If you want to modify the recording length, you can modify it in the program.

WM8960_Record(filename, i2s_buffer, record_time);  //record_time is the recording length 

7.After the recording is over, the player will play the recording.

Play Demo

1.Prepare the music file and copy it to the SD card.

2.Open the code Project_ESP32-Voice-Interaction/example/adc/adc.ino with Arduino.

3.Select Tools-> Board-> ESP32 Wrover Module , and Tools-> Port-> COM… .

4.Fill the name of the music that will be played in the code.

 WM8960_Play("/speak.wav", i2s_buffer);  //"speak.wav" is the name of music  

5.Verify and upload the code. 6.The player will be playing the music loop.

Record device

Voice_Interaction_Hat_for_MaESP ESP32_109.jpg

  • Open the code Project_ESP32-Voice-Interaction/example/ESP32_Record_Play/ESP32_Record_Play.ino with Arduino.
  • Select Tools-> Board-> ESP32 Wrover Module , and Tools-> Port-> COM… .
  • Verify and upload the code.
  • Turn up and down to select the menu, press to confirm the selection.

Voice_Interaction_Hat_for_MaESP ESP32_110.jpg

  • After entering the recording function, you need to keep pressing the button until the recording ends.
  • The playback function can display two recorded files, one is the current recorded completed, and the other is the last recorded file.

Voice_Interaction_Hat_for_MaESP ESP32_112.jpg

FAQ

You can list your question here or contact techsupport@makerfabs.com for technology support. Detailed descriptions of your question will be helped to solve your question.

Resource