Skip to content

Commit

Permalink
docs - groq speech to text
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Jul 4, 2024
1 parent 8ffa690 commit 8206707
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/my-website/docs/providers/groq.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,21 @@ if tool_calls:
model="groq/llama2-70b-4096", messages=messages
) # get a new response from the model where it can see the function response
print("second response\n", second_response)
```

## Speech to Text - Whisper

```python
os.environ["GROQ_API_KEY"] = ""
audio_file = open("/path/to/audio.mp3", "rb")

transcript = litellm.transcription(
model="groq/whisper-large-v3",
file=audio_file,
prompt="Specify context or spelling",
temperature=0,
response_format="json"
)

print("response=", transcript)
```

0 comments on commit 8206707

Please sign in to comment.