Skip to content

Commit

Permalink
Merge pull request #1415 from Jessie219-web/main
Browse files Browse the repository at this point in the history
Add: ReSpeaker comparison
  • Loading branch information
limengdu authored Jul 18, 2024
2 parents be56b4a + b475441 commit e7c3644
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 73 deletions.
147 changes: 91 additions & 56 deletions docs/Sensor/ReSpeaker_Lite/Application/respeaker_lite_ha.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,18 @@ last_update:
---

Say 'hello' to effortless control and 'goodbye' to tapping on screens with our voice assistant system.<br/>
Picture this: you're cozied up on your couch, and with just a simple shout-out to the [ReSpeaker Lite](https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html), you can switch up the lights, crank up the tunes, or even ask about the weather – all without lifting a finger. Thanks to a nifty little [Seeed XIAO ESP32S3](https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html) chip, you've got a mini-but-mighty brain that hooks up your voice to Home Assistant, making your smart home smarter and your life a whole lot easier. So, if you're ready to make your home listen and respond to your voice as if it's just another member of the family, let's get started on this voice-activated adventure!

Picture this: you're cozied up on your couch, and with just a simple shout-out to the ReSpeaker Lite, you can switch up the lights, crank up the tunes, or even ask about the weather – all without lifting a finger. Thanks to a nifty little [Seeed XIAO ESP32S3](https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html) chip, you've got a mini-but-mighty brain that hooks up your voice to Home Assistant, making your smart home smarter and your life a whole lot easier.

