From 07337d2f41a2f0a6ed3742260abd7c0b38d00bbb Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 30 Dec 2024 14:19:14 -0400 Subject: [PATCH] feat: Handle voice-format command line argument --- aider/commands.py | 3 ++- aider/main.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index 2bd602f3c..3a0a2e5f5 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -55,6 +55,7 @@ class Commands: coder, voice_language=None, voice_input_device=None, + voice_format=None, verify_ssl=True, args=None, parser=None, @@ -1119,7 +1120,7 @@ class Commands: self.io.tool_error("To use /voice you must provide an OpenAI API key.") return try: - self.voice = voice.Voice(audio_format="wav", device_name=self.voice_input_device) + self.voice = voice.Voice(audio_format=self.voice_format or "wav", device_name=self.voice_input_device) except voice.SoundDeviceError: self.io.tool_error( "Unable to import `sounddevice` and/or `soundfile`, is portaudio installed?" diff --git a/aider/main.py b/aider/main.py index 2d0e55e84..26357c447 100644 --- a/aider/main.py +++ b/aider/main.py @@ -806,6 +806,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F None, voice_language=args.voice_language, voice_input_device=args.voice_input_device, + voice_format=args.voice_format, verify_ssl=args.verify_ssl, args=args, parser=parser,