mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 11:45:00 +00:00
Switched voice to litellm
This commit is contained in:
parent
cf2a48b21f
commit
f1c09ececf
2 changed files with 14 additions and 4 deletions
|
@ -3,6 +3,7 @@ import queue
|
|||
import tempfile
|
||||
import time
|
||||
|
||||
import litellm
|
||||
import numpy as np
|
||||
|
||||
try:
|
||||
|
@ -86,9 +87,8 @@ class Voice:
|
|||
while not self.q.empty():
|
||||
file.write(self.q.get())
|
||||
|
||||
# TODO: fix client!
|
||||
with open(filename, "rb") as fh:
|
||||
transcript = self.client.audio.transcriptions.create(
|
||||
transcript = litellm.transcription(
|
||||
model="whisper-1", file=fh, prompt=history, language=language
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue