GroqTools allows an Agent to interact with the Groq API for performing fast audio transcription, translation, and text-to-speech (TTS).
Prerequisites
Before usingGroqTools, ensure you have the groq and openai libraries installed and your Groq API key configured.
-
Install dependencies:
-
Set your API key: Obtain your API key from the Groq Console and set it as an environment variable.
Initialization
ImportGroqTools and add it to your Agent’s tool list.
Usage Examples
1. Transcribing Audio
Transcribe an audio file hosted at a URL:transcription_agent.py
2. Translating Audio and Generating Speech
Translate an audio file (e.g., French) to English, then generate a new audio file from the translated text.translation_agent.py
Toolkit Params
Toolkit Functions
TheGroqTools toolkit provides the following functions: