2024年11月21日星期四 下午6:44:25

How to manually install wyoming-piper and whisper on Home Assistant core?

1 年 前
#22672 引用
local voice functionality in Home Assistant core
https://community.home-assistant.io/t/using-add-ons-with-home-assistant-core/567369

https://community.home-assistant.io/t/how-to-manually-install-piper-and-whisper-on-home-assistant-core/632966

https://blog.matterxiaomi.com/blog/voice-homeassistant/


https://github.com/openai/whisper
https://github.com/SYSTRAN/faster-whisper
https://github.com/rhasspy/piper


https://www.home-assistant.io/voice_control/voice_remote_local_assistant



Quick start

pull image from:
https://hub.docker.com/r/rhasspy/wyoming-piper
https://hub.docker.com/r/rhasspy/wyoming-whisper

Note:docker.io/rhasspy/wyoming-whisper  failure

Useful links
Setup Local Voice Assistant In Home Assistant Using USB Microphone - Docker Containers Setup Guide
https://smarthomecircle.com/setup-voice-assistant-with-home-assistant-using-docker-usb-microphone
0
1 年 前
#22675 引用
How to manually install Piper and whisper on Home Assistant core?

I am running Home Assistant core on a RPI 3B+

How to manually install Piper and whisper on Home Assistant core?

it’s simple to install whisper and piper on Home Assistant core

I used this for piper  and this for whisper .
Pull the container,change path to your path and run it. Rename containers to something like wyoming-piper and wyomin-whisper and add wyoming integration. For host I selected localhost and for port 10200 and 10300 and that was it.
Whisper and piper arre recognized in home assistant.

https://community.home-assistant.io/t/how-to-manually-install-piper/568040/7?u=msly


I was looking under “homeassistant” on docker hub for these containers, but they are under “rasspy”.

You can also run Piper as a standalone Docker container.

https://hub.docker.com/r/rhasspy/wyoming-piper

detail:https://hub.docker.com/repository/docker/rhasspy/wyoming-piper/general

You can also run Whisper as a standalone Docker container.
https://hub.docker.com/r/rhasspy/wyoming-whisper

detail:https://hub.docker.com/repository/docker/rhasspy/wyoming-whisper/general


source:https://www.home-assistant.io/blog/2023/04/27/year-of-the-voice-chapter-2/

Other

https://hub.docker.com/u/rhasspy


32bit error

root@raspberrypi:~# docker pull rhasspy/wyoming-whisper
Using default tag: latest
latest: Pulling from rhasspy/wyoming-whisper
no matching manifest for linux/arm/v7 in the manifest list entries


64bit only

root@raspberrypi:~# docker images
REPOSITORY                                         TAG       IMAGE ID       CREATED        SIZE
ghcr.io/home-assistant/home-assistant              stable    9c19b1fddc11   3 weeks ago    1.97GB
ghcr.io/home-assistant/home-assistant              <none>    239499fcf069   3 weeks ago    1.97GB
ghcr.io/home-assistant-libs/python-matter-server   stable    72638a27774c   3 weeks ago    415MB
rhasspy/wyoming-piper                              latest    883dc7becb2a   3 months ago   171MB
rhasspy/wyoming-whisper                            latest    cb4c17ac457b   6 months ago   256MB
0
1 年 前
#22676 引用
I didn’t select anything. I done exactly what i wrote:

pull image
change
-v /path/to/local/data:/data
to
-v /opt/whisper-piper/data:/data

and run the container.

docker run  -p 10200:10200 -v /t/path/to/local/data:/data e64a72efd1ff     --voice en_US-lessac-medium


I just renamed container and add wyoming integration selecting localhost and port. And that was it.
Edit:
I created new voice assistant to check if everything is working properly. Tested on my mobile phone and everything is working. It does recognize speech.

https://community.home-assistant.io/t/how-to-manually-install-piper/568040/9?u=msly
0
1 年 前
#22677 引用
You can run these as plain docker containers.
This is my docker-compose.yaml


version: "3"
services:
## wyoming
  whisper:
    container_name: whisper
    image: rhasspy/wyoming-whisper
    command: --model medium-int8 --language fr
    volumes:
      - ./whisper-data:/data
    environment:
      - TZ=Europe/Brussels
    restart: unless-stopped
    ports:
      - 10300:10300

  piper:
    container_name: piper
    image: rhasspy/wyoming-piper
    command: --voice fr-siwis-medium
    volumes:
      - ./piper-data:/data
    environment:
      - TZ=Europe/Brussels
    restart: unless-stopped
    ports:
      - 10200:10200



