mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
Refactor record_and_transcribe method in voice.py to accept a language parameter.
This commit is contained in:
parent
23579d4741
commit
bddcdd39a8
2 changed files with 2 additions and 2 deletions
|
@ -465,7 +465,7 @@ class Commands:
|
|||
history = "\n".join(history)
|
||||
dump(history)
|
||||
|
||||
text = v.record_and_transcribe(history, self.voice_language)
|
||||
text = v.record_and_transcribe(history, language=self.voice_language)
|
||||
if text:
|
||||
self.io.add_to_input_history(text)
|
||||
print()
|
||||
|
|
|
@ -54,7 +54,7 @@ class Voice:
|
|||
dur = time.time() - self.start_time
|
||||
return f"Recording, press ENTER when done... {dur:.1f}sec {bar}"
|
||||
|
||||
def record_and_transcribe(self, history=None):
|
||||
def record_and_transcribe(self, history=None, language=None):
|
||||
try:
|
||||
return self.raw_record_and_transcribe(history)
|
||||
except KeyboardInterrupt:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue