telestream_cloud_tts 2.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +92 -0
  4. data/Rakefile +8 -0
  5. data/docs/CorporaCollection.md +8 -0
  6. data/docs/Corpus.md +9 -0
  7. data/docs/ErrorResponse.md +7 -0
  8. data/docs/ExtraFile.md +10 -0
  9. data/docs/Fragment.md +10 -0
  10. data/docs/FragmentVariant.md +9 -0
  11. data/docs/Job.md +23 -0
  12. data/docs/JobResult.md +8 -0
  13. data/docs/JobsCollection.md +12 -0
  14. data/docs/Project.md +18 -0
  15. data/docs/ProjectsCollection.md +12 -0
  16. data/docs/Result.md +12 -0
  17. data/docs/TtsApi.md +902 -0
  18. data/docs/UploadSession.md +13 -0
  19. data/docs/VideoUploadBody.md +12 -0
  20. data/git_push.sh +55 -0
  21. data/lib/telestream_cloud_tts.rb +60 -0
  22. data/lib/telestream_cloud_tts/api/tts_api.rb +946 -0
  23. data/lib/telestream_cloud_tts/api_client.rb +389 -0
  24. data/lib/telestream_cloud_tts/api_error.rb +38 -0
  25. data/lib/telestream_cloud_tts/configuration.rb +209 -0
  26. data/lib/telestream_cloud_tts/models/corpora_collection.rb +191 -0
  27. data/lib/telestream_cloud_tts/models/corpus.rb +199 -0
  28. data/lib/telestream_cloud_tts/models/error_response.rb +179 -0
  29. data/lib/telestream_cloud_tts/models/extra_file.rb +221 -0
  30. data/lib/telestream_cloud_tts/models/fragment.rb +211 -0
  31. data/lib/telestream_cloud_tts/models/fragment_variant.rb +199 -0
  32. data/lib/telestream_cloud_tts/models/job.rb +372 -0
  33. data/lib/telestream_cloud_tts/models/job_result.rb +191 -0
  34. data/lib/telestream_cloud_tts/models/jobs_collection.rb +230 -0
  35. data/lib/telestream_cloud_tts/models/project.rb +322 -0
  36. data/lib/telestream_cloud_tts/models/projects_collection.rb +230 -0
  37. data/lib/telestream_cloud_tts/models/result.rb +230 -0
  38. data/lib/telestream_cloud_tts/models/upload_session.rb +249 -0
  39. data/lib/telestream_cloud_tts/models/video_upload_body.rb +241 -0
  40. data/lib/telestream_cloud_tts/uploader.rb +244 -0
  41. data/lib/telestream_cloud_tts/version.rb +18 -0
  42. data/spec/api/tts_api_spec.rb +236 -0
  43. data/spec/api_client_spec.rb +226 -0
  44. data/spec/configuration_spec.rb +42 -0
  45. data/spec/models/corpora_collection_spec.rb +42 -0
  46. data/spec/models/corpus_spec.rb +48 -0
  47. data/spec/models/error_response_spec.rb +36 -0
  48. data/spec/models/extra_file_spec.rb +54 -0
  49. data/spec/models/fragment_spec.rb +54 -0
  50. data/spec/models/fragment_variant_spec.rb +48 -0
  51. data/spec/models/job_result_spec.rb +42 -0
  52. data/spec/models/job_spec.rb +136 -0
  53. data/spec/models/jobs_collection_spec.rb +66 -0
  54. data/spec/models/project_spec.rb +106 -0
  55. data/spec/models/projects_collection_spec.rb +66 -0
  56. data/spec/models/result_spec.rb +66 -0
  57. data/spec/models/upload_session_spec.rb +72 -0
  58. data/spec/models/video_upload_body_spec.rb +66 -0
  59. data/spec/spec_helper.rb +111 -0
  60. data/telestream_cloud_tts.gemspec +47 -0
  61. metadata +320 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 91e44dfa17e952baef6bd8b4ec2b220e868bdbc7
4
+ data.tar.gz: c356ab48571893b3db84a3f0ed233270254b0635
5
+ SHA512:
6
+ metadata.gz: 78114e5cbe4000cd5d6fecffa8e8fb748be775fa4e6179f5e788c625c306cee095bbad70033c1346492497e40ad94f302edba491e9970cfca19f7672fe651c0b
7
+ data.tar.gz: 428877d7443b4362b8d0fcbe399ee93627648e0fb440ad42aab1f57109c40b845cdac6767eed7098303b27e629efbda6e21057320e7ca3dd8dcaaea128a1e5dc
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ end
@@ -0,0 +1,92 @@
1
+ # Telestream Cloud Timed Text Speech Ruby SDK
2
+
3
+ This library provides a low-level interface to the REST API of Telestream Cloud, the online video encoding service.
4
+
5
+ ## Getting Started
6
+ ### Initialize client
7
+
8
+ ```ruby
9
+ require 'telestream_cloud/tts'
10
+
11
+ TelestreamCloud::Tts.configure do |config|
12
+ config.api_key['X-Api-Key'] = '[API KEY]'
13
+ end
14
+
15
+ client = TelestreamCloud::Tts::TtsApi.new
16
+ ```
17
+
18
+ ### Create a project
19
+ ```ruby
20
+ client.create_project(name: 'Example project name', language: 'en-US')
21
+ ```
22
+
23
+ ### Create job from local file
24
+
25
+ ```ruby
26
+ project_id = '...'
27
+ uploader = TelestreamCloud::Flip::Uploader.new(
28
+ client,
29
+ project_id: project_id,
30
+ file: '/path/to/file.mp4',
31
+ )
32
+
33
+ job_id = uploader.upload
34
+ ```
35
+
36
+ ### Create job from source URL
37
+ ```ruby
38
+ project_id = '...'
39
+ client.create_job(project_id, source_url: 'http://url/to/file.mp4')
40
+ ```
41
+
42
+ ## Documentation for API Endpoints
43
+
44
+ All URIs are relative to *https://api.cloud.telestream.net/tts/v1.0*
45
+
46
+ Class | Method | HTTP request | Description
47
+ ------------ | ------------- | ------------- | -------------
48
+ *TelestreamCloud::Tts::TtsApi* | [**corpora**](docs/TtsApi.md#corpora) | **GET** /projects/{projectID}/corpora | Returns a collection of Corpora
49
+ *TelestreamCloud::Tts::TtsApi* | [**corpus**](docs/TtsApi.md#corpus) | **GET** /projects/{projectID}/corpora/{name} | Returns the Corpus
50
+ *TelestreamCloud::Tts::TtsApi* | [**create_corpus**](docs/TtsApi.md#create_corpus) | **POST** /projects/{projectID}/corpora/{name} | Creates a new Corpus
51
+ *TelestreamCloud::Tts::TtsApi* | [**create_job**](docs/TtsApi.md#create_job) | **POST** /projects/{projectID}/jobs | Creates a new Job
52
+ *TelestreamCloud::Tts::TtsApi* | [**create_project**](docs/TtsApi.md#create_project) | **POST** /projects | Creates a new Project
53
+ *TelestreamCloud::Tts::TtsApi* | [**delete_corpus**](docs/TtsApi.md#delete_corpus) | **DELETE** /projects/{projectID}/corpora/{name} | Creates a new Corpus
54
+ *TelestreamCloud::Tts::TtsApi* | [**delete_job**](docs/TtsApi.md#delete_job) | **DELETE** /projects/{projectID}/jobs/{id} | Deletes the Job
55
+ *TelestreamCloud::Tts::TtsApi* | [**delete_project**](docs/TtsApi.md#delete_project) | **DELETE** /projects/{projectID} | Deletes the Project
56
+ *TelestreamCloud::Tts::TtsApi* | [**job**](docs/TtsApi.md#job) | **GET** /projects/{projectID}/jobs/{id} | Returns the Job
57
+ *TelestreamCloud::Tts::TtsApi* | [**job_result**](docs/TtsApi.md#job_result) | **GET** /projects/{projectID}/jobs/{id}/result | Returns the Job Result
58
+ *TelestreamCloud::Tts::TtsApi* | [**jobs**](docs/TtsApi.md#jobs) | **GET** /projects/{projectID}/jobs | Returns a collection of Jobs
59
+ *TelestreamCloud::Tts::TtsApi* | [**project**](docs/TtsApi.md#project) | **GET** /projects/{projectID} | Returns the Project
60
+ *TelestreamCloud::Tts::TtsApi* | [**projects**](docs/TtsApi.md#projects) | **GET** /projects | Returns a collection of Projects
61
+ *TelestreamCloud::Tts::TtsApi* | [**train_project**](docs/TtsApi.md#train_project) | **POST** /projects/{projectID}/train | Queues training
62
+ *TelestreamCloud::Tts::TtsApi* | [**update_project**](docs/TtsApi.md#update_project) | **PUT** /projects/{projectID} | Updates an existing Project
63
+ *TelestreamCloud::Tts::TtsApi* | [**upload_video**](docs/TtsApi.md#upload_video) | **POST** /projects/{projectID}/jobs/upload | Creates an upload session
64
+
65
+
66
+ ## Documentation for Models
67
+
68
+ - [TelestreamCloud::Tts::CorporaCollection](docs/CorporaCollection.md)
69
+ - [TelestreamCloud::Tts::Corpus](docs/Corpus.md)
70
+ - [TelestreamCloud::Tts::ErrorResponse](docs/ErrorResponse.md)
71
+ - [TelestreamCloud::Tts::ExtraFile](docs/ExtraFile.md)
72
+ - [TelestreamCloud::Tts::Fragment](docs/Fragment.md)
73
+ - [TelestreamCloud::Tts::FragmentVariant](docs/FragmentVariant.md)
74
+ - [TelestreamCloud::Tts::Job](docs/Job.md)
75
+ - [TelestreamCloud::Tts::JobResult](docs/JobResult.md)
76
+ - [TelestreamCloud::Tts::JobsCollection](docs/JobsCollection.md)
77
+ - [TelestreamCloud::Tts::Project](docs/Project.md)
78
+ - [TelestreamCloud::Tts::ProjectsCollection](docs/ProjectsCollection.md)
79
+ - [TelestreamCloud::Tts::Result](docs/Result.md)
80
+ - [TelestreamCloud::Tts::UploadSession](docs/UploadSession.md)
81
+ - [TelestreamCloud::Tts::VideoUploadBody](docs/VideoUploadBody.md)
82
+
83
+
84
+ ## Documentation for Authorization
85
+
86
+
87
+ ### apiKey
88
+
89
+ - **Type**: API key
90
+ - **API key parameter name**: X-Api-Key
91
+ - **Location**: HTTP header
92
+
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,8 @@
1
+ # TelestreamCloud::Tts::CorporaCollection
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **corpora** | [**Array<Corpus>**](Corpus.md) | An array of Corpus files | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # TelestreamCloud::Tts::Corpus
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | The name of the Corpus. | [optional]
7
+ **status** | **String** | Determines the status of the Corpus. | [optional]
8
+
9
+
@@ -0,0 +1,7 @@
1
+ # TelestreamCloud::Tts::ErrorResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,10 @@
1
+ # TelestreamCloud::Tts::ExtraFile
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **tag** | **String** | |
7
+ **file_size** | **Integer** | |
8
+ **file_name** | **String** | |
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # TelestreamCloud::Tts::Fragment
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **start_time** | **Float** | The start time in seconds of the fragment from the input audio | [optional]
7
+ **variants** | [**Array<FragmentVariant>**](FragmentVariant.md) | An array of FragmentVariants | [optional]
8
+ **end_time** | **Float** | The end time in seconds of the fragment from the input audio | [optional]
9
+
10
+
@@ -0,0 +1,9 @@
1
+ # TelestreamCloud::Tts::FragmentVariant
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **fragment** | **String** | An alternative hypothesis for a fragment from the input audio. | [optional]
7
+ **confidence** | **Float** | The confidence score of the fragment variant hypothesis in the range of 0 to 1. | [optional]
8
+
9
+
@@ -0,0 +1,23 @@
1
+ # TelestreamCloud::Tts::Job
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The ID of the job. | [optional]
7
+ **name** | **String** | The name of the job. | [optional]
8
+ **original_filename** | **String** | The name of the input file | [optional]
9
+ **project_id** | **String** | The ID of the project. | [optional]
10
+ **source_url** | **String** | The URL of source file. | [optional]
11
+ **status** | **String** | Determines the state of transcription job. | [optional]
12
+ **error** | **String** | If the status of the job is 'error', returns the state of job. | [optional]
13
+ **progress** | **Integer** | A percentage that indicates the progress of the job. | [optional]
14
+ **confidence** | **Integer** | The confidence score of the job in the range of 0 to 100. | [optional]
15
+ **duration** | **Integer** | The duration of the input audio in milliseconds. | [optional]
16
+ **bitrate** | **Integer** | The bitrate of the input audio. | [optional]
17
+ **sample_rate** | **Integer** | The sample rate of the input audio. | [optional]
18
+ **format** | **String** | The format of the input audio. | [optional]
19
+ **file_size** | **String** | The file size of the input file. | [optional]
20
+ **created_at** | **String** | A date and time when the job was created | [optional]
21
+ **updated_at** | **String** | A date and time when the job was updated | [optional]
22
+
23
+
@@ -0,0 +1,8 @@
1
+ # TelestreamCloud::Tts::JobResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **results** | [**Array<Result>**](Result.md) | An array of Results | [optional]
7
+
8
+
@@ -0,0 +1,12 @@
1
+ # TelestreamCloud::Tts::JobsCollection
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **jobs** | [**Array<Job>**](Job.md) | | [optional]
7
+ **page** | **Integer** | A number of the fetched page. | [optional]
8
+ **per_page** | **Integer** | A number of jobs per page. | [optional]
9
+ **page_count** | **Integer** | A number of pages. | [optional]
10
+ **total_count** | **Integer** | A number of all jobs. | [optional]
11
+
12
+
@@ -0,0 +1,18 @@
1
+ # TelestreamCloud::Tts::Project
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The ID of the Project. | [optional]
7
+ **name** | **String** | The name of the Project. | [optional]
8
+ **description** | **String** | The description of the Project. | [optional]
9
+ **status** | **String** | Determines a stage of training. | [optional]
10
+ **language** | **String** | The language code of model. | [optional]
11
+ **sample_rate** | **Integer** | The sample rate of model. | [optional]
12
+ **profanity_filter** | **BOOLEAN** | If true, the service replaces profanity from output with asterisks. | [optional]
13
+ **generate_proxy** | **BOOLEAN** | Indicates whether video preview should be generated. | [optional]
14
+ **custom_words** | **String** | Words used for model training, separated by space. | [optional]
15
+ **created_at** | **String** | A date and time when the project was created | [optional]
16
+ **updated_at** | **String** | A date and time when the project was updated | [optional]
17
+
18
+
@@ -0,0 +1,12 @@
1
+ # TelestreamCloud::Tts::ProjectsCollection
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **projects** | [**Array<Project>**](Project.md) | | [optional]
7
+ **page** | **Integer** | A number of the fetched page. | [optional]
8
+ **per_page** | **Integer** | A number of projects per page. | [optional]
9
+ **page_count** | **Integer** | A number of pages. | [optional]
10
+ **total_count** | **Integer** | A number of all projects. | [optional]
11
+
12
+
@@ -0,0 +1,12 @@
1
+ # TelestreamCloud::Tts::Result
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **transcript** | **String** | | [optional]
7
+ **start_time** | **Float** | The start time in seconds of the transcript from the input audio | [optional]
8
+ **fragments** | [**Array<Fragment>**](Fragment.md) | An array of Fragments | [optional]
9
+ **end_time** | **Float** | The end time time in seconds of the transcript from the input audio | [optional]
10
+ **confidence** | **Float** | The confidence score of the result in the range of 0 to 1 | [optional]
11
+
12
+
@@ -0,0 +1,902 @@
1
+ # TelestreamCloud::Tts::TtsApi
2
+
3
+ All URIs are relative to *https://api.cloud.telestream.net/tts/v1.0*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**corpora**](TtsApi.md#corpora) | **GET** /projects/{projectID}/corpora | Returns a collection of Corpora
8
+ [**corpus**](TtsApi.md#corpus) | **GET** /projects/{projectID}/corpora/{name} | Returns the Corpus
9
+ [**create_corpus**](TtsApi.md#create_corpus) | **POST** /projects/{projectID}/corpora/{name} | Creates a new Corpus
10
+ [**create_job**](TtsApi.md#create_job) | **POST** /projects/{projectID}/jobs | Creates a new Job
11
+ [**create_project**](TtsApi.md#create_project) | **POST** /projects | Creates a new Project
12
+ [**delete_corpus**](TtsApi.md#delete_corpus) | **DELETE** /projects/{projectID}/corpora/{name} | Creates a new Corpus
13
+ [**delete_job**](TtsApi.md#delete_job) | **DELETE** /projects/{projectID}/jobs/{id} | Deletes the Job
14
+ [**delete_project**](TtsApi.md#delete_project) | **DELETE** /projects/{projectID} | Deletes the Project
15
+ [**job**](TtsApi.md#job) | **GET** /projects/{projectID}/jobs/{id} | Returns the Job
16
+ [**job_result**](TtsApi.md#job_result) | **GET** /projects/{projectID}/jobs/{id}/result | Returns the Job Result
17
+ [**jobs**](TtsApi.md#jobs) | **GET** /projects/{projectID}/jobs | Returns a collection of Jobs
18
+ [**project**](TtsApi.md#project) | **GET** /projects/{projectID} | Returns the Project
19
+ [**projects**](TtsApi.md#projects) | **GET** /projects | Returns a collection of Projects
20
+ [**train_project**](TtsApi.md#train_project) | **POST** /projects/{projectID}/train | Queues training
21
+ [**update_project**](TtsApi.md#update_project) | **PUT** /projects/{projectID} | Updates an existing Project
22
+ [**upload_video**](TtsApi.md#upload_video) | **POST** /projects/{projectID}/jobs/upload | Creates an upload session
23
+
24
+
25
+ # **corpora**
26
+ > CorporaCollection corpora(project_id)
27
+
28
+ Returns a collection of Corpora
29
+
30
+ Returns a collection of Corpora
31
+
32
+ ### Example
33
+ ```ruby
34
+ # load the gem
35
+ require 'telestream_cloud_tts'
36
+ # setup authorization
37
+ TelestreamCloud::Tts.configure do |config|
38
+ # Configure API key authorization: apiKey
39
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
40
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
41
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
42
+ end
43
+
44
+ api_instance = TelestreamCloud::Tts::TtsApi.new
45
+
46
+ project_id = "project_id_example" # String | ID of the Project
47
+
48
+
49
+ begin
50
+ #Returns a collection of Corpora
51
+ result = api_instance.corpora(project_id)
52
+ p result
53
+ rescue TelestreamCloud::Tts::ApiError => e
54
+ puts "Exception when calling TtsApi->corpora: #{e}"
55
+ end
56
+ ```
57
+
58
+ ### Parameters
59
+
60
+ Name | Type | Description | Notes
61
+ ------------- | ------------- | ------------- | -------------
62
+ **project_id** | **String**| ID of the Project |
63
+
64
+ ### Return type
65
+
66
+ [**CorporaCollection**](CorporaCollection.md)
67
+
68
+ ### Authorization
69
+
70
+ [apiKey](../README.md#apiKey)
71
+
72
+ ### HTTP request headers
73
+
74
+ - **Content-Type**: application/json
75
+ - **Accept**: application/json
76
+
77
+
78
+
79
+ # **corpus**
80
+ > Corpus corpus(project_id, name)
81
+
82
+ Returns the Corpus
83
+
84
+ Returns the Corpus
85
+
86
+ ### Example
87
+ ```ruby
88
+ # load the gem
89
+ require 'telestream_cloud_tts'
90
+ # setup authorization
91
+ TelestreamCloud::Tts.configure do |config|
92
+ # Configure API key authorization: apiKey
93
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
94
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
95
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
96
+ end
97
+
98
+ api_instance = TelestreamCloud::Tts::TtsApi.new
99
+
100
+ project_id = "project_id_example" # String | ID of the Project
101
+
102
+ name = "name_example" # String | Corpus name
103
+
104
+
105
+ begin
106
+ #Returns the Corpus
107
+ result = api_instance.corpus(project_id, name)
108
+ p result
109
+ rescue TelestreamCloud::Tts::ApiError => e
110
+ puts "Exception when calling TtsApi->corpus: #{e}"
111
+ end
112
+ ```
113
+
114
+ ### Parameters
115
+
116
+ Name | Type | Description | Notes
117
+ ------------- | ------------- | ------------- | -------------
118
+ **project_id** | **String**| ID of the Project |
119
+ **name** | **String**| Corpus name |
120
+
121
+ ### Return type
122
+
123
+ [**Corpus**](Corpus.md)
124
+
125
+ ### Authorization
126
+
127
+ [apiKey](../README.md#apiKey)
128
+
129
+ ### HTTP request headers
130
+
131
+ - **Content-Type**: application/json
132
+ - **Accept**: application/json
133
+
134
+
135
+
136
+ # **create_corpus**
137
+ > create_corpus(project_id, name, body)
138
+
139
+ Creates a new Corpus
140
+
141
+ Creates a new Corpus
142
+
143
+ ### Example
144
+ ```ruby
145
+ # load the gem
146
+ require 'telestream_cloud_tts'
147
+ # setup authorization
148
+ TelestreamCloud::Tts.configure do |config|
149
+ # Configure API key authorization: apiKey
150
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
151
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
152
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
153
+ end
154
+
155
+ api_instance = TelestreamCloud::Tts::TtsApi.new
156
+
157
+ project_id = "project_id_example" # String | ID of the Project
158
+
159
+ name = "name_example" # String | Corpus name
160
+
161
+ body = "body_example" # String |
162
+
163
+
164
+ begin
165
+ #Creates a new Corpus
166
+ api_instance.create_corpus(project_id, name, body)
167
+ rescue TelestreamCloud::Tts::ApiError => e
168
+ puts "Exception when calling TtsApi->create_corpus: #{e}"
169
+ end
170
+ ```
171
+
172
+ ### Parameters
173
+
174
+ Name | Type | Description | Notes
175
+ ------------- | ------------- | ------------- | -------------
176
+ **project_id** | **String**| ID of the Project |
177
+ **name** | **String**| Corpus name |
178
+ **body** | **String**| |
179
+
180
+ ### Return type
181
+
182
+ nil (empty response body)
183
+
184
+ ### Authorization
185
+
186
+ [apiKey](../README.md#apiKey)
187
+
188
+ ### HTTP request headers
189
+
190
+ - **Content-Type**: text/plain
191
+ - **Accept**: application/json
192
+
193
+
194
+
195
+ # **create_job**
196
+ > Job create_job(project_id, job)
197
+
198
+ Creates a new Job
199
+
200
+ Creates a new Job
201
+
202
+ ### Example
203
+ ```ruby
204
+ # load the gem
205
+ require 'telestream_cloud_tts'
206
+ # setup authorization
207
+ TelestreamCloud::Tts.configure do |config|
208
+ # Configure API key authorization: apiKey
209
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
210
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
211
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
212
+ end
213
+
214
+ api_instance = TelestreamCloud::Tts::TtsApi.new
215
+
216
+ project_id = "project_id_example" # String | ID of the Project
217
+
218
+ job = TelestreamCloud::Tts::Job.new # Job |
219
+
220
+
221
+ begin
222
+ #Creates a new Job
223
+ result = api_instance.create_job(project_id, job)
224
+ p result
225
+ rescue TelestreamCloud::Tts::ApiError => e
226
+ puts "Exception when calling TtsApi->create_job: #{e}"
227
+ end
228
+ ```
229
+
230
+ ### Parameters
231
+
232
+ Name | Type | Description | Notes
233
+ ------------- | ------------- | ------------- | -------------
234
+ **project_id** | **String**| ID of the Project |
235
+ **job** | [**Job**](Job.md)| |
236
+
237
+ ### Return type
238
+
239
+ [**Job**](Job.md)
240
+
241
+ ### Authorization
242
+
243
+ [apiKey](../README.md#apiKey)
244
+
245
+ ### HTTP request headers
246
+
247
+ - **Content-Type**: application/json
248
+ - **Accept**: application/json
249
+
250
+
251
+
252
+ # **create_project**
253
+ > Project create_project(project)
254
+
255
+ Creates a new Project
256
+
257
+ Creates a new Project
258
+
259
+ ### Example
260
+ ```ruby
261
+ # load the gem
262
+ require 'telestream_cloud_tts'
263
+ # setup authorization
264
+ TelestreamCloud::Tts.configure do |config|
265
+ # Configure API key authorization: apiKey
266
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
267
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
268
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
269
+ end
270
+
271
+ api_instance = TelestreamCloud::Tts::TtsApi.new
272
+
273
+ project = TelestreamCloud::Tts::Project.new # Project |
274
+
275
+
276
+ begin
277
+ #Creates a new Project
278
+ result = api_instance.create_project(project)
279
+ p result
280
+ rescue TelestreamCloud::Tts::ApiError => e
281
+ puts "Exception when calling TtsApi->create_project: #{e}"
282
+ end
283
+ ```
284
+
285
+ ### Parameters
286
+
287
+ Name | Type | Description | Notes
288
+ ------------- | ------------- | ------------- | -------------
289
+ **project** | [**Project**](Project.md)| |
290
+
291
+ ### Return type
292
+
293
+ [**Project**](Project.md)
294
+
295
+ ### Authorization
296
+
297
+ [apiKey](../README.md#apiKey)
298
+
299
+ ### HTTP request headers
300
+
301
+ - **Content-Type**: application/json
302
+ - **Accept**: application/json
303
+
304
+
305
+
306
+ # **delete_corpus**
307
+ > delete_corpus(project_id, name)
308
+
309
+ Creates a new Corpus
310
+
311
+ Creates a new Corpus
312
+
313
+ ### Example
314
+ ```ruby
315
+ # load the gem
316
+ require 'telestream_cloud_tts'
317
+ # setup authorization
318
+ TelestreamCloud::Tts.configure do |config|
319
+ # Configure API key authorization: apiKey
320
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
321
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
322
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
323
+ end
324
+
325
+ api_instance = TelestreamCloud::Tts::TtsApi.new
326
+
327
+ project_id = "project_id_example" # String | ID of the Project
328
+
329
+ name = "name_example" # String | Corpus name
330
+
331
+
332
+ begin
333
+ #Creates a new Corpus
334
+ api_instance.delete_corpus(project_id, name)
335
+ rescue TelestreamCloud::Tts::ApiError => e
336
+ puts "Exception when calling TtsApi->delete_corpus: #{e}"
337
+ end
338
+ ```
339
+
340
+ ### Parameters
341
+
342
+ Name | Type | Description | Notes
343
+ ------------- | ------------- | ------------- | -------------
344
+ **project_id** | **String**| ID of the Project |
345
+ **name** | **String**| Corpus name |
346
+
347
+ ### Return type
348
+
349
+ nil (empty response body)
350
+
351
+ ### Authorization
352
+
353
+ [apiKey](../README.md#apiKey)
354
+
355
+ ### HTTP request headers
356
+
357
+ - **Content-Type**: application/json
358
+ - **Accept**: application/json
359
+
360
+
361
+
362
+ # **delete_job**
363
+ > delete_job(project_id, job_id)
364
+
365
+ Deletes the Job
366
+
367
+ Deletes the Job
368
+
369
+ ### Example
370
+ ```ruby
371
+ # load the gem
372
+ require 'telestream_cloud_tts'
373
+ # setup authorization
374
+ TelestreamCloud::Tts.configure do |config|
375
+ # Configure API key authorization: apiKey
376
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
377
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
378
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
379
+ end
380
+
381
+ api_instance = TelestreamCloud::Tts::TtsApi.new
382
+
383
+ project_id = "project_id_example" # String | ID of the Project
384
+
385
+ job_id = "job_id_example" # String |
386
+
387
+
388
+ begin
389
+ #Deletes the Job
390
+ api_instance.delete_job(project_id, job_id)
391
+ rescue TelestreamCloud::Tts::ApiError => e
392
+ puts "Exception when calling TtsApi->delete_job: #{e}"
393
+ end
394
+ ```
395
+
396
+ ### Parameters
397
+
398
+ Name | Type | Description | Notes
399
+ ------------- | ------------- | ------------- | -------------
400
+ **project_id** | **String**| ID of the Project |
401
+ **job_id** | **String**| |
402
+
403
+ ### Return type
404
+
405
+ nil (empty response body)
406
+
407
+ ### Authorization
408
+
409
+ [apiKey](../README.md#apiKey)
410
+
411
+ ### HTTP request headers
412
+
413
+ - **Content-Type**: application/json
414
+ - **Accept**: application/json
415
+
416
+
417
+
418
+ # **delete_project**
419
+ > delete_project
420
+
421
+ Deletes the Project
422
+
423
+ Deletes the Project
424
+
425
+ ### Example
426
+ ```ruby
427
+ # load the gem
428
+ require 'telestream_cloud_tts'
429
+ # setup authorization
430
+ TelestreamCloud::Tts.configure do |config|
431
+ # Configure API key authorization: apiKey
432
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
433
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
434
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
435
+ end
436
+
437
+ api_instance = TelestreamCloud::Tts::TtsApi.new
438
+
439
+ begin
440
+ #Deletes the Project
441
+ api_instance.delete_project
442
+ rescue TelestreamCloud::Tts::ApiError => e
443
+ puts "Exception when calling TtsApi->delete_project: #{e}"
444
+ end
445
+ ```
446
+
447
+ ### Parameters
448
+ This endpoint does not need any parameter.
449
+
450
+ ### Return type
451
+
452
+ nil (empty response body)
453
+
454
+ ### Authorization
455
+
456
+ [apiKey](../README.md#apiKey)
457
+
458
+ ### HTTP request headers
459
+
460
+ - **Content-Type**: application/json
461
+ - **Accept**: application/json
462
+
463
+
464
+
465
+ # **job**
466
+ > Job job(project_id, job_id)
467
+
468
+ Returns the Job
469
+
470
+ Returns the Job
471
+
472
+ ### Example
473
+ ```ruby
474
+ # load the gem
475
+ require 'telestream_cloud_tts'
476
+ # setup authorization
477
+ TelestreamCloud::Tts.configure do |config|
478
+ # Configure API key authorization: apiKey
479
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
480
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
481
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
482
+ end
483
+
484
+ api_instance = TelestreamCloud::Tts::TtsApi.new
485
+
486
+ project_id = "project_id_example" # String | ID of the Project
487
+
488
+ job_id = "job_id_example" # String |
489
+
490
+
491
+ begin
492
+ #Returns the Job
493
+ result = api_instance.job(project_id, job_id)
494
+ p result
495
+ rescue TelestreamCloud::Tts::ApiError => e
496
+ puts "Exception when calling TtsApi->job: #{e}"
497
+ end
498
+ ```
499
+
500
+ ### Parameters
501
+
502
+ Name | Type | Description | Notes
503
+ ------------- | ------------- | ------------- | -------------
504
+ **project_id** | **String**| ID of the Project |
505
+ **job_id** | **String**| |
506
+
507
+ ### Return type
508
+
509
+ [**Job**](Job.md)
510
+
511
+ ### Authorization
512
+
513
+ [apiKey](../README.md#apiKey)
514
+
515
+ ### HTTP request headers
516
+
517
+ - **Content-Type**: application/json
518
+ - **Accept**: application/json
519
+
520
+
521
+
522
+ # **job_result**
523
+ > JobResult job_result(project_id, job_id)
524
+
525
+ Returns the Job Result
526
+
527
+ Returns the Job Result
528
+
529
+ ### Example
530
+ ```ruby
531
+ # load the gem
532
+ require 'telestream_cloud_tts'
533
+ # setup authorization
534
+ TelestreamCloud::Tts.configure do |config|
535
+ # Configure API key authorization: apiKey
536
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
537
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
538
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
539
+ end
540
+
541
+ api_instance = TelestreamCloud::Tts::TtsApi.new
542
+
543
+ project_id = "project_id_example" # String | ID of the Project
544
+
545
+ job_id = "job_id_example" # String |
546
+
547
+
548
+ begin
549
+ #Returns the Job Result
550
+ result = api_instance.job_result(project_id, job_id)
551
+ p result
552
+ rescue TelestreamCloud::Tts::ApiError => e
553
+ puts "Exception when calling TtsApi->job_result: #{e}"
554
+ end
555
+ ```
556
+
557
+ ### Parameters
558
+
559
+ Name | Type | Description | Notes
560
+ ------------- | ------------- | ------------- | -------------
561
+ **project_id** | **String**| ID of the Project |
562
+ **job_id** | **String**| |
563
+
564
+ ### Return type
565
+
566
+ [**JobResult**](JobResult.md)
567
+
568
+ ### Authorization
569
+
570
+ [apiKey](../README.md#apiKey)
571
+
572
+ ### HTTP request headers
573
+
574
+ - **Content-Type**: application/json
575
+ - **Accept**: application/json
576
+
577
+
578
+
579
+ # **jobs**
580
+ > JobsCollection jobs(project_id, opts)
581
+
582
+ Returns a collection of Jobs
583
+
584
+ Returns a collection of Jobs
585
+
586
+ ### Example
587
+ ```ruby
588
+ # load the gem
589
+ require 'telestream_cloud_tts'
590
+ # setup authorization
591
+ TelestreamCloud::Tts.configure do |config|
592
+ # Configure API key authorization: apiKey
593
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
594
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
595
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
596
+ end
597
+
598
+ api_instance = TelestreamCloud::Tts::TtsApi.new
599
+
600
+ project_id = "project_id_example" # String | ID of the Project
601
+
602
+ opts = {
603
+ page: 56, # Integer | page number
604
+ per_page: 56 # Integer | number of records per page
605
+ }
606
+
607
+ begin
608
+ #Returns a collection of Jobs
609
+ result = api_instance.jobs(project_id, opts)
610
+ p result
611
+ rescue TelestreamCloud::Tts::ApiError => e
612
+ puts "Exception when calling TtsApi->jobs: #{e}"
613
+ end
614
+ ```
615
+
616
+ ### Parameters
617
+
618
+ Name | Type | Description | Notes
619
+ ------------- | ------------- | ------------- | -------------
620
+ **project_id** | **String**| ID of the Project |
621
+ **page** | **Integer**| page number | [optional]
622
+ **per_page** | **Integer**| number of records per page | [optional]
623
+
624
+ ### Return type
625
+
626
+ [**JobsCollection**](JobsCollection.md)
627
+
628
+ ### Authorization
629
+
630
+ [apiKey](../README.md#apiKey)
631
+
632
+ ### HTTP request headers
633
+
634
+ - **Content-Type**: application/json
635
+ - **Accept**: application/json
636
+
637
+
638
+
639
+ # **project**
640
+ > Project project(project_id)
641
+
642
+ Returns the Project
643
+
644
+ Returns the Project
645
+
646
+ ### Example
647
+ ```ruby
648
+ # load the gem
649
+ require 'telestream_cloud_tts'
650
+ # setup authorization
651
+ TelestreamCloud::Tts.configure do |config|
652
+ # Configure API key authorization: apiKey
653
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
654
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
655
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
656
+ end
657
+
658
+ api_instance = TelestreamCloud::Tts::TtsApi.new
659
+
660
+ project_id = "project_id_example" # String | ID of the Project
661
+
662
+
663
+ begin
664
+ #Returns the Project
665
+ result = api_instance.project(project_id)
666
+ p result
667
+ rescue TelestreamCloud::Tts::ApiError => e
668
+ puts "Exception when calling TtsApi->project: #{e}"
669
+ end
670
+ ```
671
+
672
+ ### Parameters
673
+
674
+ Name | Type | Description | Notes
675
+ ------------- | ------------- | ------------- | -------------
676
+ **project_id** | **String**| ID of the Project |
677
+
678
+ ### Return type
679
+
680
+ [**Project**](Project.md)
681
+
682
+ ### Authorization
683
+
684
+ [apiKey](../README.md#apiKey)
685
+
686
+ ### HTTP request headers
687
+
688
+ - **Content-Type**: application/json
689
+ - **Accept**: application/json
690
+
691
+
692
+
693
+ # **projects**
694
+ > ProjectsCollection projects
695
+
696
+ Returns a collection of Projects
697
+
698
+ Returns a collection of Projects
699
+
700
+ ### Example
701
+ ```ruby
702
+ # load the gem
703
+ require 'telestream_cloud_tts'
704
+ # setup authorization
705
+ TelestreamCloud::Tts.configure do |config|
706
+ # Configure API key authorization: apiKey
707
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
708
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
709
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
710
+ end
711
+
712
+ api_instance = TelestreamCloud::Tts::TtsApi.new
713
+
714
+ begin
715
+ #Returns a collection of Projects
716
+ result = api_instance.projects
717
+ p result
718
+ rescue TelestreamCloud::Tts::ApiError => e
719
+ puts "Exception when calling TtsApi->projects: #{e}"
720
+ end
721
+ ```
722
+
723
+ ### Parameters
724
+ This endpoint does not need any parameter.
725
+
726
+ ### Return type
727
+
728
+ [**ProjectsCollection**](ProjectsCollection.md)
729
+
730
+ ### Authorization
731
+
732
+ [apiKey](../README.md#apiKey)
733
+
734
+ ### HTTP request headers
735
+
736
+ - **Content-Type**: application/json
737
+ - **Accept**: application/json
738
+
739
+
740
+
741
+ # **train_project**
742
+ > train_project(project_id)
743
+
744
+ Queues training
745
+
746
+ Queues training
747
+
748
+ ### Example
749
+ ```ruby
750
+ # load the gem
751
+ require 'telestream_cloud_tts'
752
+ # setup authorization
753
+ TelestreamCloud::Tts.configure do |config|
754
+ # Configure API key authorization: apiKey
755
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
756
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
757
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
758
+ end
759
+
760
+ api_instance = TelestreamCloud::Tts::TtsApi.new
761
+
762
+ project_id = "project_id_example" # String | ID of the Project
763
+
764
+
765
+ begin
766
+ #Queues training
767
+ api_instance.train_project(project_id)
768
+ rescue TelestreamCloud::Tts::ApiError => e
769
+ puts "Exception when calling TtsApi->train_project: #{e}"
770
+ end
771
+ ```
772
+
773
+ ### Parameters
774
+
775
+ Name | Type | Description | Notes
776
+ ------------- | ------------- | ------------- | -------------
777
+ **project_id** | **String**| ID of the Project |
778
+
779
+ ### Return type
780
+
781
+ nil (empty response body)
782
+
783
+ ### Authorization
784
+
785
+ [apiKey](../README.md#apiKey)
786
+
787
+ ### HTTP request headers
788
+
789
+ - **Content-Type**: application/json
790
+ - **Accept**: application/json
791
+
792
+
793
+
794
+ # **update_project**
795
+ > Project update_project(project)
796
+
797
+ Updates an existing Project
798
+
799
+ Updates an existing Project
800
+
801
+ ### Example
802
+ ```ruby
803
+ # load the gem
804
+ require 'telestream_cloud_tts'
805
+ # setup authorization
806
+ TelestreamCloud::Tts.configure do |config|
807
+ # Configure API key authorization: apiKey
808
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
809
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
810
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
811
+ end
812
+
813
+ api_instance = TelestreamCloud::Tts::TtsApi.new
814
+
815
+ project = TelestreamCloud::Tts::Project.new # Project |
816
+
817
+
818
+ begin
819
+ #Updates an existing Project
820
+ result = api_instance.update_project(project)
821
+ p result
822
+ rescue TelestreamCloud::Tts::ApiError => e
823
+ puts "Exception when calling TtsApi->update_project: #{e}"
824
+ end
825
+ ```
826
+
827
+ ### Parameters
828
+
829
+ Name | Type | Description | Notes
830
+ ------------- | ------------- | ------------- | -------------
831
+ **project** | [**Project**](Project.md)| |
832
+
833
+ ### Return type
834
+
835
+ [**Project**](Project.md)
836
+
837
+ ### Authorization
838
+
839
+ [apiKey](../README.md#apiKey)
840
+
841
+ ### HTTP request headers
842
+
843
+ - **Content-Type**: application/json
844
+ - **Accept**: application/json
845
+
846
+
847
+
848
+ # **upload_video**
849
+ > UploadSession upload_video(project_id, video_upload_body)
850
+
851
+ Creates an upload session
852
+
853
+ ### Example
854
+ ```ruby
855
+ # load the gem
856
+ require 'telestream_cloud_tts'
857
+ # setup authorization
858
+ TelestreamCloud::Tts.configure do |config|
859
+ # Configure API key authorization: apiKey
860
+ config.api_key['X-Api-Key'] = 'YOUR API KEY'
861
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
862
+ #config.api_key_prefix['X-Api-Key'] = 'Bearer'
863
+ end
864
+
865
+ api_instance = TelestreamCloud::Tts::TtsApi.new
866
+
867
+ project_id = "project_id_example" # String | ID of the Project
868
+
869
+ video_upload_body = TelestreamCloud::Tts::VideoUploadBody.new # VideoUploadBody |
870
+
871
+
872
+ begin
873
+ #Creates an upload session
874
+ result = api_instance.upload_video(project_id, video_upload_body)
875
+ p result
876
+ rescue TelestreamCloud::Tts::ApiError => e
877
+ puts "Exception when calling TtsApi->upload_video: #{e}"
878
+ end
879
+ ```
880
+
881
+ ### Parameters
882
+
883
+ Name | Type | Description | Notes
884
+ ------------- | ------------- | ------------- | -------------
885
+ **project_id** | **String**| ID of the Project |
886
+ **video_upload_body** | [**VideoUploadBody**](VideoUploadBody.md)| |
887
+
888
+ ### Return type
889
+
890
+ [**UploadSession**](UploadSession.md)
891
+
892
+ ### Authorization
893
+
894
+ [apiKey](../README.md#apiKey)
895
+
896
+ ### HTTP request headers
897
+
898
+ - **Content-Type**: application/json
899
+ - **Accept**: application/json
900
+
901
+
902
+