Piper is 10200 and whisper should be 10300 with default settings

https://community.home-assistant.io/t/using-add-ons-with-home-assistant-core/567369/7
https://community.home-assistant.io/t/year-of-the-voice-chapter-2-lets-talk/565214/20?u=msly
0
1 年 前
#22679 引用
My compose file:

piper:
    container_name: piper
    image: rhasspy/wyoming-piper
    ports:
      - "10200:10200"
    volumes:
      - /path/data:/data
    command: "--voice en-gb-southern_english_female-low"
    restart: unless-stopped




Which works fine

https://community.home-assistant.io/t/year-of-the-voice-chapter-2-lets-talk/565214/38?u=msly
0
1 年 前
#22680 引用
step 1.Run Whisper, Piper, and OpenWakeWord with Docker

step 2.Just use the ha core  and setup the wyoming integration pointed at port 10200
0
1 年 前
#22687 引用
Instead of environment variables you have to put in the command line options for voice, model,… under the command: tag

version: "3"
services:
## wyoming
  whisper:
    container_name: whisper
    command: --model medium --language nl
    image: rhasspy/wyoming-whisper
    volumes:
      - ./whisper:/data
    environment:
      - TZ=Europe/Brussels
    restart: unless-stopped
    ports:
      - 10300:10300

  piper:
    container_name: piper
    image: rhasspy/wyoming-piper
    command: --voice nl-nathalie-x-low
    volumes:
      - ./piper:/data
    environment:
      - TZ=Europe/Brussels
    restart: unless-stopped
    ports:
      - 10200:10200



https://community.home-assistant.io/t/year-of-the-voice-chapter-2-lets-talk/565214/20
0
10 个月 前
#24139 引用
Run Whisper, Piper, and OpenWakeWord with Docker

Hardware
USB Microphone - Amazon - Razon Mini


Create a docker-compose.yaml file with the following content


services:  
  openwakeword:  
    image: homeassistant/amd64-addon-openwakeword:latest  
    container_name: openwakeword  
  
    entrypoint: python3  
    command: >  
      -m wyoming_openwakeword  
      --uri 'tcp://0.0.0.0:10400'  
      --preload-model 'ok_nabu'  
      --custom-model-dir /share/openwakeword  
    ports:  
      - 10400:10400  
    environment:  
      - TZ=Europe/Berlin  
    volumes:  
      - ./openwakeword-data:/data  
      - ./openwakeword-custom-model-dir:/share/openwakeword  
    restart: unless-stopped  
  
#-------------------------------------  
  piper:  
      image: homeassistant/amd64-addon-piper:latest  
      container_name: piper  
  
      entrypoint: python3  
      command: >  
        -m wyoming_piper  
        --piper '/usr/share/piper/piper'  
        --uri 'tcp://0.0.0.0:10200'  
        --length-scale "1"  
        --noise-scale "0.667"  
        --speaker "0"  
        --voice "en_US-lessac-medium"  
        --max-piper-procs "1"  
        --data-dir /data  
        --data-dir /share/piper  
        --download-dir /data  
      ports:  
        - "10200:10200"  
      volumes:  
        - ./piper-data:/data  
      restart: unless-stopped  
  
#----------------------------------------  
  whisper:  
    image: homeassistant/amd64-addon-whisper:latest  
    container_name: whisper  
  
    entrypoint: python3  
    command: >  
      -m wyoming_faster_whisper  
      --uri tcp://0.0.0.0:10300  
      --model small-int8  
      --beam-size 1  
      --language en  
      --data-dir /data  
      --download-dir /data  
    ports:  
      - "10300:10300"  
    environment:  
      - TZ=Europe/Berlin  
    volumes:  
      - ./whisper-data:/data  
    restart: unless-stopped




source:
Setup Local Voice Assistant In Home Assistant Using USB Microphone - Docker Containers Setup Guide
https://smarthomecircle.com/setup-voice-assistant-with-home-assistant-using-docker-usb-microphone
0
9 个月 前
#28493 引用
You can run Piper with Python or download a binary release:

amd64 (64-bit desktop Linux)
arm64 (64-bit Raspberry Pi 4)
armv7 (32-bit Raspberry Pi 3/4)


https://github.com/rhasspy/piper
0
9 个月 前
#28494 引用
root@debian12:~# pip install piper-tts
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
0