Add volume arg to parser (#335)
This PR adds the mic volume to the arg parser and makes the value range from 1-100
This commit is contained in:
1 parent
b339f76b7d
commit
ec70b3b58d
4 files changed
+10
-4
No files matched your search
@@ -71,6 +71,7 @@ async def main() -> None:
|
||||
action="store_true",
|
||||
help="List audio output devices and exit",
|
||||
)
|
||||
parser.add_argument("--mic-volume", type=int, default=100, choices=list(range(1, 101)), help="Microphone volume level (1 to 100)")
|
||||
parser.add_argument("--mic-auto-gain", type=int, default=0, choices=list(range(32)))
|
||||
parser.add_argument("--mic-noise-suppression", type=int, default=0, choices=(0, 1, 2, 3, 4))
|
||||
parser.add_argument(
|
||||
@@ -282,6 +283,8 @@ async def main() -> None:
|
||||
_LOGGER.exception("Extras for webrtc are not installed")
|
||||
sys.exit(1)
|
||||
|
||||
if args.mic_volume > 0.0:
|
||||
preferences.mic_volume = args.mic_volume
|
||||
if args.mic_auto_gain > 0:
|
||||
preferences.mic_auto_gain = args.mic_auto_gain
|
||||
|
||||
|
||||
Reference in new issue
Block a user