This chapter we will use the [ReSpeaker Lite Voice Assistant Kit](https://www.seeedstudio.com/ReSpeaker-Lite-Voice-Assistant-Kit-p-5929.html) to connect the Sonoff smart switch to realize voice control of the light switch.


## Hardware Required


* ReSpeaker Lite Voice Assistant Kit
* [Home Assistant Device](https://wiki.seeedstudio.com/home_assistant_topic/)
* [Sonoff BASICR2](https://sonoff.tech/product/diy-smart-switches/basicr2/)

## Getting Started

Expand All @@ -35,8 +45,11 @@ Go to [Settings > Add-ons](https://my.home-assistant.io/redirect/supervisor).
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/add-ons.png" alt="pir" width={800} height="auto" /></p>


Under the Official `add-ons` section, you will find the `ESPHome`, `Whisper`, `Piper`, `openWakeWord` add-on, and click `Install`.

Under the Official `add-ons` section, search and install the following add-ons:
* `ESPHome`
* `Whisper`
* `Piper`
* `openWakeWord`

Enable `Start on boot` and `Watchdog`, and click `Start`.

Expand All @@ -62,32 +75,85 @@ Click `CONFIGURE` and `SUBMIT`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/config-success.png" alt="pir" width={800} height="auto" /></p>


<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/device-page.png" alt="pir" width={800} height="auto" /></p>
There should be 3 entities in your `Wyoming Protocol`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/entities.png" alt="pir" width={800} height="auto" /></p>

### Add Seeed Studio XIAO ESP32S3 to ESPHome
### Add your smart device

Here we use [BASICR2](https://sonoff.tech/product/diy-smart-switches/basicr2/) as a reference example.

Setup the device according to the manual.

Search and install `Sonoff LAN` in `HACS`.
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/sonoff.png" alt="pir" width={600} height="auto" /></p>

Navigate to `Settings` -> `Devices & services`, click `ADD INTEGRATION`, add `Sonoff`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/add-sonoff.png" alt="pir" width={400} height="auto" /></p>

Enter your `eWeLink` account credentials.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/credentials.png" alt="pir" width={400} height="auto" /></p>

When it connected, you will see an entity.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/sonoff-id.png" alt="pir" width={800} height="auto" /></p>


### Add Voice Asssitant

Navigate to `Settings` -> `Voice Assistant`.


<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/voice-assistant.png" alt="pir" width={800} height="auto" /></p>

Enter a name and select:

**Speech to text**: `Whisper`

**Text to speech**: `Piper`

**Wake word engine**: `openwakeword`

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/piper-config.png" alt="pir" width={800} height="auto" /></p>


Choose a wakeword you preferred.


<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/choose-wakeword.png" alt="pir" width={800} height="auto" /></p>

* Step 1: Navigate to `ESPHome`, and click `+ NEW DEVICE`.


### Add XIAO ESP32S3 to ESPHome

Navigate to `ESPHome`, and click `+ NEW DEVICE`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/add-new-esphome.png" alt="pir" width={800} height="auto" /></p>


* Step 2. Enter a Name for your device, then click `NEXT`.
Enter a Name for your device, then click `NEXT`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/next11.png" alt="pir" width={500} height="auto" /></p>

* Step 4. Select `ESP32-S3`.
Select `ESP32-S3`.
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/choose-s3.png" alt="pir" width={800} height="auto" /></p>

* Step 5. Click `SKIP`, we will configure this file manually.
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/skip.png" alt="pir" width={800} height="auto" /></p>
Click `SKIP`, we will configure this file manually.
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/skip.png" alt="pir" width={400} height="auto" /></p>

* Step 6. Click `EDIT` and copy the following code:
Click `EDIT` and copy the following code:

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/config.png" alt="pir" width={800} height="auto" /></p>

Remember to replace the Wi-Fi info:
```
wifi:
ssid: "Wi-Fi name"
password: "Wi-Fi password"
```

<details>

<summary>.yaml</summary>
Expand Down Expand Up @@ -239,25 +305,6 @@ light:
min_brightness: 50%
max_brightness: 100%

# light:
# - platform: monochromatic
# id: led
# name: "Desk Lamp"
# output: light_output
# effects:
# - pulse:
# name: "Slow Breathing Light"
# transition_length: 5s # 缓慢呼吸灯,渐变时间较长
# - pulse:
# name: "Fast Breathing Light"
# transition_length: 1s # 快速呼吸灯,渐变时间较短
# - pulse:
# name: "Fast Pulse"
# transition_length: 0.5s
# update_interval: 0.5s
# min_brightness: 0%
# max_brightness: 100%

output:
- platform: ledc
id: light_output
Expand Down Expand Up @@ -315,24 +362,23 @@ switch:
</details>


* Step 7: Click `SAVE` and then `INSTALL`.
Click `SAVE` and then `INSTALL`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/click-install.png" alt="pir" width={800} height="auto" /></p>


* Step 8: Choose `Manual Download` -> `Modern-format`.
Choose `Manual Download` -> `Modern-format`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/manual-download.png" alt="pir" width={800} height="auto" /></p>


* Step 9: Connect the XIAO ESP32S3 to your PC via a USB Type-C cable.
Connect the XIAO ESP32S3 to your PC via a USB Type-C cable.

* Step 10: Navigate to [Web-ESPHome](https://web.esphome.io/), click `CONNECT`, then choose the port and connect it.
Navigate to [Web-ESPHome](https://web.esphome.io/), click `CONNECT`, then choose the port and connect it.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/connect-port.png" alt="pir" width={800} height="auto" /></p>


* Step 11: Select the `.bin` file we just downloaded, and click `INSTALL`.
Select the `.bin` file we just downloaded, and click `INSTALL`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/install.png" alt="pir" width={800} height="auto" /></p>

Expand All @@ -341,33 +387,22 @@ Wait for a few minutes for the installation. After the installation is successfu
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/install-done.png" alt="pir" width={800} height="auto" /></p>


Navigate to `Settings` and select `Devices & Services`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/install-done.png" alt="pir" width={800} height="auto" /></p>


### Add Voice Asssitant

Navigate to `Settings` -> `Voice Assistant`.


<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/voice-assistant.png" alt="pir" width={800} height="auto" /></p>

Enter a name and select:

**Speech to text**: `Whisper`

**Text to speech**: `Piper`

**Wake word engine**: `openwakeword`
You will see `ESPHome` as a discovered integration. Click `CONFIGURE`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/piper-config.png" alt="pir" width={800} height="auto" /></p>
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/configure.png" alt="pir" width={800} height="auto" /></p>


Choose a wakeword you preferred.

Click `SUBMIT`.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/choose-wakeword.png" alt="pir" width={800} height="auto" /></p>
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/esp-submit.png" alt="pir" width={800} height="auto" /></p>


<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/esp-device.png" alt="pir" width={800} height="auto" /></p>

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/respeakerv3/piper-config.png" alt="pir" width={800} height="auto" /></p>

Now you are all set, try waking it up with `hey jarvis` and talking to it!
54 changes: 51 additions & 3 deletions docs/Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/xiao_respeaker.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Integrating ReSpeaker Lite with XIAO ESP32S3
title: Integrated with XIAO ESP32S3
title: ReSpeaker Lite Voice Assistant Kit
keywords:
- ESP32S3
- XIAO
Expand All @@ -12,13 +12,61 @@ last_update:
author: Jessie
---

[Seeed Studio XIAO ESP32S3](https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html) leverages 240MHz Xtensa 32-bit LX7 dual-core processor, supporting both WiFi and BLE 5.0 wireless connectivities, a 2.4GHz Rod antenna, allows for deep sleep mode with power consumption as low as 14μA while supporting lithium battery charging management.

This chapter will guide users on how to play ReSpeaker Lite with XIAO ESP32S3.

Powered by XMOS XU316 AI Sound and Audio chipset, it is a high-performance open source voice assistant development kit. The kit integrates the ReSpeaker Lite dual-microphone array and a powerful [XIAO ESP32S3](https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html) processor, offering exceptional voice recognition, noise reduction, and voice processing capabilities. This kit provides firmware integration with Home Assistant via ESPHome, making it ideal for smart voice assistants and home automation applications.


<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/xiao-res.png" alt="pir" width={600} height="auto" /></p>


<div class="get_one_now_container" style={{textAlign: 'center'}}>
<a class="get_one_now_item" href="https://www.seeedstudio.com/ReSpeaker-Lite-Voice-Assistant-Kit-p-5929.html">
<strong><span><font color={'FFFFFF'} size={"4"}> Get One Now 🖱️</font></span></strong>
</a>
</div>

### Features

* **Pre-Soldered ESP32 Controller**: A powerful XIAO ESP32S3 is pre-soldered via the I2S pins, offering a solderless experience for further development and integration.
* **Dual Microphone Array for Far-Field Voice Capture**: The 2 high performance digital microphones capture and extract far-field speech and voice (up to 3 meters) even in noisy environments as it cancells point noise using two microphone input.
* **Onboard AI NLU Algorithms**: Powered by XMOS XU-316 AI sound and audio chip, the kit includes Natural Language Understanding algorithms for Interference Cancellation (IC)​, Acoustic Echo Cancellation, Noise Suppression, and Automatic Gain Control (AGC), enabling high quality voice capture.
* **Embracing Open Source**: As an open source hardware, it's compatible with Arduino, PlatformIO, MicroPython, CircuitPython for furthur developement.
* **Compatible with Popular Voice Assistants**: This kit allows you to build your own natural language processor and connect it to Home Assitant via ESPHome, Amazon Alexa Voice Service, Google Assistant, or Cloud Speech-to-Text service, enabling you to ask questions and issue voice commands to your programs.
* **Onboard RGB LED**: The kit features a programmable WS2812 RGB LED, supporting custom effects and offering a visual interface for your applications.


### Specification

|**Dual Microphone Array**|Provides high-quality audio input.|
| :- | :- |
|**Power Indicator Light**|Illuminates when powered on.|
|**RGB Light**|Programmable WS2812, provides visual feedback.|
|**Mute Indicator Light**|Lights up red when the mute button is pressed.|
|**USR Button**|User-defined button.|
|**Mute Button**|Mutes audio input when pressed.|
|[**XIAO ESP32S3**](https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html)|For further development and integration.|
|**XU316 Core Processor**|Responsible for audio processing and transmission.|
|**External Power Supply Solder Pad**|Supports external 5V power supply.|
|**USB Type-C Port**|Used for power and data transmission.|
|**Speaker Connector**|For audio output. Supports 5W amplifier speakers.|
|**3.5mm Headphone jack**|Output audio, We can plug active speakers or Headphones into this port.|
|**External power pad 1** |Unused IO pins on the XU316.|
|**External power pad 2**|Unused IO pins on the XIAO ESP32.|
|**JTAG**|For debugging and programming the XU316.|



### Hardware Overview

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/front.png" alt="pir" width={800} height="auto" /></p>
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/back.png" alt="pir" width={800} height="auto" /></p>


### Hardware Flowchart

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/flow-chart.png" alt="pir" width={800} height="auto" /></p>

### Flash the I2S firmware


Expand Down
Loading

0 comments on commit e7c3644

Please sign in to comment.