Created
April 13, 2025 19:04
-
-
Save kanzure/1a83a277e4db4805e77acef4126aea52 to your computer and use it in GitHub Desktop.
use groq whisper with aider for /voice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/aider/voice.py b/aider/voice.py | |
index c9af7ae9..ae4bfba8 100644 | |
--- a/aider/voice.py | |
+++ b/aider/voice.py | |
@@ -167,7 +167,7 @@ class Voice: | |
with open(filename, "rb") as fh: | |
try: | |
transcript = litellm.transcription( | |
- model="whisper-1", file=fh, prompt=history, language=language | |
+ model="groq/whisper-large-v3", file=fh, prompt=None, language=language | |
) | |
except Exception as err: | |
print(f"Unable to transcribe {filename}: {err}") | |
@@ -181,7 +181,7 @@ class Voice: | |
if __name__ == "__main__": | |
- api_key = os.getenv("OPENAI_API_KEY") | |
+ api_key = os.getenv("GROQ_API_KEY") | |
if not api_key: | |
- raise ValueError("Please set the OPENAI_API_KEY environment variable.") | |
+ raise ValueError("Please set the GROQ_API_KEY environment variable.") | |
print(Voice().record_and_transcribe()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment