Stufin
Home Quick Cart Profile

Voice Recognition Module

Buy Now on Stufin

Pin Configuration

  • Voice Recognition Module Documentation
  • Pin Description and Connection Guide
  • The Voice Recognition Module is a compact and versatile component designed to integrate voice recognition capabilities into various IoT projects. This module features a range of pins that enable seamless communication with microcontrollers, development boards, and other devices. Below is a comprehensive pin description and connection guide to help you get started with the Voice Recognition Module.
  • Pinout Structure:
  • The Voice Recognition Module has a 10-pin interface, with the following pinout structure:
  • Pin 1: VCC
  • Function: Power Supply
  • Description: This pin is used to supply power to the Voice Recognition Module. Connect it to a 3.3V or 5V power source, depending on the module's specifications.
  • Connection: Connect to a power source (e.g., Arduino's 5V pin or a battery) using a jumper wire.
  • Pin 2: GND
  • Function: Ground
  • Description: This pin is used to connect the Voice Recognition Module to a ground reference.
  • Connection: Connect to a ground pin on your microcontroller or development board using a jumper wire.
  • Pin 3: RX
  • Function: Receive (Serial Input)
  • Description: This pin is used to receive serial data from a microcontroller or development board.
  • Connection: Connect to the TX (transmit) pin of your microcontroller or development board using a jumper wire.
  • Pin 4: TX
  • Function: Transmit (Serial Output)
  • Description: This pin is used to transmit serial data to a microcontroller or development board.
  • Connection: Connect to the RX (receive) pin of your microcontroller or development board using a jumper wire.
  • Pin 5: LED
  • Function: Status Indicator
  • Description: This pin is connected to an onboard LED that indicates the module's status (e.g., power on, voice detection, or error).
  • Connection: Not required to be connected externally, but can be used to monitor the module's status.
  • Pin 6: MIC
  • Function: Microphone Input
  • Description: This pin is used to connect an external microphone for voice input.
  • Connection: Connect an external microphone (e.g., electret microphone) to this pin using a jumper wire.
  • Pin 7: SPK+
  • Function: Speaker Positive Terminal
  • Description: This pin is used to connect a speaker for audio output.
  • Connection: Connect the positive terminal of a speaker (e.g., 8, 1W) to this pin using a jumper wire.
  • Pin 8: SPK-
  • Function: Speaker Negative Terminal
  • Description: This pin is used to connect a speaker for audio output.
  • Connection: Connect the negative terminal of a speaker (e.g., 8, 1W) to this pin using a jumper wire.
  • Pin 9: KEY
  • Function: Push Button Input
  • Description: This pin is used to connect a push button that triggers voice recognition or other custom functions.
  • Connection: Connect a push button switch between this pin and GND (Pin 2) using a jumper wire.
  • Pin 10: 3V3
  • Function: 3.3V Power Output
  • Description: This pin provides a regulated 3.3V power output that can be used to power other components.
  • Connection: Can be used to power other components, such as sensors or low-power devices.
  • Important Notes:
  • Ensure that the power supply voltage matches the module's specifications to avoid damage.
  • Use appropriate voltage level shifters or dividers if necessary.
  • Follow proper soldering and connection techniques to avoid damage to the module or other components.
  • By following this pin description and connection guide, you can successfully integrate the Voice Recognition Module into your IoT projects and unlock a wide range of interactive and voice-controlled applications.

Code Examples

Voice Recognition Module Documentation
Overview
The Voice Recognition Module is a compact, low-power speech recognition component designed for integration into various Internet of Things (IoT) devices. This module utilizes advanced acoustic models and machine learning algorithms to recognize and interpret voice commands, enabling devices to respond to user voice inputs.
Technical Specifications
Operating Voltage: 3.3V
 Current Consumption: 50mA (average), 100mA (peak)
 Interface: I2C, UART, or SPI
 Supported Languages: English, Spanish, French, German, Italian, and Chinese (Simplified and Traditional)
 Recognition Accuracy: Up to 95% in ideal conditions
Code Examples
### Example 1: Basic Voice Command Recognition using Arduino
This example demonstrates how to use the Voice Recognition Module with an Arduino board to recognize and respond to simple voice commands.
Hardware Connection:
Connect the Voice Recognition Module to Arduino Uno:
	+ VCC to 3.3V
	+ GND to GND
	+ SDA to Analog 4 (I2C SDA)
	+ SCL to Analog 5 (I2C SCL)
Code:
```cpp
#include <Wire.h>
#include <VRM_Module.h>
VRM_Module vrm = VRM_Module();
void setup() {
  Serial.begin(9600);
  Wire.begin(); // Initialize I2C
  vrm.begin(); // Initialize Voice Recognition Module
}
void loop() {
  int result = vrm.recognize();
  if (result == VRM_OK) {
    String command = vrm.getCommand();
    Serial.println("Recognized command: " + command);
    if (command == "turn on") {
      digitalWrite(LED_BUILTIN, HIGH);
    } else if (command == "turn off") {
      digitalWrite(LED_BUILTIN, LOW);
    }
  } else {
    Serial.println("Recognition failed");
  }
  delay(1000);
}
```
### Example 2: Voice-Controlled Home Automation using Raspberry Pi and Python
This example demonstrates how to use the Voice Recognition Module with a Raspberry Pi to control home automation devices using voice commands.
Hardware Connection:
Connect the Voice Recognition Module to Raspberry Pi:
	+ VCC to 3.3V
	+ GND to GND
	+ SDA to GPIO 2 (I2C SDA)
	+ SCL to GPIO 3 (I2C SCL)
Code:
```python
import RPi.GPIO as GPIO
import time
from vrm_python import VRM
vrm = VRM()
# Initialize GPIO pins for home automation devices
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)  # LED strip
GPIO.setup(23, GPIO.OUT)  # Fan
while True:
    result = vrm.recognize()
    if result == VRM_OK:
        command = vrm.getCommand()
        print("Recognized command: " + command)
        if command == "turn on living room lights":
            GPIO.output(17, GPIO.HIGH)
        elif command == "turn off living room lights":
            GPIO.output(17, GPIO.LOW)
        elif command == "turn on fan":
            GPIO.output(23, GPIO.HIGH)
        elif command == "turn off fan":
            GPIO.output(23, GPIO.LOW)
    else:
        print("Recognition failed")
    time.sleep(1)
```
Note: This example assumes you have installed the `vrm_python` library and have the necessary dependencies for home automation devices.
These code examples demonstrate the basic usage of the Voice Recognition Module in different contexts. For more advanced applications, please refer to the module's datasheet and API documentation for detailed information on customization and optimization.