Code Monkey home page Code Monkey logo

Comments (18)

synesthesiam avatar synesthesiam commented on September 5, 2024 3

Sorry everyone for all of the hacks needed to get things running :/
I'm heavily focused on wake word stuff for Home Assistant at the moment, but I will return to get things cleaned up in Rhasspy soon.

from rhasspy3.

WarLL3 avatar WarLL3 commented on September 5, 2024 1

may you explain how you realised this setup?

from rhasspy3.

benbender avatar benbender commented on September 5, 2024 1

@bendikrb would you mind to share your process and config? Would be gorgeous! <3

from rhasspy3.

bendikrb avatar bendikrb commented on September 5, 2024 1

I didn't, actually.
However, I'm encouraged to give it another try now that I see the latest commits to the wyoming-v1 branch + the pending pull requests from @Shulyaka

from rhasspy3.

bendikrb avatar bendikrb commented on September 5, 2024

Never mind - I just discovered https://github.com/synesthesiam/homeassistant-pipeline/blob/master/audio_to_audio.py
Thanks :)

from rhasspy3.

bendikrb avatar bendikrb commented on September 5, 2024

.. it just needs a little tweak to read audio like the websocket program does, not from stdin..

from rhasspy3.

lightsabata avatar lightsabata commented on September 5, 2024

@bendikrb i'm also interested how you manage to make it work

from rhasspy3.

benbender avatar benbender commented on September 5, 2024

@bendikrb would love to see a working implementation!

from rhasspy3.

lightsabata avatar lightsabata commented on September 5, 2024

with your advice i was able to make it work with the following method:

Download https://github.com/rhasspy/rhasspy3/tree/wyoming-v1

After configuring with the tutorial with your needs, you must install the program/remote/home_assistant

mkdir -p config/programs/remote/
cp -R programs/remote/home_assistant config/programs/remote/
config/programs/remote/home_assistant/script/setup

the edit your configuration (here's mine):

programs:
  mic:
    arecord:
      command: |
        arecord -q -r 16000 -c 1 -f S16_LE -t raw -
      adapter: |
        mic_adapter_raw.py --rate 16000 --width 2 --channels 1
  wake:
    <YOUR_PREFERED_WAKE_WORD_PROGRAM:
  snd:
    aplay:
      command: |
        aplay --device rhasspy -q -r 22050 -f S16_LE -c 1 -t raw
      adapter: |
        snd_adapter_raw.py --rate 22050 --width 2 --channels 1
  remote:
    home_assistant:
      command: |
        bin/assist_pipeline.py --token "${token}" --server "${server}"
      template_args:
        token: "<YOUR_LIVE_LONG_ACCESS_TOKEN>"
        server: "<YOUR_HOME_ASSISTANT_URI:PORT>"

satellites:
  default:
    mic:
      name: arecord
    wake:
      name: <YOUR_PREFERED_WAKE_WORD_PROGRAM>
    remote:
      name: home_assistant
    snd:
      name: aplay

Make sure to have piper and whisper on home assistant correctly configure (settings must be the same betwen add-ons configuration and vocal assistant setting in home assistant.

then you can run the following command to start listening on the rhasspy3 folder:

script/run bin/satellite_run.py --debug --loop

there is must be other and nicer ways to make it work and i would love to improve this

from rhasspy3.

Shulyaka avatar Shulyaka commented on September 5, 2024

This is a very early developer preview, so don't worry about that!

from rhasspy3.

lightsabata avatar lightsabata commented on September 5, 2024

i agree with Shulyaka.
I've just testing with nabu casa assistant cloud. it is pretty rock solid and at this state it work better than any voice assisant that i know so far! (speed, accuracy, customization) you've definitely earn my subscription !
By the way is there a method to output a sound after a wake word triggering ? (perhaps i'm a little too impatient)

from rhasspy3.

Shulyaka avatar Shulyaka commented on September 5, 2024

By the way is there a method to output a sound after a wake word triggering ?

Try this:

pipelines:
  default:
    wake:
      name: porcupine1
      after:
        command: |
          aplay activation.wav

from rhasspy3.

lightsabata avatar lightsabata commented on September 5, 2024

Thanks, unfortunately it doesn't seems to work on my config

from rhasspy3.

Shulyaka avatar Shulyaka commented on September 5, 2024

Replace activation.wav with the path to the actual file you want to play. Also, it's not a full pipeline, just the important parts.

from rhasspy3.

lightsabata avatar lightsabata commented on September 5, 2024

yes, i've also try with the full command (same as snd program) without success:

satellites:
  default:
    mic:
      name: arecord
    wake:
      name: porcupine2
      after: 
        command: |
          aplay --device rhasspy -q -r 22050 -f S16_LE -c 1 -t raw "${data_dir}/wake_alfred.wav"
    remote:
      name: home_assistant
    snd:
      name: aplay

from rhasspy3.

Shulyaka avatar Shulyaka commented on September 5, 2024

Ah, it the satellites! I don't know if it is supported, never tried it yet.

from rhasspy3.

lightsabata avatar lightsabata commented on September 5, 2024

Does it work on your side on pipeline mode ? I tried too but it doesn't seems to work either (it might be a specific problem to my configuration)

EDIT: nevermind, i have not see that you've made a commit for that and it work on pipeline but not on satellite
To not mess with this thread, i've created a new one : (#47)

from rhasspy3.

RobertLukan avatar RobertLukan commented on September 5, 2024

I followed the instructions here and it works. I only had issue with this:

File "/home/pi/rhasspy3-wyoming/rhasspy3/config/programs/remote/home_assistant/bin/assist_pipeline.py", line 14, in
import aiohttp
ModuleNotFoundError: No module named 'aiohttp'

I have manually installed aiohttp.

I hope this tree gets merged with the main as it is very cool functionality. I was trying to achieve the same with wyoming-satellite but I am having several issues with the wake word while here wake word runs very nicely.

from rhasspy3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.