POST Audio/Video Files
Learn how to upload Audio/Video Files and URL
Now that you have generated the accessToken
this page will guide you upload Audio/Video Files or URLs to get a unique Transaction ID txnId.
What is a Transaction ID txnID
?
txnID
?A Transaction ID txnId
is a unique ID given to each conversation file that has been uploaded. A conversation can be an audio or a video file or downloable URL.
Upon submitting an audio/video file a unique Transaction ID txnId
is returned. This can be used to refer to this particular Conversation to invoke other API calls in the Speech Analytics API.
Uploading a conversation
The source of the audio/video file can be either a local file or a URL. Depending on the source there are two different endpoints given below.
Supported Format: .mp4 .m4a .avi .mp3 .wav
Uploading a Local File
POST
https://api.marsview.ai/cb/v1/conversation/save_file
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Authorization | string | API token with type(Bearer) |
Request Body
Name | Type | Description |
---|---|---|
file | string | The Bitstream of the audio/video file. |
title | string | Title of the conversation. |
description | string | Description of the conversation. |
Uploading via URL
POST
https://api.marsview.ai/cb/v1/conversation/save_file_link
Headers
Name | Type | Description |
---|---|---|
Authorization | string | API token with type(Bearer) |
application-type | string | application/json |
Request Body
Name | Type | Description |
---|---|---|
title | string | Title of the conversation |
description | string | Description of the conversation |
link | string | Publicly accessible URL link to the conversation |
Deleting a conversation
Use this API to permanently delete a conversation along with all of its metadata from the Marsview Cloud.
Delete Conversation
DELETE
https://api.marsview.ai/cb/v1/conversation/delete_file/:txnId
Path Parameters
Name | Type | Description |
---|---|---|
txnId | string | Transaction Id |
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application-json |
Authorization | string | API token with type(bearer) |
NOTE: Once deleted the conversation and its metadata will be permanently deleted and cannot be recovered.
Example: How to upload a local Audio/Video File?
Step 1: Get the authentication token accessToken
.
accessToken
. Using yourapiKey
and apiSecret
you can generate the accessToken
as shown below.
Step 2: Upload a local audio/video file.
Upload a local audio/video file as shown below. Fill in the FILE_PATH
, TITLE
and DESCRIPTION
for the audio/video file.
Example: How to upload a public URL or an s3 Presigned URL?
Step 1: Get the authentication token.
Using your apiKey
and apiSecret
you can generate the accessToken
as shown below.
Step 2: Create an s3 pre-signed URL or use a public URL.
In this example, we will use a public URL and upload it to Marsview Conversation intelligence APIs
For more information on how to create an s3 pre-signed URL refer to AWS Documentation
Please keep a minimum 20 minutes expiry on the pre-signed URL for ensuring a higher success rate of processing. In case the URL has already expired by the time Marsview picks up the request the compute API will return a Failure status with status code AIRDOW002
Last updated