2024年11月21日星期四 下午6:30:37

Voice in Home Assistant

1 年 前
#22665 引用
intents

https://github.com/home-assistant/intents/blob/main/sentences/en/_common.yaml



language: "en"
responses:
  errors:
    no_intent: "Sorry, I couldn't understand that"
    no_area: "No area named {{ area }}"
    no_domain: "{{ area }} does not contain a {{ domain }}"
    no_device_class: "{{ area }} does not contain a {{ device_class }}"
    no_entity: "No device or entity named {{ entity }}"
    handle_error: "An unexpected error occurred while handling the intent"



0
1 年 前
#22666 引用

https://github.com/home-assistant/intents/blob/main/sentences/en/light_HassTurnOn.yaml



language: "en"
intents:
  HassTurnOn:
    data:
      - sentences:
          - "<turn> on (<area> <name> <light_devices>|<name> <light_devices> [in <area>])"
          - "[<turn>] (<area> <name> <light_devices>|<name> <light_devices> [in <area>]) [to] on"
          - "activate (<area> <name> <light_devices>|<name> <light_devices> [in <area>])"
        expansion_rules:
          light_devices: "(light[s]|[light] switch[es])"
        requires_context:
          domain: "light"
      - sentences:
          - "<turn> on [all] <light> in <area>"
          - "<turn> on [all] <area> <light>"
          - "[<turn>] [all] <area> <light> on"
          - "[<turn>] [all] <light> [in] <area> on"
          - "activate [all] <light> [in] <area>"
          - "activate [all] <area> <light>"
        slots:
          domain: "light"
        response: "lights_area"

0
1 年 前
#22667 引用


https://github.com/home-assistant/intents/blob/main/sentences/zh-cn/_common.yaml



language: zh-cn
settings:
  ignore_whitespace: true
responses:
  errors:
    no_intent: "抱歉,我不能理解"
    no_area: "找不到名为 {{ area }} 的区域"
    no_domain: "{{ area }} 中找不到 {{ domain }}"
    no_device_class: "{{ area }} 中找不到 {{ device_class }}"
    no_entity: "找不到名为 {{ entity }} 的实体"
    handle_error: "处理意图时发生意外错误"
lists:
  color:
    values:
      - in: "白色"
        out: "white"
      - in: "黑色"
        out: "black"
      - in: "红色"
        out: "red"
      - in: "橙色"
        out: "orange"
      - in: "黄色"
        out: "yellow"
      - in: "绿色"
        out: "green"
      - in: "蓝色"
        out: "blue"
      - in: "紫色"
        out: "purple"
      - in: "棕色"
        out: "brown"
  brightness:
    range:
      type: "percentage"
      from: 0
      to: 100
  temperature:
    range:
      type: "temperature"
      from: 0
      to: 100
  temperature_unit:
    values:
      - in: "(摄氏度|°C|℃|度)"
        out: "celsius"
      - in: "(华氏度|°F|℉)"
        out: "fahrenheit"
  brightness_level:
    values:
      - in: "最(亮|高|大)"
        out: 100
      - in: "最(暗|低|小)"
        out: 1
  on_off_states:
    values:
      - in: "(打开|开着|开了)[的]"
        out: "on"
      - in: "(关闭|关着|关了)[的]"
        out: "off"
  on_off_domains:
    values:
      - in: "(灯|吸顶灯|筒灯|射灯|台灯|床头灯|灯光)"
        out: light
      - in: "(风扇|电扇|塔扇|吊扇)"
        out: fan
      - in: "(开关|电源|插座|通断器)"
        out: switch
  cover_states:
    values:
      - in: "(打开|开着|开了)[的]"
        out: open
      - in: "(关闭|关着|关了)[的]"
        out: closed
      - in: "打开中"
        out: opening
      - in: "关闭中"
        out: closing
  cover_classes:
    values:
      - in: "(遮阳|雨)(蓬|棚)"
        out: awning
      - in: "(百叶窗|百叶帘|卷帘)"
        out: blind
      - in: "窗帘"
        out: curtain
      - in: "(门|房门|卷闸门)"
        out: door
      - in: "车库门"
        out: garage
      - in: "(大门|院子门|铁门)"
        out: gate
      - in: "遮阳帘"
        out: shade
      - in: "百叶窗户"
        out: shutter
      - in: "窗户"
        out: window
  lock_states:
    values:
      - in: "(已上锁|锁着|锁上|锁了)[的]"
        out: locked
      - in: "(已解锁|没[有][上]锁)[的]"
        out: unlocked

expansion_rules:
  name: "{name}[的]"
  area: "{area}[的]"
  let: "[把|将|让|给]"
  all: "(全部|所有)[的]"
  what_is: "是什么"
  how_many_is: "(是多少|有多少|有几个)"
  which: "[有|有没有|有無]哪[一](个|些)"
  brightness: "[百分之]{brightness}[%]"
  to: "(为|到|成|至)"
  set_to: "(设置|设定|调节|调|设)(为|到|至)"
  turn_on: "(打开|开启|开)"
  turn_off: "(关闭|关掉|关了|关)"
  open: "(打开|开)"
  close: "(关闭|关掉|关了|关)"
  light: "(灯|吸顶灯|筒灯|射灯|台灯|床头灯|灯光)[的]"
  temp: "温度"
  temperature: "{temperature}[{temperature_unit}]"
skip_words: []

0
1 年 前
#22668 引用

https://github.com/home-assistant/intents/blob/main/sentences/zh-cn/light_HassTurnOn.yaml



language: zh-cn
intents:
  HassTurnOn:
    data:
      - sentences:
          - "<turn_on><area><light>"
          - "[<let>]<area><light><turn_on>"
        slots:
          domain: light
        response: lights_area

0
1 年 前
#23790 引用
How it works

streaming the wav audio to HomeAssistant。

I have a ESP32 with I2S Mic using ESPHome and successfully detect wakeword and streaming the wav audio to HomeAssistant, but it work with Pipeline which using English only
https://community.home-assistant.io/t/esp32-mic-only-work-with-english-pipeline/642490
0
10 个月 前
#28341 引用
1
0
10 个月 前
#28342 引用
Setting up custom sentences in configuration.yaml

custom intent change

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

custom sentences


https://rhasspy.readthedocs.io/en/latest/intent-handling/



Speech to Text
Intent Recognition
Intent Handling


0
10 个月 前
#28344 引用
Extending built-in intents

https://www.home-assistant.io/integrations/conversation/



# Example on_off.yaml entry
language: "en"
intents:
  HassTurnOn:
    data:
      - sentences:
          - "engage [the] kitchen lights"
        slots:
          name: "kitchen lights"
  HassTurnOff:
    data:
      - sentences:
          - "disengage [the] kitchen lights"
        slots:
          name: "kitchen lights"
0
7 个月 前
#29852 引用
这个https://github.com/Romkabouter做了很多远程连接方案,其中有个里面有原理图可以搞

https://github.com/Romkabouter/ESP32-Rhasspy-Satellite

ESP32-Rhasspy-Satellite Public
The repo has implementing an esp32 standalone MQTT audio streamer. Is is desinged to work as a satellite for Rhasspy (https://rhasspy.readthedocs.io/en/latest/). It supports multiple devices
0
6 个月 前
#33013 引用
https://github.com/rhasspy/piper/
https://github.com/rhasspy/wyoming-piper




I am on RPi3b+, bookwoom 64bit

docker installation

Install Whisper and piper using the provided Docker image
whisper Docker image
https://hub.docker.com/r/rhasspy/wyoming-whisper
piper docker image
https://hub.docker.com/r/rhasspy/wyoming-piper

Note
I’ve tries with Raspberry 3B+ and Raspberry OS (32bit) and seems images are only for ARM64

Well basically it’s simple to install whisper and piper.
I used this for piper 339 and this for whisper 182.
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


HassOS
The existing doc   talk about the installation of the HA OS addon.
https://www.home-assistant.io/voice_control/voice_remote_local_assistant/

The documentation within the repo only says:
Navigate in your Home Assistant frontend to Settings → Add-ons → Add-on store.
Find the “Piper” add-on and click it.
Click on the “INSTALL” button.


Home Assistant Voice assistant Supported Languages




https://developers.home-assistant.io/docs/voice/intent-recognition/supported-languages/


...
zh-cn  简体中文  al-one  Sentences
...



麦克风这些东西,都容易泄露家庭隐私,所以最开始的思路,全部放弃。泄露隐私的传感器,保证从硬件上维护家庭隐私。

硬件,软件,网络,和专用安全设备

HA正好,本地局域网内的 只要不接到公网。既保证了安全性,也保证了稳定性。
0