Difference between revisions of "Voice Interaction Hat for MakePython"

From MakerFabsWiki
Jump to: navigation, search
(Record device)
Line 34: Line 34:
 
==Record Demo==
 
==Record Demo==
  
*Open the code ''xxx'' with Arduino.<br>
+
*Open the code ''Project_ESP32-Voice-Interaction/example/record/record.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>
Line 41: Line 41:
 
*If you want to modify the recording length, you can modify it in the program.<br>
 
*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>
 
<pre>WM8960_Record(filename, i2s_buffer, record_time);  //record_time is the recording length </pre>
 +
*After the recording is over, the player will play the recording.<br>
 
==Play Demo==
 
==Play Demo==
*Open the code ''xxx'' with Arduino.<br>
+
*Open the code ''Project_ESP32-Voice-Interaction/example/adc/adc.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>
 
*Fill the name of the music that will be played in the code.
 
*Fill the name of the music that will be played in the code.
<pre>WM8960_Play("/music.wav", i2s_buffer);  //"music.wav" is the name of music  </pre>
+
<pre> WM8960_Play("/speak.wav", i2s_buffer);  //"speak.wav" is the name of music  </pre>
 
*Verify and upload the code.<br>
 
*Verify and upload the code.<br>
*The player will be playing the music one time.<br>
+
*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 103.jpg|500px]]<br>
  
*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>
Line 64: Line 65:
  
 
==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>
 

Revision as of 09:12, 18 December 2020

Attention!!! This product has not been released.

About the product

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.
Model: xxx
Voice Interaction Hat for MakePython 101.jpg

Features

  • WM8960, the low power, high-quality stereo CODEC.
  • 3W power speaker.
  • Two ADMP401 MEMs microphone.
  • Maximum voice capture distance: 3m.
  • Audio jack on board.
  • Support Micro SD Card.

Diagram

Voice Interaction Hat for MakePython 102.jpg

Pins Description

Voice Interaction Hat for MakePython 102.jpg

Prepare before used

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. You can get the Makepython ESP32(Wrover) module from here MakePython ESP32(Wrover)
  • The connection between the controller and the module can be made according to the pin description when other microcontrollers are used.
  • Combined with MakePython ESP32, insert the SD card, plug in the cable for power supply.


Software

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

Record Demo

  • Open the code Project_ESP32-Voice-Interaction/example/record/record.ino with Arduino.
  • Select Tools-> Board-> ESP32 Wrover Module , and Tools-> Port-> COM… .
  • Verify and upload the code.
  • Make sure you've inserted the SD card, otherwise it might not work.
  • reset ESP32, press the left button to start recording, recording will end at 5S.
  • 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 
  • After the recording is over, the player will play the recording.

Play Demo

  • Open the code Project_ESP32-Voice-Interaction/example/adc/adc.ino with Arduino.
  • Select Tools-> Board-> ESP32 Wrover Module , and Tools-> Port-> COM… .
  • 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  
  • Verify and upload the code.
  • The player will be playing the music loop.

Record device

500px

  • 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.
  • 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 104.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