Preparing Your Signed URL
Summarizing an audio file located on a signed AWS/GCP URL is pretty simple with the Wordcab API. First, if you haven't created an signed URL, you can check out the AWS guide here, or the GCP guide here. Make sure you set the expiration parameter to at least 10 minutes. Then, in Python, enter the following.
import requests
endpoint = "https://wordcab.com/api/upload/" # <= Slash required
apikey = "YOUR_API_KEY"
display_name = "Audio Example",
source = "signed_url" # <= Important
signed_url = "YOUR_SIGNED_URL"
only_api = "false" # <= "false" is the default only_api value
params = {
"apikey": apikey,
"display_name": display_name,
"source": source,
"signed_url": signed_url,
"only_api": only_api
}
r = requests.post(endpoint, params=params)
job_name = r.json()["job_name"]
print(job_name)
You'll receive a job_name that you can use to poll your summarization job - or check the progress on your dashboard if you set only_api to false. Once the job is complete, the same request will output a summary, transcript, and a Wordcab web app link.
import requests
endpoint = "https://wordcab.com/api/upload" # <= Slash optional
# OR endpoint = "https://wordcab.com/api/meetings"
params = {
"apikey": apikey,
"job_name": job_name,
"summary_len": 3 # <= Defaults to 3, accepts value of 1-5
}
r = requests.get(endpoint, params=params)
print(r.json())