Skip to content

Instantly share code, notes, and snippets.

@atharvashukla
Created April 5, 2023 01:41
Show Gist options
  • Save atharvashukla/39b55e92c6a2512e871c416add1b01e7 to your computer and use it in GitHub Desktop.
Save atharvashukla/39b55e92c6a2512e871c416add1b01e7 to your computer and use it in GitHub Desktop.
Printing timestamps with Whisper API call
#!/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