NAV
General Flip Timed Text Speech
Quality Control

API

Telestream Cloud Timed Text Speech API lets external applications integrate with our automated transcription service to instantly create highly accurate captions and subtitles using speech to text technology.

Timed Text Speech API is REST based and returns responses in JSON. It allows you to create and manage Projects and custom vocabulary, submit transcription jobs and track their progress.

Using the REST API directly

If you don’t plan to use one of our SDKs you then you will need the following data to make calls to our API:

projects

projects

Code samples

require 'rest-client'
require 'json'


headers = {
  'Accept' => 'application/json'
}


result = RestClient.get 'https://api.cloud.telestream.net/tts/v1.0/projects',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Accept': 'application/json'
}


r = requests.get('https://api.cloud.telestream.net/tts/v1.0/projects', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


GET /projects

Returns a collection of Projects

Returns a collection of Projects

Example responses

{
  "projects": [
    {
      "id": "tg01a16130b9418395e68f844de8ab20",
      "account_id": "e4698e5be85a254e2bc65eac5f6c020a",
      "name": "Example project",
      "description": "string",
      "status": "available",
      "language": "en-US",
      "sample_rate": 16000,
      "profanity_filter": true,
      "generate_proxy": true,
      "custom_words": "string",
      "created_at": "2017-01-02T03:04:05Z",
      "updated_at": "2017-01-02T03:04:05Z"
    }
  ],
  "page": 1,
  "per_page": 30,
  "page_count": 1,
  "total_count": 1
}

Responses

Status Meaning Description Schema
200 OK OK ProjectsCollection

create project

Code samples

require 'rest-client'
require 'json'


headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}


result = RestClient.post 'https://api.cloud.telestream.net/tts/v1.0/projects',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}


r = requests.post('https://api.cloud.telestream.net/tts/v1.0/projects', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


POST /projects

Creates a new Project

Creates a new Project

Body parameter

{
  "id": "tg01a16130b9418395e68f844de8ab20",
  "account_id": "e4698e5be85a254e2bc65eac5f6c020a",
  "name": "Example project",
  "description": "string",
  "status": "available",
  "language": "en-US",
  "sample_rate": 16000,
  "profanity_filter": true,
  "generate_proxy": true,
  "custom_words": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}

Parameters

Parameter In Type Required Description
body body Project true No description

Example responses

{
  "id": "tg01a16130b9418395e68f844de8ab20",
  "account_id": "e4698e5be85a254e2bc65eac5f6c020a",
  "name": "Example project",
  "description": "string",
  "status": "available",
  "language": "en-US",
  "sample_rate": 16000,
  "profanity_filter": true,
  "generate_proxy": true,
  "custom_words": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}
{}

Responses

Status Meaning Description Schema
201 Created Created Project
400 Bad Request Invalid request body ErrorResponse
422 Unprocessable Entity Invalid request params None

project

Code samples

require 'rest-client'
require 'json'


headers = {
  'Accept' => 'application/json'
}


result = RestClient.get 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Accept': 'application/json'
}


r = requests.get('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


GET /projects/{projectID}

Returns the Project

Returns the Project

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project

Example responses

{
  "id": "tg01a16130b9418395e68f844de8ab20",
  "account_id": "e4698e5be85a254e2bc65eac5f6c020a",
  "name": "Example project",
  "description": "string",
  "status": "available",
  "language": "en-US",
  "sample_rate": 16000,
  "profanity_filter": true,
  "generate_proxy": true,
  "custom_words": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}

Responses

Status Meaning Description Schema
200 OK OK Project

update project

Code samples

require 'rest-client'
require 'json'


headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}


result = RestClient.put 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}


r = requests.put('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


PUT /projects/{projectID}

Updates an existing Project

Updates an existing Project

Body parameter

{
  "id": "tg01a16130b9418395e68f844de8ab20",
  "account_id": "e4698e5be85a254e2bc65eac5f6c020a",
  "name": "Example project",
  "description": "string",
  "status": "available",
  "language": "en-US",
  "sample_rate": 16000,
  "profanity_filter": true,
  "generate_proxy": true,
  "custom_words": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}

Parameters

Parameter In Type Required Description
body body Project true No description

Example responses

{
  "id": "tg01a16130b9418395e68f844de8ab20",
  "account_id": "e4698e5be85a254e2bc65eac5f6c020a",
  "name": "Example project",
  "description": "string",
  "status": "available",
  "language": "en-US",
  "sample_rate": 16000,
  "profanity_filter": true,
  "generate_proxy": true,
  "custom_words": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}

Responses

Status Meaning Description Schema
200 OK OK Project
400 Bad Request Invalid request body None
422 Unprocessable Entity Invalid request params None

delete project

Code samples

require 'rest-client'
require 'json'


result = RestClient.delete 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}',
  params: {
  }


