Add sound volume multiplier

This commit is contained in:
Michael Hansen
2024-01-16 17:06:30 -06:00
parent a44dc28cdf
commit f6fcf74c3a
4 changed files with 40 additions and 12 deletions
+2 -2
View File
@@ -159,7 +159,7 @@ class SatelliteBase:
try:
await async_write_event(event, self._writer)
except Exception as err:
self.clear_server()
await self.clear_server()
if isinstance(err, ConnectionResetError):
_LOGGER.warning("Server disconnected unexpectedly")
@@ -558,7 +558,7 @@ class SatelliteBase:
try:
if mute_microphone:
with wave.open(wav_path, "rb") as wav_file:
with wave.open(str(wav_path), "rb") as wav_file:
seconds_to_mute = wav_file.getnframes() / wav_file.getframerate()
seconds_to_mute += self.settings.mic.seconds_to_mute_after_awake_wav