Skip to content

thirdreality/voice-music-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voice&Music Assistant

voice-music-speaker

ThirdReality Voice&Music Assistant is an open-source speaker that supports connecting to the Home Assistant Voice Assistant and Music Assistant. You need to have a device running Home Assistant in order to use this speaker. If you do not have Home Assistant installed yet, refer to the installation documentation for instructions. Buy it on ThirdReality Shop


Build

Requires:

  • Ubuntu 20.04

Install dependencies:

sudo apt-get update

sudo apt-get install -y build-essential bash bc binutils build-essential bzip2 cpio g++ gcc git gzip locales libncurses5-dev libdevmapper-dev libsystemd-dev make mercurial whois patch perl python rsync sed tar vim unzip wget bison flex libssl-dev libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g-dev:i386 zip python3-pip pkg-config automake gsettings-ubuntu-schemas libglib2.0-dev gcc-multilib g++-multilib

pip install pycrypto

wget http://ftp.cn.debian.org/debian/pool/main/a/automake-1.16/automake_1.16.1-4_all.deb && sudo dpkg -i automake_1.16.1-4_all.deb && rm -f automake_1.16.1-4_all.deb

Clone the repository:

git clone https://github.com/thirdreality/voice-music-assistant.git
cd <YOUR PATH>/voice-music-assistant
git submodule update --init

Build:

./go trspk <version>               // If no version number is specified, the date will be used

The generated image is located at:

<YOUR PATH>/voice-music-assistant/image

Flash

  1. Download and extract Aml_Burn_Tool.zip

  2. If this is your first time using the tool, click on Setup_Aml_Burn_Tool_V3.1.0.exe to install necessary drivers.

  3. Next, navigate to the v2 folder and run Aml_Burn_Tool.exe.

  4. Load the compiled **.img firmware file. Or you can download the latest firmware here.

  5. Click on Start to initiate the burn process.

usb_burnning_tool
  1. Use debug board to connect the speaker to the PC. If you don’t have a debug board, you can use a Type-C data cable. Make sure to use a data cable. Then power it on.
device-connect

Setup the voice assist

There are two ways to use the voice assistant: Home Assistant Cloud or local voice recognition (If your device doesn't have sufficient performance, please choose Home Assistant Cloud)

After completing either of the above options, add an assistant under Settings → Voice Assistants.


Setup through HA APP

  1. You need to install the iOS or Android version of the Home Assistant app first. And please make sure the app is up to date.
  2. Make sure the speaker is in a yellow blinking state. Otherwise, please try factory reset. (Press and hold the Home button for 15 seconds, then release it after you hear the prompt sound)
  3. Open the Home Assistant app on your phone. Go to Settings → Devices & services and under Discovered, you should see the device as "3RSPK-XXXXX Improv via BLE". (If the device is not found, please check whether Bluetooth and Nearby Devices permissions are enabled in the app)
  1. Enter your Wi-Fi SSID and password. Only 2.4 GHz networks are supported.
  1. A few seconds after the Wi-Fi connection is successful, the speaker will play "Your device is ready to connect to Home Assistant." Go to Settings → Devices & services and under Discovered, you should see the device as "3RSPK-XXXXXXXXXXXX ESPHome".
  1. Add device
  1. Select the voice assistant you created in step 1 (Setup the voice assist)

Now you can try waking the device with "OK Nabu" and start a conversation. You can check the device status in Settings → Devices & Services → ESPHome.


Smart Home control with voice

Supported voice commands: https://www.home-assistant.io/voice_control/builtin_sentences/

  • For example, "What's the time" or "Turn on the light in the living room".
  • Make sure you're using the area name exactly as you defined it in Home Assistant.

Is the device you want to control via Assist (for example a specific light) not responding to your voice commands? Make sure the device is exposed to Assist: https://www.home-assistant.io/voice_control/voice_remote_expose_devices/


Smart Home control with button

We can create automation scripts based on the speaker's Home button trigger events to control devices. Supports single-click, double-click, and triple-click actions.

Settings → Devices & Services → ESPHome → Your device → Automations


Play Music

We can use Music Assistant to play music.

Settings → Add-ons → search for and add Music Assistant. After adding it, you can access it via port 8095.

If it doesn’t exist, please add it using Music Assistant github repository

Go to the Music Assistant: Settings → Providers → Add a new provider. Search for Snapcast and add it.

Then you can follow the same steps to add Spotify or any other supported music playback source.

Finally, select a song and the speaker, and you can start playback! 🎵


Multi-Room Music


Trouble Shooting

If there are multiple Snapcast servers in your environment, you need to specify the server’s IP address to ensure the speaker connects to the correct one. Currently, this must be set manually.

$ vi /etc/default/snapclient

  SNAPCLIENT_OPTS="--player pulse:buffer_time=500 -h 10.1.0.240"  # Replace with your Snapcast server's IP address

$ /etc/init.d/S99ha-speaker snapclient restart

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors