Difference between revisions of "Voice Interaction Hat for MakePython"

From MakerFabsWiki
Jump to: navigation, search
(Prepare before used)
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''''Attention!!! This product has not been released.''''' <br>
 
  
 
==About the product==
 
==About the product==
 
===Introduce===
 
===Introduce===
Voice Interaction Hat for MakePython integrates wm8960 chip, speaker, and microphone together, and works with MakePython ESP32. MakePython ESP32 acts as a controller to interact with the audio codec chip wm8960 through i2s to realize functions such as recording sound and playing audio. At the same time, the board is equipped with an SD card module, which can save audio in the card, or read the audio in the card for playback.<br>
+
Voice Interaction Hat is a dual-microphone expansion board for Makepython, 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.<br>
'''Model: [https://www.makerfabs.com/wiki/index.php?title=Main_Page xxx]'''<br>
+
'''Model: [https://www.makerfabs.com/voice-interaction-hat-for-makepython.html VI3W1MA]'''<br>
 
[[File:Voice Interaction Hat for MakePython 101.jpg|500px]]<br>
 
[[File:Voice Interaction Hat for MakePython 101.jpg|500px]]<br>
  
 
===Features===
 
===Features===
*WM8960, the low power, high-quality stereo CODEC.<br>
+
*Dual-Microphones<br>
*3W power speaker.<br>
+
*Programmable Navigator, normally for Volume controlling<br>
*Two ADMP401 MEMs microphone.<br>
+
*Stereo Codec with Class D Speaker Driver<br>
*Maximum voice capture distance: 3m.<br>
+
*Onboard SD card socket for invoice recording<br>
*Audio jack on board.<br>
+
*Onboard earphone connector<br>
*Support Micro SD Card.<br>
 
  
 
===Diagram===
 
===Diagram===
 
[[File:Voice Interaction Hat for MakePython 102.jpg|500px]]<br>
 
[[File:Voice Interaction Hat for MakePython 102.jpg|500px]]<br>
  
===Pins Description===
 
  
==Prepare before used==
+
 
 +
==Preparation before using==
 
===Hardware===
 
===Hardware===
Voice Interaction Hat for MakePython can’t work independently because it is not equipped with an MCU, it need work with MakePython ESP32(Wrover), also can work with other controller connection pins.<br>
+
'''1.''' Voice Interaction Hat for MakePython can’t work independently because it is not equipped with an MCU, it need work with MakePython ESP32(Wrover), also can work with other controller connection pins. You can get the Makepython ESP32(Wrover) module from here '''[https://www.makerfabs.com/makepython-esp32.html MakePython ESP32(Wrover)]'''<br>
The connection between the controller and the module can be made according to the pin description when other microcontrollers are used.<br>
+
'''2.''' The connection between the controller and the module can be made according to the pin description when other microcontrollers are used.<br>
You can get the Makepython ESP32(Wrover) module from here '''[https://www.makerfabs.com/makepython-esp32.html MakePython ESP32(Wrover)]'''<br>
+
:[[File:Voice Interaction Hat for MakePython 104.jpg|500px]]<br>
 +
'''3.''' Combined with MakePython ESP32, insert the SD card, plug in the cable for power supply.<br>
  
 
===Software===
 
===Software===
if you have not installed the package for ESP32 after Arduino IDE installed, it will need to be installed and the required library files need to be installed too. The detailed installation tutorial can be viewed here: '''[https://github.com/Makerfabs/Makerfabs_FAQ/tree/master/Arduino_ESP32 Arduino_ESP32]'''
+
'''1.''' Install Arduino IDE.<br>
 +
'''2.''' Install ESP32-supported packages after the Arduino IDE installed. The detailed installation tutorial can be viewed here: '''[https://github.com/Makerfabs/Makerfabs_FAQ/tree/master/Arduino_ESP32 Arduino_ESP32]'''<br>
 +
:*Select “File>Preferences>settings>Additional Boards Manager URLs” to fill the link: ''https://dl.espressif.com/dl/package_esp32_index.json''<br>
 +
:[[File:Voice Interaction Hat for MakePython 105.jpg|500px]]<br>
 +
:*Click “Tools>Board>Boards Manager” to search for and install the ESP32 library.<br>
 +
:[[File:Voice Interaction Hat for MakePython 106.jpg|500px]]<br>
 +
'''3.''' Install the Adafruit_GFX.h library.<br>
 +
:*Click “Tools> Manager Libraries” to search for and install Adafruit GFX library.<br>
 +
:[[File:Voice Interaction Hat for MakePython 107.jpg|500px]]<br>
 +
'''4.''' Install the Adafruit_SSD1306.h library.<br>
 +
:*Click “Tools> Manager Libraries” to search for and install Adafruit_SSD1306 library.<br>
 +
:[[File:Voice Interaction Hat for MakePython 108.jpg|500px]]<br>
 +
 
 
==Record Demo==
 
==Record Demo==
*Open the code '''xxx''' with Arduino.<br>
+
 
*Select '''Tools-> Board-> ESP32 Wrover Module''', and '''Tools-> Port-> COM…'''.<br>
+
'''1.''' Download the codes from [https://github.com/Makerfabs/Project_ESP32-Voice-Interaction github], open the code ''Project_ESP32-Voice-Interaction/example/record/record.ino'' with Arduino.<br>
*Verify and upload the code.<br>
+
'''2.''' Select '' Tools-> Board-> ESP32 Wrover Module '', and ''Tools-> Port-> COM… ''.<br>
 +
:[[File:Voice Interaction Hat for MakePython 111.jpg|500px]]<br>
 +
'''3.''' Verify and upload the code.<br>
 +
:[[File:Voice Interaction Hat for MakePython 112.jpg|500px]]<br>
 +
'''4.''' Make sure you've inserted the SD card, otherwise it might not work.<br>
 +
'''5.''' Reset ESP32, press the left button to start recording, recording will end at 5S.<br>
 +
'''6.''' If you want to modify the recording length, you can modify it in the program.<br>
 +
<pre>WM8960_Record(filename, i2s_buffer, record_time);  //record_time is the recording length </pre>
 +
'''7.''' After the recording is over, the player will play the recording.<br>
  
 
==Play Demo==
 
==Play Demo==
*Open the code '''xxx''' with Arduino.<br>
+
'''1.''' Prepare the music file and copy it to the SD card.<br>
*Select '''Tools-> Board-> ESP32 Wrover Module''', and '''Tools-> Port-> COM…'''.<br>
+
'''2.''' Open the code ''Project_ESP32-Voice-Interaction/example/adc/adc.ino'' with Arduino.<br>
*Verify and upload the code.<br>
+
'''3.''' Select '' Tools-> Board-> ESP32 Wrover Module '', and '' Tools-> Port-> COM… ''.<br>
 +
'''4.''' Fill the name of the music that will be played in the code.
 +
<pre> WM8960_Play("/speak.wav", i2s_buffer);  //"speak.wav" is the name of music  </pre>
 +
'''5.''' Verify and upload the code.<br>
 +
'''6.''' The player will be playing the music loop.<br>
  
 
==Record device==
 
==Record device==
[[File:Voice Interaction Hat for MakePython 103.jpg|500px]]<br>
+
[[File:Voice Interaction Hat for MakePython 109.jpg|500px]]<br>
*Combined with MakePython ESP32, insert the SD card, plug in the cable for power supply.
+
 
*Open the code '''xxx''' with Arduino.<br>
+
*Open the code ''Project_ESP32-Voice-Interaction/example/ESP32_Record_Play/ESP32_Record_Play.ino'' with Arduino.<br>
*Select '''Tools-> Board-> ESP32 Wrover Module''', and '''Tools-> Port-> COM…'''.<br>
+
*Select '' Tools-> Board-> ESP32 Wrover Module '', and ''Tools-> Port-> COM… ''.<br>
 
*Verify and upload the code.<br>
 
*Verify and upload the code.<br>
 
*Turn up and down to select the menu, press to confirm the selection.<br>
 
*Turn up and down to select the menu, press to confirm the selection.<br>
 +
:[[File:Voice Interaction Hat for MakePython 114.jpg|500px]]<br>
 
*After entering the recording function, you need to keep pressing the button until the recording ends.<br>
 
*After entering the recording function, you need to keep pressing the button until the recording ends.<br>
 
*The playback function can display two recorded files, one is the current recorded completed, and the other is the last recorded file.<br>
 
*The playback function can display two recorded files, one is the current recorded completed, and the other is the last recorded file.<br>
[[File:Voice Interaction Hat for MakePython 104.jpg|500px]]<br>
+
:[[File:Voice Interaction Hat for MakePython 110.jpg|500px]]<br>
  
 
==F&Q==
 
==F&Q==
Line 53: Line 77:
  
 
==Recources==
 
==Recources==
*'''[https://www.makerfabs.com/wiki/index.php?title=Main_Page Record Demo code]'''<br>
+
 
*'''[https://www.makerfabs.com/wiki/index.php?title=Main_Page Play Demo code]'''<br>
+
*'''Github: [https://github.com/Makerfabs/Project_ESP32-Voice-Interaction/tree/master/example/ESP32_Record_Play Project_ESP32-Voice-Interaction]'''<br>
*'''Github: [https://www.makerfabs.com/wiki/index.php?title=Main_Page xxx]'''<br>
+
*[https://www.makerfabs.com/wiki/images/e/e3/Voice_Interaction_Hat_for_MakePython_v2.3.pdf Schematic]

Latest revision as of 08:27, 25 June 2021

About the product

Introduce

Voice Interaction Hat is a dual-microphone expansion board for Makepython, 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 MakePython 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

Diagram

Voice Interaction Hat for MakePython 102.jpg


Preparation before using

Hardware

1. Voice Interaction Hat for MakePython can’t work independently because it is not equipped with an MCU, it need work with MakePython ESP32(Wrover), also can work with other controller connection pins. You can get the Makepython ESP32(Wrover) module from here MakePython 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 MakePython 104.jpg

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

Software

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

Voice Interaction Hat for MakePython 105.jpg
  • Click “Tools>Board>Boards Manager” to search for and install the ESP32 library.
Voice Interaction Hat for MakePython 106.jpg

3. Install the Adafruit_GFX.h library.

  • Click “Tools> Manager Libraries” to search for and install Adafruit GFX library.
Voice Interaction Hat for MakePython 107.jpg

4. Install the Adafruit_SSD1306.h library.

  • Click “Tools> Manager Libraries” to search for and install Adafruit_SSD1306 library.
Voice Interaction Hat for MakePython 108.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 MakePython 111.jpg

3. Verify and upload the code.

Voice Interaction Hat for MakePython 112.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 MakePython 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 MakePython 114.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 MakePython 110.jpg

F&Q

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

Recources