Skip to content

Latest commit

 

History

History
98 lines (72 loc) · 3.81 KB

File metadata and controls

98 lines (72 loc) · 3.81 KB

Telestream Cloud Timed Text Speech Python SDK

This library provides a low-level interface to the REST API of Telestream Cloud, the online video encoding service.

Requirements.

Python 2.7 and 3.4+

Getting Started

Initialize client

import time
import telestream_cloud_tts
from telestream_cloud_tts.rest import ApiException
from pprint import pprint

configuration = telestream_cloud_tts.Configuration()
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
api_instance = telestream_cloud_tts.TtsApi(telestream_cloud_tts.ApiClient(configuration))
project_id = 'project_id_example'

Create a new project

project = api_instance.create_project(telestream_cloud_tts.Project(name = "Example project name"))

Create a job from source URL

job = api_instance.create_job(project_id, telestream_cloud_tts.Job("http://url/to/file.mp4"))
pprint(job)

Create a job from file

upload = telestream_cloud_tts.Uploader(project_id, api_instance, "/path/to/file.mp4", "", {})
upload.setup()
job_id = upload.start()
print(job_id)

Documentation for API Endpoints

All URIs are relative to https://api.cloud.telestream.net/tts/v1.0

Class Method HTTP request Description
TtsApi create_corpus POST /projects/{projectID}/corpora/{name} Creates a new Corpus
TtsApi create_job POST /projects/{projectID}/jobs Creates a new Job
TtsApi create_project POST /projects Creates a new Project
TtsApi delete_corpus DELETE /projects/{projectID}/corpora/{name} Creates a new Corpus
TtsApi delete_job DELETE /projects/{projectID}/jobs/{jobID} Deletes the Job
TtsApi delete_project DELETE /projects/{projectID} Deletes the Project
TtsApi get_job GET /projects/{projectID}/jobs/{jobID} Returns the Job
TtsApi get_project GET /projects/{projectID} Returns the Project
TtsApi getget_corpus GET /projects/{projectID}/corpora/{name} Returns the Corpus
TtsApi job_outputs GET /projects/{projectID}/jobs/{jobID}/outputs Returns the Job Outputs
TtsApi job_result GET /projects/{projectID}/jobs/{jobID}/result Returns the Job Result
TtsApi list_corpora GET /projects/{projectID}/corpora Returns a collection of Corpora
TtsApi list_jobs GET /projects/{projectID}/jobs Returns a collection of Jobs
TtsApi list_projects GET /projects Returns a collection of Projects
TtsApi train_project POST /projects/{projectID}/train Queues training
TtsApi update_project PUT /projects/{projectID} Updates an existing Project

Documentation For Models

Documentation For Authorization

apiKey

  • Type: API key
  • API key parameter name: X-Api-Key
  • Location: HTTP header

Author

[email protected]