Documentations

ASR upload files

Service: asr.api.yating.tw/v1/
If your audio files aren't accessible via a URL already (like in an S3 bucket, static file server, or via an API like Twilio), you can upload your files directly to the Yating ASR.
Once your upload finishes, you'll get back a JSON response that includes an url pointing to a private URL, accessible only to Yating’s backend servers, that you can submit for processing via the /v1/transcriptions endpoint. The url will expire within 24 hours.

Upload files

Request
URL: /v1/uploads/
Method: POST
cURL example
curl --location --request POST 'https://asr.api.yating.tw/v1/uploads' \
--header 'Key: your_key\
--form 'file=@"your_audio_file_Path"'
Example: upload with Python script
import requests

fileName = "your_file"

headers = {'key': "your_key"}
files = {'file': open(fileNSame,'rb')}
response = requests.post('https://asr.api.yating.tw/v1/uploads',
                        headers=headers,
                        files=files)

print(response.json())
Response
{
"fileName": "your_file",
  "url": "yd://67fa7103-5c66-4724-bd53-280e36f40c3f",
  "expiredAt": "2022-08-03T15:11:40.000Z"
}

List uploaded files

Request
URL: /v1/uploads/
Method: GET
Headers
Name
Type
Info
*key
String
Bearer {key}
Response
[
    {
        "fileName": "fileName1",
        "url": "yd://happy-121d94db.mp3",
        "expiredAt": "2022-08-03T15:11:40.000Z"
    },
    {
        "fileName": "fileName2",
        "url": "yd://happy-4f3598be.mp3",
        "expiredAt": "2022-08-03T15:11:40.000Z"
    },
    {
        "fileName": "fileName3",
        "url": "yd://rfc4180-691be6.txt",
        "expiredAt": "2022-08-03T15:11:40.000Z"
    }
]