diff --git a/assist_microphone/config.yaml b/assist_microphone/config.yaml index 613d57c..6e0a96b 100644 --- a/assist_microphone/config.yaml +++ b/assist_microphone/config.yaml @@ -1,5 +1,5 @@ --- -version: 0.2.1 +version: 0.2.3 slug: assist_microphone name: assist_microphone description: Stream microphone audio to Assist @@ -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 diff --git a/assist_microphone/hass_satellite/__main__.py b/assist_microphone/hass_satellite/__main__.py index 24f965d..7aeddbb 100644 --- a/assist_microphone/hass_satellite/__main__.py +++ b/assist_microphone/hass_satellite/__main__.py @@ -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 diff --git a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/run b/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/run index 46843dd..b1af722 100755 --- a/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/run +++ b/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/run @@ -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[@]}