https://github.com/bluebirdback/groq_transcribe
A Python library for transcribing audio files using Groq's Speech-to-Text API, with support for VTT and SRT subtitle formats.
https://github.com/bluebirdback/groq_transcribe
Last synced: over 1 year ago
JSON representation
A Python library for transcribing audio files using Groq's Speech-to-Text API, with support for VTT and SRT subtitle formats.
- Host: GitHub
- URL: https://github.com/bluebirdback/groq_transcribe
- Owner: BlueBirdBack
- License: mit
- Created: 2024-09-01T08:37:32.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-14T00:26:57.000Z (over 1 year ago)
- Last Synced: 2025-01-13T14:52:32.288Z (over 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# groq_transcribe
A Python library for transcribing audio files using Groq's Speech-to-Text API, with support for VTT and SRT subtitle formats.
## Features
- Transcribe audio files using Groq's Speech-to-Text API
- Generate VTT and SRT subtitle files from transcriptions
- Support for various audio formats (mp3, mp4, wav, etc.)
- Customizable transcription parameters (language, prompt, temperature)
## Installation
```bash
pip install groq_transcribe
```
## Usage
### Basic Transcription
```python
from groq_transcribe import transcribe
transcribe("path/to/audio_file.mp3")
```
This will generate three files:
- `audio_file.txt`: Plain text transcription
- `audio_file.vtt`: WebVTT subtitle file
- `audio_file.srt`: SRT subtitle file
### Advanced Usage
```python
from groq_transcribe import transcribe
transcribe(
"path/to/audio_file.mp3",
prompt="Transcribe the following medical lecture",
language="en",
temperature=0.2
)
```
### Command Line Interface
```bash
groq_transcribe path/to/audio_file.mp3 --prompt "Optional prompt" --language en --temperature 0.2
```
## Configuration
Set your Groq API key as an environment variable:
```bash
export GROQ_API_KEY=your_api_key_here
```
## Requirements
- Python 3.7+
- groq
- python-dotenv
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## Acknowledgements
This library uses the Groq API for speech-to-text transcription. Visit [Groq's documentation](https://console.groq.com/docs/speech-text) for more information on their Speech-to-Text capabilities.