Skip to content

Instantly share code, notes, and snippets.

@kelly-liu
Forked from kbridbur/curl_example.txt
Last active February 21, 2019 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kelly-liu/397939809560780b2c32d8263a594a01 to your computer and use it in GitHub Desktop.
Save kelly-liu/397939809560780b2c32d8263a594a01 to your computer and use it in GitHub Desktop.
Use the Rev.ai API with curl!
$ YOUR_ACCESS_TOKEN=<your access token here>
# Send an audio file to Rev.ai
$ curl -X POST https://api.rev.ai/speechtotext/v1/jobs \
-H "Authorization: Bearer ${YOUR_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "{'media_url':'https://www.rev.ai/FTC_Sample_1.mp3'}"
# Retrieve your transcript
$ ID=<your job id here>
$ curl -X GET https://api.rev.ai/speechtotext/v1/jobs/${ID}/transcript \
-H "Authorization: Bearer ${YOUR_ACCESS_TOKEN}" \
-H "Accept: application/vnd.rev.transcript.v1.0+json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment