Skip to content

Commit

Permalink
Allow configuration of mic/snd devices
Browse files Browse the repository at this point in the history
  • Loading branch information
synesthesiam committed Aug 22, 2023
1 parent 3b585b8 commit 6672475
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion assist_microphone/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 0.2.1
version: 0.2.3
slug: assist_microphone
name: assist_microphone
description: Stream microphone audio to Assist
Expand All @@ -9,12 +9,16 @@ arch:
- aarch64
options:
token: null
mic_device: ""
snd_device: ""
volume: 1.0
awake_sound: true
done_sound: true
debug_logging: false
schema:
token: str
mic_device: str
snd_device: str
volume: float
awake_sound: bool
done_sound: bool
Expand Down
3 changes: 3 additions & 0 deletions assist_microphone/hass_satellite/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ async def main() -> None:
_LOGGER.fatal("Please install ffmpeg")
sys.exit(1)

for device in sd.query_devices():
_LOGGER.debug(device)

args.mic_device = args.mic_device or args.device
args.snd_device = args.snd_device or args.device

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ fi
exec python3 -m hass_satellite \
'homeassistant' \
"$(bashio::config 'token')" \
--mic-device "$(bashio::config 'mic_device')" \
--snd-device "$(bashio::config 'snd_device')" \
--volume "$(bashio::config 'volume')" \
--vad-model /usr/src/models/silero_vad.onnx ${extra_args[@]}

0 comments on commit 6672475

Please sign in to comment.