From a7242ca84689b85c817e71c43e6c070bf8add80e Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 30 Dec 2024 14:17:16 -0400 Subject: [PATCH] refactor: Pass voice settings to Commands as params --- aider/commands.py | 3 ++- aider/main.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index b8b111156..e9bc235b6 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -54,6 +54,7 @@ class Commands: io, coder, voice_language=None, + voice_input_device=None, verify_ssl=True, args=None, parser=None, @@ -1119,7 +1120,7 @@ class Commands: return try: self.voice = voice.Voice( - audio_format=self.args.voice_format, device_name=self.args.voice_input_device + audio_format="wav", device_name=self.voice_input_device ) except voice.SoundDeviceError: self.io.tool_error( diff --git a/aider/main.py b/aider/main.py index ee55261a2..4b0952d1a 100644 --- a/aider/main.py +++ b/aider/main.py @@ -802,6 +802,8 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F commands = Commands( io, None, + voice_language=args.voice_language, + voice_input_device=args.voice_input_device, verify_ssl=args.verify_ssl, args=args, parser=parser,