p JSON.parse(result)


import requests


r = requests.delete('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}', params={


)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


DELETE /projects/{projectID}

Deletes the Project

Deletes the Project

Responses

Status Meaning Description Schema
204 No Content Deleted None

train project

Code samples

require 'rest-client'
require 'json'


headers = {
  'Accept' => 'application/json'
}


result = RestClient.post 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/train',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Accept': 'application/json'
}


r = requests.post('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/train', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/train");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


POST /projects/{projectID}/train

Queues training

Queues training

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project

Example responses

{}

Responses

Status Meaning Description Schema
200 OK OK None
409 Conflict Error ErrorResponse

jobs

jobs

Code samples

require 'rest-client'
require 'json'


headers = {
  'Accept' => 'application/json'
}


result = RestClient.get 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Accept': 'application/json'
}


r = requests.get('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


GET /projects/{projectID}/jobs

Returns a collection of Jobs

Returns a collection of Jobs

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project
page query integer false page number
per_page query integer false number of records per page

Example responses

{
  "jobs": [
    {
      "id": "7c0da16130b9418395e68f844de8ab20",
      "name": "abcdef",
      "original_filename": "demo.mp4",
      "project_id": "tg01a16130b9418395e68f844de8ab20",
      "source_url": "http://example.com/path/to/file.flac",
      "status": "pending",
      "error": "string",
      "progress": 0,
      "confidence": 0,
      "duration": 0,
      "bitrate": 192000,
      "sample_rate": 0,
      "format": "OGG_OPUS",
      "file_size": "string",
      "created_at": "2017-01-02T03:04:05Z",
      "updated_at": "2017-01-02T03:04:05Z"
    }
  ],
  "page": 1,
  "per_page": 30,
  "page_count": 2,
  "total_count": 60
}

Responses

Status Meaning Description Schema
200 OK OK JobsCollection

create job

Code samples

require 'rest-client'
require 'json'


headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}


result = RestClient.post 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}


r = requests.post('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


POST /projects/{projectID}/jobs

Creates a new Job

Creates a new Job

Body parameter

{
  "id": "7c0da16130b9418395e68f844de8ab20",
  "name": "abcdef",
  "original_filename": "demo.mp4",
  "project_id": "tg01a16130b9418395e68f844de8ab20",
  "source_url": "http://example.com/path/to/file.flac",
  "status": "pending",
  "error": "string",
  "progress": 0,
  "confidence": 0,
  "duration": 0,
  "bitrate": 192000,
  "sample_rate": 0,
  "format": "OGG_OPUS",
  "file_size": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project
body body Job true No description

Example responses

{
  "id": "7c0da16130b9418395e68f844de8ab20",
  "name": "abcdef",
  "original_filename": "demo.mp4",
  "project_id": "tg01a16130b9418395e68f844de8ab20",
  "source_url": "http://example.com/path/to/file.flac",
  "status": "pending",
  "error": "string",
  "progress": 0,
  "confidence": 0,
  "duration": 0,
  "bitrate": 192000,
  "sample_rate": 0,
  "format": "OGG_OPUS",
  "file_size": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}

Responses

Status Meaning Description Schema
201 Created Created Job
400 Bad Request Invalid request body None
422 Unprocessable Entity Invalid request params None

upload video

Code samples

require 'rest-client'
require 'json'


headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}


result = RestClient.post 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/upload',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}


r = requests.post('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/upload', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/upload");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


POST /projects/{projectID}/jobs/upload

Creates an upload session

Body parameter

{
  "file_size": 0,
  "file_name": "string",
  "profiles": "string",
  "multi_chunk": true,
  "extra_files": [
    {
      "tag": "string",
      "file_size": 0,
      "file_name": "string"
    }
  ]
}

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project
body body object true No description
» file_size body integer(int64) true Size of the file that will be uploaded in bytes.
» file_name body string true Name of the file that will be uploaded.
» profiles body string false No description
» multi_chunk body boolean false No description
» extra_files body [ExtraFile] false A list of names of additional files that will be uploaded.
»» tag body string true No description
»» file_size body integer(int64) true No description
»» file_name body string true No description

Example responses

{
  "type": "object",
  "required": [
    "id",
    "location"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "An unique identifier of the UploadSession."
    },
    "location": {
      "type": "string",
      "description": "An URL to which chunks of the uploaded file should be sent"
    },
    "parts": {
      "type": "integer",
      "description": "A number of chunks that are expected by the upstream."
    },
    "part_size": {
      "type": "integer",
      "description": "An expected size of uploaded chunks."
    },
    "max_connections": {
      "type": "integer",
      "description": "A maximum number of concurrent connections."
    },
    "extra_files": {
      "type": "object",
      "additionalProperties": null,
      "description": "An object containing additional files uploaded using the session."
    }
  }
}

Responses

Status Meaning Description Schema
201 Created Created UploadSession

job

Code samples

require 'rest-client'
require 'json'


headers = {
  'Accept' => 'application/json'
}


result = RestClient.get 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/{id}',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Accept': 'application/json'
}


r = requests.get('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/{id}', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


GET /projects/{projectID}/jobs/{id}

Returns the Job

Returns the Job

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project
job_id path string true No description

Example responses

{
  "id": "7c0da16130b9418395e68f844de8ab20",
  "name": "abcdef",
  "original_filename": "demo.mp4",
  "project_id": "tg01a16130b9418395e68f844de8ab20",
  "source_url": "http://example.com/path/to/file.flac",
  "status": "pending",
  "error": "string",
  "progress": 0,
  "confidence": 0,
  "duration": 0,
  "bitrate": 192000,
  "sample_rate": 0,
  "format": "OGG_OPUS",
  "file_size": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}

Responses

Status Meaning Description Schema
200 OK OK Job

delete job

Code samples

require 'rest-client'
require 'json'


result = RestClient.delete 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/{id}',
  params: {
  }


p JSON.parse(result)


import requests


r = requests.delete('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/{id}', params={


)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


DELETE /projects/{projectID}/jobs/{id}

Deletes the Job

Deletes the Job

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project
job_id path string true No description

Responses

Status Meaning Description Schema
204 No Content Deleted None

job result

Code samples

require 'rest-client'
require 'json'


headers = {
  'Accept' => 'application/json'
}


result = RestClient.get 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/{id}/result',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Accept': 'application/json'
}


r = requests.get('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/{id}/result', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/jobs/{id}/result");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


GET /projects/{projectID}/jobs/{id}/result

Returns the Job Result

Returns the Job Result

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project
job_id path string true No description

Example responses

{
  "results": [
    {
      "transcript": "string",
      "start_time": 0.11,
      "fragments": [
        {
          "start_time": 0.11,
          "variants": [
            {
              "fragment": "Lorem",
              "confidence": 0.9
            }
          ],
          "end_time": 0.45
        }
      ],
      "end_time": 0.99,
      "confidence": 0.95
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK JobResult
404 Not Found Not Found None

corpora

corpora

Code samples

require 'rest-client'
require 'json'


headers = {
  'Accept' => 'application/json'
}


result = RestClient.get 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Accept': 'application/json'
}


r = requests.get('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


GET /projects/{projectID}/corpora

Returns a collection of Corpora

Returns a collection of Corpora

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project

Example responses

{
  "corpora": [
    {
      "name": "file-name",
      "status": "being_processed"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK CorporaCollection

corpus

Code samples

require 'rest-client'
require 'json'


headers = {
  'Accept' => 'application/json'
}


result = RestClient.get 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora/{name}',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Accept': 'application/json'
}


r = requests.get('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora/{name}', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


GET /projects/{projectID}/corpora/{name}

Returns the Corpus

Returns the Corpus

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project
name path string true Corpus name

Example responses

{
  "name": "file-name",
  "status": "being_processed"
}

Responses

Status Meaning Description Schema
200 OK OK Corpus

create corpus

Code samples

require 'rest-client'
require 'json'


headers = {
  'Content-Type' => 'text/plain',
  'Accept' => 'application/json'
}


result = RestClient.post 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora/{name}',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Content-Type': 'text/plain',
  'Accept': 'application/json'
}


r = requests.post('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora/{name}', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


POST /projects/{projectID}/corpora/{name}

Creates a new Corpus

Creates a new Corpus

Body parameter

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project
name path string true Corpus name
body body string true No description

Example responses

{}

Responses

Status Meaning Description Schema
201 Created Created None
409 Conflict Error ErrorResponse

delete corpus

Code samples

require 'rest-client'
require 'json'


headers = {
  'Accept' => 'application/json'
}


result = RestClient.delete 'https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora/{name}',
  params: {
  }, headers: headers


p JSON.parse(result)


import requests
headers = {
  'Accept': 'application/json'
}


r = requests.delete('https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora/{name}', params={


}, headers = headers)


print r.json()


URL obj = new URL("https://api.cloud.telestream.net/tts/v1.0/projects/{projectID}/corpora/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());


DELETE /projects/{projectID}/corpora/{name}

Creates a new Corpus

Creates a new Corpus

Parameters

Parameter In Type Required Description
projectID path string true ID of the Project
name path string true Corpus name

Example responses

{}

Responses

Status Meaning Description Schema
204 No Content Deleted None
409 Conflict Error ErrorResponse

Schemas

Project

{
  "id": "tg01a16130b9418395e68f844de8ab20",
  "account_id": "e4698e5be85a254e2bc65eac5f6c020a",
  "name": "Example project",
  "description": "string",
  "status": "available",
  "language": "en-US",
  "sample_rate": 16000,
  "profanity_filter": true,
  "generate_proxy": true,
  "custom_words": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}

Properties

Name Type Required Description
id string false The ID of the Project.
account_id string false The ID of the Account.
name string false The name of the Project.
description string false The description of the Project.
status string false Determines a stage of training.
language string false The language code of model.
sample_rate integer false The sample rate of model.
profanity_filter boolean false If true, the service replaces profanity from output with asterisks.
generate_proxy boolean false Indicates whether video preview should be generated.
custom_words string false Words used for model training, separated by space.
created_at string(dateTime) false A date and time when the project was created
updated_at string(dateTime) false A date and time when the project was updated
Enumerated Values
Property Value
status available
status modified
status training
status failed

Job

{
  "id": "7c0da16130b9418395e68f844de8ab20",
  "name": "abcdef",
  "original_filename": "demo.mp4",
  "project_id": "tg01a16130b9418395e68f844de8ab20",
  "source_url": "http://example.com/path/to/file.flac",
  "status": "pending",
  "error": "string",
  "progress": 0,
  "confidence": 0,
  "duration": 0,
  "bitrate": 192000,
  "sample_rate": 0,
  "format": "OGG_OPUS",
  "file_size": "string",
  "created_at": "2017-01-02T03:04:05Z",
  "updated_at": "2017-01-02T03:04:05Z"
}

Properties

Name Type Required Description
id string false The ID of the job.
name string false The name of the job.
original_filename string false The name of the input file
project_id string false The ID of the project.
source_url string false The URL of source file.
status string false Determines the state of transcription job.
error string false If the status of the job is ‘error’, returns the state of job.
progress integer false A percentage that indicates the progress of the job.
confidence integer false The confidence score of the job in the range of 0 to 100.
duration integer false The duration of the input audio in milliseconds.
bitrate integer false The bitrate of the input audio.
sample_rate integer false The sample rate of the input audio.
format string false The format of the input audio.
file_size string false The file size of the input file.
created_at string(dateTime) false A date and time when the job was created
updated_at string(dateTime) false A date and time when the job was updated
Enumerated Values
Property Value
status pending
status preparing
status processing
status success
status error

Job Result

{
  "results": [
    {
      "transcript": "string",
      "start_time": 0.11,
      "fragments": [
        {
          "start_time": 0.11,
          "variants": [
            {
              "fragment": "Lorem",
              "confidence": 0.9
            }
          ],
          "end_time": 0.45
        }
      ],
      "end_time": 0.99,
      "confidence": 0.95
    }
  ]
}

Properties

Name Type Required Description
results [Result] false An array of Results

Result

{
  "transcript": "string",
  "start_time": 0.11,
  "fragments": [
    {
      "start_time": 0.11,
      "variants": [
        {
          "fragment": "Lorem",
          "confidence": 0.9
        }
      ],
      "end_time": 0.45
    }
  ],
  "end_time": 0.99,
  "confidence": 0.95
}

Properties

Name Type Required Description
transcript string false No description
start_time number false The start time in seconds of the transcript from the input audio
fragments [Fragment] false An array of Fragments
end_time number false The end time time in seconds of the transcript from the input audio
confidence number false The confidence score of the result in the range of 0 to 1

Fragment

{
  "start_time": 0.11,
  "variants": [
    {
      "fragment": "Lorem",
      "confidence": 0.9
    }
  ],
  "end_time": 0.45
}

Properties

Name Type Required Description
start_time number false The start time in seconds of the fragment from the input audio
variants [FragmentVariant] false An array of FragmentVariants
end_time number false The end time in seconds of the fragment from the input audio

Fragment Variant

{
  "fragment": "Lorem",
  "confidence": 0.9
}

Properties

Name Type Required Description
fragment string false An alternative hypothesis for a fragment from the input audio.
confidence number false The confidence score of the fragment variant hypothesis in the range of 0 to 1.

Extra File

{
  "tag": "string",
  "file_size": 0,
  "file_name": "string"
}

Properties

Name Type Required Description
tag string true No description
file_size integer(int64) true No description
file_name string true No description

Upload Session

{
  "type": "object",
  "required": [
    "id",
    "location"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "An unique identifier of the UploadSession."
    },
    "location": {
      "type": "string",
      "description": "An URL to which chunks of the uploaded file should be sent"
    },
    "parts": {
      "type": "integer",
      "description": "A number of chunks that are expected by the upstream."
    },
    "part_size": {
      "type": "integer",
      "description": "An expected size of uploaded chunks."
    },
    "max_connections": {
      "type": "integer",
      "description": "A maximum number of concurrent connections."
    },
    "extra_files": {
      "type": "object",
      "additionalProperties": null,
      "description": "An object containing additional files uploaded using the session."
    }
  }
}

Properties

Name Type Required Description
id string true An unique identifier of the UploadSession.
location string true An URL to which chunks of the uploaded file should be sent
parts integer false A number of chunks that are expected by the upstream.
part_size integer false An expected size of uploaded chunks.
max_connections integer false A maximum number of concurrent connections.
extra_files object false An object containing additional files uploaded using the session.

Corpus

{
  "name": "file-name",
  "status": "being_processed"
}

Properties

Name Type Required Description
name string false The name of the Corpus.
status string false Determines the status of the Corpus.

Projects Collection

{
  "projects": [
    {
      "id": "tg01a16130b9418395e68f844de8ab20",
      "account_id": "e4698e5be85a254e2bc65eac5f6c020a",
      "name": "Example project",
      "description": "string",
      "status": "available",
      "language": "en-US",
      "sample_rate": 16000,
      "profanity_filter": true,
      "generate_proxy": true,
      "custom_words": "string",
      "created_at": "2017-01-02T03:04:05Z",
      "updated_at": "2017-01-02T03:04:05Z"
    }
  ],
  "page": 1,
  "per_page": 30,
  "page_count": 1,
  "total_count": 1
}

Properties

Name Type Required Description
projects [Project] false No description
page integer false A number of the fetched page.
per_page integer false A number of projects per page.
page_count integer false A number of pages.
total_count integer false A number of all projects.

Jobs Collection

{
  "jobs": [
    {
      "id": "7c0da16130b9418395e68f844de8ab20",
      "name": "abcdef",
      "original_filename": "demo.mp4",
      "project_id": "tg01a16130b9418395e68f844de8ab20",
      "source_url": "http://example.com/path/to/file.flac",
      "status": "pending",
      "error": "string",
      "progress": 0,
      "confidence": 0,
      "duration": 0,
      "bitrate": 192000,
      "sample_rate": 0,
      "format": "OGG_OPUS",
      "file_size": "string",
      "created_at": "2017-01-02T03:04:05Z",
      "updated_at": "2017-01-02T03:04:05Z"
    }
  ],
  "page": 1,
  "per_page": 30,
  "page_count": 2,
  "total_count": 60
}

Properties

Name Type Required Description
jobs [Job] false No description
page integer false A number of the fetched page.
per_page integer false A number of jobs per page.
page_count integer false A number of pages.
total_count integer false A number of all jobs.

Corpora Collection

{
  "corpora": [
    {
      "name": "file-name",
      "status": "being_processed"
    }
  ]
}

Properties

Name Type Required Description
corpora [Corpus] false An array of Corpus files

Error Response

{}

Properties

None