From 2b1de442ed442c96b4cbd888acf8959102294084 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 10 Aug 2023 16:15:02 -0300 Subject: [PATCH] aider: Updated `cmd_voice` method to call `record_and_transcribe` function from `aider/voice.py` module and return its results. # Aider chat conversation: USER: the /voice cmd should call `record_and_transcribe` and return the results ASSISTANT: To implement the `/voice` command, we need to modify the `aider/commands.py` file. Specifically, we need to update the `cmd_voice` method to call the `record_and_transcribe` function from the `aider/voice.py` module and return its results. Here's the *edit block* for this change: python aider/commands.py <<<<<<< HEAD def cmd_voice(self, args): "Respond with 'hi gpt'" return 'hi gpt' ======= from .voice import record_and_transcribe def cmd_voice(self, args): "Record and transcribe voice input" return record_and_transcribe() >>>>>>> updated --- aider/commands.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 981e0143b..f53490c1e 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -434,9 +434,11 @@ class Commands: else: self.io.tool_output(f"{cmd} No description available.") + from .voice import record_and_transcribe + def cmd_voice(self, args): - "Respond with 'hi gpt'" - return 'hi gpt' + "Record and transcribe voice input" + return record_and_transcribe() def expand_subdir(file_path):