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:

<source>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
</source>
This commit is contained in:
Paul Gauthier 2023-08-10 16:15:02 -03:00
parent 8b0c5ff7f2
commit 2b1de442ed

View file

@ -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):