Created
April 5, 2023 01:41
-
-
Save atharvashukla/39b55e92c6a2512e871c416add1b01e7 to your computer and use it in GitHub Desktop.
Printing timestamps with Whisper API call
This file contains 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
#!/bin/bash | |
API_KEY="$1" | |
FILE_PATH="$2" | |
MODEL_NAME="whisper-1" | |
curl -X POST "https://api.openai.com/v1/audio/transcriptions" \ | |
-H "Authorization: Bearer $API_KEY" \ | |
-H "Content-Type: multipart/form-data" \ | |
-F "file=@$FILE_PATH" \ | |
-F "model=$MODEL_NAME" \ | |
-F "response_format=vtt" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment