mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
feat: Handle voice-format command line argument
This commit is contained in:
parent
3d2de00f49
commit
07337d2f41
2 changed files with 3 additions and 1 deletions
|
@ -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?"
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue