Configuring ReSpeaker XVF3800 as Voice Assistant with ESPHome

5
(1)

This tutorial shows how to configure Seeed Studio’s reSpeaker XMOS XVF3800—featuring the XIAO ESP32-S3 microcontroller and XMOS XVF3800 voice processor—as a voice assistant in Home Assistant using ESPHome.

XMOS XVF3800 voice processor

The XMOS XVF3800 features cutting-edge algorithms like multi-adaptive beamforming, acoustic echo cancellation (AEC), de-reverberation, noise suppression, direction-of-arrival (DoA), and voice activity detection (VAD) for clear voice pickup in noisy environments.

ESP32-S3 microcontroller

The onboard XIAO ESP32-S3 delivers native Wi-Fi and Bluetooth connectivity, enabling seamless Home Assistant integration via ESPHome for voice-controlled smart home projects.

4-Mic array design

The reSpeaker integrates 4 MEMS microphones using Pulse-Density Modulation (PDM) signaling. PDM delivers high signal-to-noise ratio, exceptional sensitivity, low power consumption, robust resistance to RF interference, and a smooth frequency response.

AC3104 Low-Power audio codec

The TLV320AIC3104 is a low-power stereo audio codec from Texas Instruments featuring integrated DAC (Digital-to-Analog Converter), ADC (Analog-to-Digital Converter), Class-D amplifiers, and DSP processing.

The codec receives processed audio streams from XVF3800, performs final analog conversion/amplification, and drives the speaker.

I²C and I²S

Though I²C and I²S have similar names and are both serial protocols, they serve distinct purposes with different characteristics.

I²C (Inter-Integrated Circuit) is a multi-device serial protocol for intra-board communication between microcontrollers and peripherals like sensors.

I²S (Inter-Integrated Circuit Sound) is a point-to-point serial protocol for transmitting two-channel, uncompressed digital audio between components like DACs, ADCs, or processors.

ESP32-S3 Pinout

On the ESP32-S3, the following pins are configured for I²C bus:

  • I²C SDA: GPIO5
  • I²C SCL: GPIO6

On the ESP32-S3, the following pins are configured for I²S bus:

  • I²S LRCLK/WS (Left/Right Clock or Word Select) → GPIO7
  • I²S BCLK/SK (Bit Clock or Serial Clock) → GPIO8
  • I²S MCLK (Master Clock) → GPIO9
  • I²S DIN (Serial Data In) → GPIO43
  • I²S DOUT (Serial Data Out) → GPIO44
Pinout of ESP32-S3 on the ReSpeaker XVF3800

ReSpeaker schematic

XIAO ESP32-S3 connects to both the XVF3800 voice processor and TLV320AIC3104 codec via I²C for configuration and control.

  • ESP32-S3 ↔ I²C : XVF3800 (configuration)
  • ESP32-S3 ↔ I²C : AIC3104 (configuration)

XVF3800 connects to both ESP32-S3 and AIC3104 for digital audio streaming.

  • ESP32-S3 ↔ I²S : XVF3800 (bi-directional audio)
  • XVF3800 → I²S : AIC3104 (playback stream)

The 12 RGB LEDs are controlled by the XVF3800, and the ESP32‑S3 configures them via I²C commands sent to the XVF3800.

The 4 MEMS microphones transmit audio to the XVF3800 using pulse‑density modulation (PDM).

The mute button is directly connected to the XVF3800 GPI (General-Purpose Input) pin.

ReSpeaker XVF3800 schematic

XVF3800 firmware update

The XVF3800 mic array needs a 12.288 MHz Master Clock (MCLK) to work, but ESPHome (used in Home Assistant) can’t generate it due to API limits. An alternative is to modify XVF3800 firmware to make it act as the I2S master. So it can generate its own clocks without needing Master Clock from the ESP32. This is the purpose of the firmware provided by Seeed Studio, so the mic works properly with Home Assistant.

To upload XVF3800 firmware to the ReSpeaker, connect it to your computer using a USB cable plugged into the USB port opposite to ESP32-S3.

USB connection for XVF3800 firmware update

Put the ReSpeaker in safe mode :

  • Power off the device completely.
  • Press and hold the Mute button.
  • While holding the mute button, reconnect the power.

The red LED will start blinking — this confirms the device is now in Safe Mode. You can now follow the procedure described on Seeed Studio website.

Under Linux, the procedure is straightforward:

Bash
sudo apt install dfu-util
sudo dfu-util -l
sudo dfu-util -R -e -a 1 -D /path-to-dfu-firmware.bin

Integration into ESPHome

The first step is to integrate the ReSpeaker into ESPHome and to manually upload the initial ESPHome firmware into its ESP32-S3.

To upload ESPHome firmware to the ReSpeaker, connect it to your computer using a USB cable plugged into the USB port on the ESP32-S3 module.

Add Vosk speech regognition to Home Assistant

The voice assistant requires a speech recognition toolkit (Speech-To-Text, STT) to process voice commands received through the ReSpeaker. Vosk is an open‑source offline speech recognition toolkit that supports more than 20 languages and dialects. It is an excellent choice for Raspberry Pi‑based Home Assistant setups.

You have to install the Vosk add-on from this repository:

Plaintext
https://github.com/rhasspy/hassio-addons

To do so, you must add this repository from the Repositories menu, accessible via the three‑dots menu in Settings → Add‑ons → Add‑on store.

Then you can install the Vosk add-on:

Add a voice assistant

Add an assistant using Vosk Speech-to-text and Google translate Text-to-speech.

I recommend you to define short aliases for the devices you want to control by voice, this will make the voice assistant much easier to use.

Example of alias added to voice control a light bulb in bedroom

ESPHome configuration

The ESPHome YAML configuration required to enable the ReSpeaker XVF3800 as Home Assistant voice assistant is available in formatBCE GitHub repository.

Simply copy and paste this configuration into your ReSpeaker setup, then customize the API and OTA settings with the values you defined when creating the device (or stored in your secrets).

Once the configuration is compiled and uploaded to your ReSpeaker XVF3800 device, it appears in the list of Devices.

You have now to configure this device. Select the voice assistant configuration you created for the ReSpeaker, then choose a wake word (for example, “Okay Nabu”). When the wake word is detected, the ReSpeaker wakes up and listens for your voice command.

Focus on LED management (draft)

In the above ESPHome configuration, the LED are managed… TBC

Let’s test it!

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?