Skip to content

Instantly share code, notes, and snippets.

@toshvelaga
Created March 15, 2024 15:54
Show Gist options
  • Save toshvelaga/8cd74710c4b6ff80d5506c93c3d055a3 to your computer and use it in GitHub Desktop.
Save toshvelaga/8cd74710c4b6ff80d5506c93c3d055a3 to your computer and use it in GitHub Desktop.
def run_inference(access_token):
url = "https://inference.datacrunch.io/v1/audio/whisperx-v2/generate"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {access_token}"
}
data = {
"audio_input": "https://audio.adjustleads.com/baltimore-city/recording_1710384621017.mp3"
}
response = requests.post(url, headers=headers, json=data)
print(response.text) # Add this line to inspect the raw response
# print(response.json())
@arpol
Copy link

arpol commented Mar 15, 2024

Does this work?

curl -X POST 'https://inference.datacrunch.io/v1/audio/whisperx-v2/generate' \
--header 'authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
--data '{
    "audio_input": "https://audio.adjustleads.com/baltimore-city/recording_1710384621017.mp3"
}
'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment