Skip to content

Commit

Permalink
Assist microphone 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
synesthesiam committed Oct 13, 2023
1 parent b00bdda commit 4731121
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 39 deletions.
8 changes: 8 additions & 0 deletions assist_microphone/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.2.0

- Upgrade to `homeassistant-satellite` v2.2.0
- Use alsa/pulse instead of libportaudio
- Add `pipeline` option to run a different pipeline by name
- Remove `mic_device` and `snd_device`
- Clean up docs

## 1.2.0

- Add `volume_multiplier`
Expand Down
26 changes: 6 additions & 20 deletions assist_microphone/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ or follow these steps to manually install the add-on:

1. Navigate in your Home Assistant frontend to **Settings** -> **Add-ons** -> **Add-on store**.
2. Add the store https://github.com/rhasspy/hassio-addons
3. Find the "porcupine1" add-on and click it.
3. Find the "Assist Microphone" add-on and click it.
3. Click on the "INSTALL" button.

## How to use
Expand All @@ -31,16 +31,6 @@ To create a token:
6. Paste the token into this add-on's configuration page
7. Click **Save** and then start the add-on

After this add-on is running, it will be automatically discovered by the Wyoming
integration in Home Assistant. To finish the setup, click the following my
button:

[![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=wyoming)

Alternatively, you can install the Wyoming integration manually, see the
[Wyoming integration documentation](https://www.home-assistant.io/integrations/wyoming/)
for more information.

## Configuration

### Option: `token`
Expand All @@ -63,7 +53,11 @@ Automatic volume boost for microphone (0 is disabled, 31 dbfs is max). A value o

### Option: `volume_multiplier`

Multiply volume by fixed value (1.0 = no change, 2.0 = twice as loud). 1.0 is the default.
Multiply microphone volume by fixed value (1.0 = no change, 2.0 = twice as loud). 1.0 is the default.

### Option: `pipeline`

Name of pipeline to run. The preferred pipeline is run by default.

### Option: `wake_buffer_seconds`

Expand All @@ -73,14 +67,6 @@ Seconds of audio to keep for STT after wake word is detected. If you disable the

True if audio will be sent via UDP on port 5000 (raw 16-bit 16Khz mono PCM).

### Option: `mic_device`

Number or name of microphone device (audio input). You should probably change the audio input device at the bottom of the configuration page instead of this.

### Option: `snd_device`

Number or name of sound device (audio output). You should probably change the audio input device at the bottom of the configuration page instead of this.

### Option: `volume`

Playback volume from 0 (mute) to 1 (max).
Expand Down
4 changes: 2 additions & 2 deletions assist_microphone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN \
&& apt-get install -y --no-install-recommends \
build-essential \
libasound2-plugins \
libportaudio2 \
alsa-utils \
ffmpeg \
python3 \
python3-pip \
Expand All @@ -23,7 +23,7 @@ RUN \
setuptools \
wheel \
&& pip3 install --no-cache-dir \
"homeassistant_satellite[silerovad]@https://github.com/synesthesiam/homeassistant-satellite/archive/refs/tags/${HOMEASSISTANT_SATELLITE_VERSION}.tar.gz" \
"homeassistant_satellite[silerovad,webrtc]@https://github.com/synesthesiam/homeassistant-satellite/archive/refs/tags/${HOMEASSISTANT_SATELLITE_VERSION}.tar.gz" \
\
&& apt-get remove --yes build-essential python3-dev \
&& apt-get clean \
Expand Down
2 changes: 1 addition & 1 deletion assist_microphone/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ codenotary:
signer: [email protected]
base_image: [email protected]
args:
HOMEASSISTANT_SATELLITE_VERSION: v1.2.0
HOMEASSISTANT_SATELLITE_VERSION: v2.2.0
8 changes: 3 additions & 5 deletions assist_microphone/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 1.2.1
version: 2.2.0
slug: assist_microphone
name: Assist Microphone
description: Stream microphone audio to Assist
Expand All @@ -12,8 +12,6 @@ map:
options:
token: null
vad: "disabled"
mic_device: ""
snd_device: ""
volume: 1.0
awake_sound: "/usr/src/sounds/awake.wav"
done_sound: "/usr/src/sounds/done.wav"
Expand All @@ -22,13 +20,12 @@ options:
volume_multiplier: 1.0
wake_buffer_seconds: 0.0
udp_mic: false
pipeline: ""
debug_logging: false
debug_recording_dir: ""
schema:
token: str
vad: list(disabled|webrtcvad|silero)
mic_device: str
snd_device: str
volume: float
noise_suppression: int
auto_gain: int
Expand All @@ -37,6 +34,7 @@ schema:
done_sound: str
wake_buffer_seconds: float
udp_mic: bool
pipeline: str
debug_logging: bool
debug_recording_dir: str
init: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ fi
exec python3 -m homeassistant_satellite \
--host 'homeassistant' \
--token "$(bashio::config 'token')" \
--mic-device "$(bashio::config 'mic_device')" \
--snd-device "$(bashio::config 'snd_device')" \
--volume "$(bashio::config 'volume')" \
--awake-sound "$(bashio::config 'awake_sound')" \
--done-sound "$(bashio::config 'done_sound')" \
Expand All @@ -27,4 +25,5 @@ exec python3 -m homeassistant_satellite \
--auto-gain "$(bashio::config 'auto_gain')" \
--volume-multiplier "$(bashio::config 'volume_multiplier')" \
--vad "$(bashio::config 'vad')" \
--pipeline "$(bashio::config 'pipeline')" \
--debug-recording-dir "$(bashio::config 'debug_recording_dir')" ${extra_args[@]}
14 changes: 5 additions & 9 deletions assist_microphone/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ configuration:
volume_multiplier:
name: Volume multiplier
description: >-
Multiply volume by fixed value (1.0 = no change, 2.0 = twice as loud)
Multiply microphone volume by fixed value (1.0 = no change, 2.0 = twice as loud)
pipeline:
name: Pipeline
description: >-
Name of pipeline to run. The preferred pipeline is run by default.
wake_buffer_seconds:
name: Wake buffer seconds
description: >-
Expand All @@ -28,14 +32,6 @@ configuration:
name: UDP Microphone
description: >-
True if audio will be sent via UDP on port 5000 (raw 16-bit 16Khz mono PCM).
mic_device:
name: Microphone device
description: >-
Number or name of microphone device (audio input)
snd_device:
name: Sound device
description: >-
Number or name of sound device (audio output)
volume:
name: Volume
description: >-
Expand Down

0 comments on commit 4731121

Please sign in to comment.