From 47144a7e998b417cc01fa7290f438a7667c89912 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 10 Aug 2023 16:18:13 -0300 Subject: [PATCH] Add voice transcription to the `cmd_voice` command and output the transcribed text. --- aider/commands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index f53490c1e..adbe8468c 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -9,6 +9,7 @@ import tiktoken from prompt_toolkit.completion import Completion from aider import prompts +from aider.voice import record_and_transcribe from .dump import dump # noqa: F401 @@ -434,11 +435,11 @@ class Commands: else: self.io.tool_output(f"{cmd} No description available.") - from .voice import record_and_transcribe - def cmd_voice(self, args): "Record and transcribe voice input" - return record_and_transcribe() + text = record_and_transcribe() + self.io.tool_output(text) + return text def expand_subdir(file_path):