Exporting Your Transcript
Before you can upload your Sonix.ai transcript, you need to make sure it's properly formatted.
In the Sonix.ai web app, head to your transcript's editing page, make sure all speaker labels are in place, and click on the Speakers menu item. Then, click Collapse Matching Speakers.
Next, click export.
Choose the .txt option and make sure the Include speaker names option is enabled. Finally, download the transcript. Now we're ready to summarize!
Uploading with the UI
To upload your downloaded transcript using the Wordcab web app, start by clicking on the "Upload Transcript" button on the left or right side bars.
Choose Sonix.ai, and then upload the .txt file we downloaded in the previous step. Click Summarize Transcript and you should have a summary in no time.
Uploading with the API
Uploading your *Sonix.ai *.txt transcript with Python is really simple. Just make sure to include the source query parameter and assign it "sonix" as a value.
import requests
endpoint = "https://wordcab.com/api/upload/" # <= Slash required
apikey = "YOUR_API_KEY"
file_name = "your_transcript.txt"
file_path = f"/path/to/your/file/{file_name}"
display_name = "Transcript Example"
source = "sonix" # <= important
only_api = "false" # <= "false" is the default only_api value
files = {
"transcript": open(file_path, "rb")
}
params = {
"apikey": apikey,
"display_name": display_name,
"source": source,
"only_api": only_api
}
r = requests.post(endpoint, params=params, files=files)
job_name = r.json()["job_name"]
print(job_name)
You'll receive a job_name, which you can use to poll your summarization job. Once the job is complete, the same request will output a summary, transcript, share link, and other useful data.
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())