Stufin
Home Quick Cart Profile

Speech Recognition Module

Buy Now on Stufin

Pin Configuration

  • Speech Recognition Module Documentation
  • Pin Description:
  • The Speech Recognition Module has a total of 7 pins, each with a specific function. Below is a detailed description of each pin:
  • 1. VCC (Power Supply):
  • Pin Type: Power
  • Voltage: 3.3V or 5V (depending on the module's configuration)
  • Description: This pin provides the power supply to the module. Connect it to a stable 3.3V or 5V power source, depending on the module's documentation.
  • 2. GND (Ground):
  • Pin Type: Ground
  • Description: This pin connects to the ground of the power supply and is used to complete the power circuit.
  • 3. RX (Receive):
  • Pin Type: Digital Input
  • Description: This pin is used to receive data from the microcontroller or other devices. It is typically connected to the TX (Transmit) pin of the microcontroller.
  • 4. TX (Transmit):
  • Pin Type: Digital Output
  • Description: This pin transmits data from the speech recognition module to the microcontroller or other devices. It is typically connected to the RX (Receive) pin of the microcontroller.
  • 5. BUSY (Busy Indicator):
  • Pin Type: Digital Output
  • Description: This pin indicates when the speech recognition module is busy processing audio data. It goes high (logic 1) when the module is busy and low (logic 0) when it is idle.
  • 6. INT (Interrupt):
  • Pin Type: Digital Output
  • Description: This pin is used to interrupt the microcontroller when a valid voice command is recognized. It goes high (logic 1) when a valid command is recognized and low (logic 0) when no command is recognized.
  • 7. MIC (Microphone):
  • Pin Type: Analog Input
  • Description: This pin connects to the analogue microphone input. It is used to capture audio signals from the environment.
  • Connection Structure:
  • To connect the Speech Recognition Module to a microcontroller, follow the below structure:
  • Connect VCC to a 3.3V or 5V power supply (depending on the module's configuration).
  • Connect GND to the ground of the power supply.
  • Connect RX to the TX pin of the microcontroller.
  • Connect TX to the RX pin of the microcontroller.
  • Connect BUSY to a digital input pin on the microcontroller (optional, but recommended for optimizing the system's performance).
  • Connect INT to an interrupt-enabled digital input pin on the microcontroller (recommended for efficient voice command recognition).
  • Connect MIC to an analogue microphone input.
  • Note: Make sure to handle the microphone input with care, as it is sensitive to noise and electromagnetic interference. Proper shielding and noise reduction techniques may be necessary to ensure optimal performance.
  • By following this pin description and connection structure, you can successfully integrate the Speech Recognition Module into your IoT project and enable advanced voice command capabilities.

Code Examples

Speech Recognition Module Documentation
The Speech Recognition Module is a powerful IoT component that enables devices to recognize and interpret human speech. This module uses advanced algorithms and machine learning techniques to identify spoken words and phrases, allowing devices to respond to voice commands, transcribe spoken content, and more.
Technical Specifications:
Compatible with various microcontrollers and development boards
 Supports multiple speech recognition engines, including Google Cloud Speech-to-Text and Microsoft Azure Speech Services
 High accuracy and robustness in noisy environments
 Adjustable speech recognition threshold and sensitivity
 Supports multiple languages and dialects
Code Examples:
### Example 1: Basic Speech Recognition using Arduino and Google Cloud Speech-to-Text
This example demonstrates how to use the Speech Recognition Module with an Arduino board and Google Cloud Speech-to-Text to recognize spoken words and print them to the serial console.
```cpp
#include <WiFi.h>
#include < SpeechRecognition.h>
// Replace with your Google Cloud Speech-to-Text API credentials
const char apiKey = "YOUR_API_KEY";
const char apiSecret = "YOUR_API_SECRET";
SpeechRecognition sr;
void setup() {
  Serial.begin(9600);
  WiFi.begin("your_wifi_ssid", "your_wifi_password");
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
  sr.begin(apiKey, apiSecret);
}
void loop() {
  int confidence = sr.recognize();
  if (confidence > 0) {
    String transcript = sr.getTranscript();
    Serial.println("Recognized speech: " + transcript);
  } else {
    Serial.println("No speech recognized");
  }
  delay(1000);
}
```
### Example 2: Voice-Controlled LED Lighting using Raspberry Pi and Microsoft Azure Speech Services
This example demonstrates how to use the Speech Recognition Module with a Raspberry Pi and Microsoft Azure Speech Services to control an LED light strip using voice commands.
```python
import speech_recognition as sr
import RPi.GPIO as GPIO
# Replace with your Microsoft Azure Speech Services API credentials
subscription_key = "YOUR_SUBSCRIPTION_KEY"
region = "westus"
# Initialize GPIO library for LED control
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
# Initialize speech recognition module
sr = SpeechRecognition(subscription_key, region)
while True:
    text = sr.recognize()
    if text:
        if "turn on" in text.lower():
            GPIO.output(17, GPIO.HIGH)
            print("LED turned on")
        elif "turn off" in text.lower():
            GPIO.output(17, GPIO.LOW)
            print("LED turned off")
    else:
        print("No speech recognized")
```
These code examples demonstrate the basic functionality of the Speech Recognition Module and its integration with popular development platforms. By leveraging the module's advanced speech recognition capabilities, developers can create innovative voice-controlled IoT applications that enhance user experiences and improve device interactions.