azure_stt 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/.github/dependabot.yml +6 -0
  3. data/.github/workflows/ci.yml +33 -0
  4. data/.gitignore +56 -0
  5. data/.rubocop.yml +22 -0
  6. data/CHANGELOG.md +28 -0
  7. data/CODE_OF_CONDUCT.md +74 -0
  8. data/Gemfile +24 -0
  9. data/Gemfile.lock +141 -0
  10. data/LICENSE +21 -0
  11. data/README.md +129 -0
  12. data/Rakefile +27 -0
  13. data/azure_stt.gemspec +29 -0
  14. data/bin/console +15 -0
  15. data/bin/setup +8 -0
  16. data/docs/AzureBatchTranscription.html +301 -0
  17. data/docs/AzureBatchTranscription/Configuration.html +212 -0
  18. data/docs/AzureSTT.html +305 -0
  19. data/docs/AzureSTT/Client.html +1008 -0
  20. data/docs/AzureSTT/Configuration.html +282 -0
  21. data/docs/AzureSTT/Error.html +305 -0
  22. data/docs/AzureSTT/Models.html +135 -0
  23. data/docs/AzureSTT/Models/Base.html +139 -0
  24. data/docs/AzureSTT/Models/CombinedRecognizedPhrases.html +538 -0
  25. data/docs/AzureSTT/Models/File.html +794 -0
  26. data/docs/AzureSTT/Models/RecognizedPhrase.html +769 -0
  27. data/docs/AzureSTT/Models/Report.html +384 -0
  28. data/docs/AzureSTT/Models/Result.html +796 -0
  29. data/docs/AzureSTT/Models/Sentence.html +615 -0
  30. data/docs/AzureSTT/Models/Transcription.html +1415 -0
  31. data/docs/AzureSTT/Models/Word.html +615 -0
  32. data/docs/AzureSTT/NetError.html +159 -0
  33. data/docs/AzureSTT/Parsers.html +128 -0
  34. data/docs/AzureSTT/Parsers/Base.html +404 -0
  35. data/docs/AzureSTT/Parsers/CombinedRecognizedPhrases.html +156 -0
  36. data/docs/AzureSTT/Parsers/File.html +156 -0
  37. data/docs/AzureSTT/Parsers/RecognizedPhrase.html +156 -0
  38. data/docs/AzureSTT/Parsers/Report.html +156 -0
  39. data/docs/AzureSTT/Parsers/Result.html +156 -0
  40. data/docs/AzureSTT/Parsers/Sentence.html +156 -0
  41. data/docs/AzureSTT/Parsers/Transcription.html +156 -0
  42. data/docs/AzureSTT/Parsers/Word.html +156 -0
  43. data/docs/AzureSTT/ServiceError.html +159 -0
  44. data/docs/AzureSTT/Session.html +767 -0
  45. data/docs/AzureSTT/Transcription.html +635 -0
  46. data/docs/AzureSTT/Types.html +116 -0
  47. data/docs/AzureStt_.html +121 -0
  48. data/docs/_index.html +392 -0
  49. data/docs/class_list.html +51 -0
  50. data/docs/css/common.css +1 -0
  51. data/docs/css/full_list.css +58 -0
  52. data/docs/css/style.css +497 -0
  53. data/docs/file.README.html +201 -0
  54. data/docs/file_list.html +56 -0
  55. data/docs/frames.html +17 -0
  56. data/docs/index.html +201 -0
  57. data/docs/js/app.js +314 -0
  58. data/docs/js/full_list.js +216 -0
  59. data/docs/js/jquery.js +4 -0
  60. data/docs/method_list.html +707 -0
  61. data/docs/top-level-namespace.html +110 -0
  62. data/env.sample +2 -0
  63. data/lib/azure_stt.rb +20 -0
  64. data/lib/azure_stt/client.rb +189 -0
  65. data/lib/azure_stt/configuration.rb +28 -0
  66. data/lib/azure_stt/errors.rb +25 -0
  67. data/lib/azure_stt/models.rb +30 -0
  68. data/lib/azure_stt/models/base.rb +27 -0
  69. data/lib/azure_stt/models/combined_recognized_phrases.rb +48 -0
  70. data/lib/azure_stt/models/file.rb +72 -0
  71. data/lib/azure_stt/models/recognized_phrase.rb +70 -0
  72. data/lib/azure_stt/models/report.rb +31 -0
  73. data/lib/azure_stt/models/result.rb +76 -0
  74. data/lib/azure_stt/models/sentence.rb +53 -0
  75. data/lib/azure_stt/models/transcription.rb +185 -0
  76. data/lib/azure_stt/models/word.rb +54 -0
  77. data/lib/azure_stt/parsers.rb +19 -0
  78. data/lib/azure_stt/parsers/base.rb +42 -0
  79. data/lib/azure_stt/parsers/combined_recognized_phrases.rb +28 -0
  80. data/lib/azure_stt/parsers/file.rb +28 -0
  81. data/lib/azure_stt/parsers/recognized_phrase.rb +45 -0
  82. data/lib/azure_stt/parsers/report.rb +25 -0
  83. data/lib/azure_stt/parsers/result.rb +56 -0
  84. data/lib/azure_stt/parsers/sentence.rb +45 -0
  85. data/lib/azure_stt/parsers/transcription.rb +34 -0
  86. data/lib/azure_stt/parsers/word.rb +28 -0
  87. data/lib/azure_stt/session.rb +100 -0
  88. data/lib/azure_stt/version.rb +5 -0
  89. metadata +158 -0
@@ -0,0 +1,305 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: AzureSTT
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "AzureSTT";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (A)</a> &raquo;
40
+
41
+
42
+ <span class="title">AzureSTT</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: AzureSTT
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/azure_stt.rb<span class="defines">,<br />
82
+ lib/azure_stt/client.rb,<br /> lib/azure_stt/errors.rb,<br /> lib/azure_stt/models.rb,<br /> lib/azure_stt/parsers.rb,<br /> lib/azure_stt/session.rb,<br /> lib/azure_stt/models/base.rb,<br /> lib/azure_stt/models/file.rb,<br /> lib/azure_stt/models/word.rb,<br /> lib/azure_stt/parsers/base.rb,<br /> lib/azure_stt/parsers/file.rb,<br /> lib/azure_stt/parsers/word.rb,<br /> lib/azure_stt/configuration.rb,<br /> lib/azure_stt/models/report.rb,<br /> lib/azure_stt/models/result.rb,<br /> lib/azure_stt/parsers/report.rb,<br /> lib/azure_stt/parsers/result.rb,<br /> lib/azure_stt/models/sentence.rb,<br /> lib/azure_stt/parsers/sentence.rb,<br /> lib/azure_stt/models/transcription.rb,<br /> lib/azure_stt/parsers/transcription.rb,<br /> lib/azure_stt/models/recognized_phrase.rb,<br /> lib/azure_stt/parsers/recognized_phrase.rb,<br /> lib/azure_stt/models/combined_recognized_phrases.rb,<br /> lib/azure_stt/parsers/combined_recognized_phrases.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+
91
+ <p>frozen_string_literal</p>
92
+
93
+
94
+ </div>
95
+ </div>
96
+ <div class="tags">
97
+
98
+
99
+ </div><h2>Defined Under Namespace</h2>
100
+ <p class="children">
101
+
102
+
103
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="AzureSTT/Models.html" title="AzureSTT::Models (module)">Models</a></span>, <span class='object_link'><a href="AzureSTT/Parsers.html" title="AzureSTT::Parsers (module)">Parsers</a></span>, <span class='object_link'><a href="AzureSTT/Types.html" title="AzureSTT::Types (module)">Types</a></span>
104
+
105
+
106
+
107
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="AzureSTT/Client.html" title="AzureSTT::Client (class)">Client</a></span>, <span class='object_link'><a href="AzureSTT/Configuration.html" title="AzureSTT::Configuration (class)">Configuration</a></span>, <span class='object_link'><a href="AzureSTT/Error.html" title="AzureSTT::Error (class)">Error</a></span>, <span class='object_link'><a href="AzureSTT/NetError.html" title="AzureSTT::NetError (class)">NetError</a></span>, <span class='object_link'><a href="AzureSTT/ServiceError.html" title="AzureSTT::ServiceError (class)">ServiceError</a></span>, <span class='object_link'><a href="AzureSTT/Session.html" title="AzureSTT::Session (class)">Session</a></span>
108
+
109
+
110
+ </p>
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ <h2>
120
+ Class Method Summary
121
+ <small><a href="#" class="summary_toggle">collapse</a></small>
122
+ </h2>
123
+
124
+ <ul class="summary">
125
+
126
+ <li class="public ">
127
+ <span class="summary_signature">
128
+
129
+ <a href="#configuration-class_method" title="configuration (class method)">.<strong>configuration</strong> &#x21d2; Configuration </a>
130
+
131
+
132
+
133
+ </span>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <span class="summary_desc"><div class='inline'>
144
+ <p>Get the configuration for AzureSTT.</p>
145
+ </div></span>
146
+
147
+ </li>
148
+
149
+
150
+ <li class="public ">
151
+ <span class="summary_signature">
152
+
153
+ <a href="#configure-class_method" title="configure (class method)">.<strong>configure</strong> {|configuration| ... } &#x21d2; Object </a>
154
+
155
+
156
+
157
+ </span>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <span class="summary_desc"><div class='inline'>
168
+ <p>Modify the configuration.</p>
169
+ </div></span>
170
+
171
+ </li>
172
+
173
+
174
+ </ul>
175
+
176
+
177
+
178
+
179
+ <div id="class_method_details" class="method_details_list">
180
+ <h2>Class Method Details</h2>
181
+
182
+
183
+ <div class="method_details first">
184
+ <h3 class="signature first" id="configuration-class_method">
185
+
186
+ .<strong>configuration</strong> &#x21d2; <tt><span class='object_link'><a href="AzureSTT/Configuration.html" title="AzureSTT::Configuration (class)">Configuration</a></span></tt>
187
+
188
+
189
+
190
+
191
+
192
+ </h3><div class="docstring">
193
+ <div class="discussion">
194
+
195
+ <p>Get the configuration for AzureSTT</p>
196
+
197
+
198
+ </div>
199
+ </div>
200
+ <div class="tags">
201
+
202
+ <p class="tag_title">Returns:</p>
203
+ <ul class="return">
204
+
205
+ <li>
206
+
207
+
208
+ <span class='type'>(<tt><span class='object_link'><a href="AzureSTT/Configuration.html" title="AzureSTT::Configuration (class)">Configuration</a></span></tt>)</span>
209
+
210
+
211
+
212
+ </li>
213
+
214
+ </ul>
215
+
216
+ </div><table class="source_code">
217
+ <tr>
218
+ <td>
219
+ <pre class="lines">
220
+
221
+
222
+ 17
223
+ 18
224
+ 19</pre>
225
+ </td>
226
+ <td>
227
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/configuration.rb', line 17</span>
228
+
229
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span>
230
+ <span class='ivar'>@configuration</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="AzureSTT/Configuration.html" title="AzureSTT::Configuration (class)">Configuration</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
231
+ <span class='kw'>end</span></pre>
232
+ </td>
233
+ </tr>
234
+ </table>
235
+ </div>
236
+
237
+ <div class="method_details ">
238
+ <h3 class="signature " id="configure-class_method">
239
+
240
+ .<strong>configure</strong> {|configuration| ... } &#x21d2; <tt>Object</tt>
241
+
242
+
243
+
244
+
245
+
246
+ </h3><div class="docstring">
247
+ <div class="discussion">
248
+
249
+ <p>Modify the configuration</p>
250
+
251
+
252
+ </div>
253
+ </div>
254
+ <div class="tags">
255
+
256
+ <p class="tag_title">Yields:</p>
257
+ <ul class="yield">
258
+
259
+ <li>
260
+
261
+
262
+ <span class='type'>(<tt><span class='object_link'><a href="#configuration-class_method" title="AzureSTT.configuration (method)">configuration</a></span></tt>)</span>
263
+
264
+
265
+
266
+ </li>
267
+
268
+ </ul>
269
+
270
+ </div><table class="source_code">
271
+ <tr>
272
+ <td>
273
+ <pre class="lines">
274
+
275
+
276
+ 24
277
+ 25
278
+ 26
279
+ 27</pre>
280
+ </td>
281
+ <td>
282
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/configuration.rb', line 24</span>
283
+
284
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_configure'>configure</span>
285
+ <span class='kw'>yield</span> <span class='id identifier rubyid_configuration'>configuration</span>
286
+ <span class='ivar'>@client</span> <span class='op'>=</span> <span class='kw'>nil</span>
287
+ <span class='kw'>end</span></pre>
288
+ </td>
289
+ </tr>
290
+ </table>
291
+ </div>
292
+
293
+ </div>
294
+
295
+ </div>
296
+
297
+ <div id="footer">
298
+ Generated on Thu Jun 24 14:16:27 2021 by
299
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
300
+ 0.9.26 (ruby-2.6.6).
301
+ </div>
302
+
303
+ </div>
304
+ </body>
305
+ </html>
@@ -0,0 +1,1008 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: AzureSTT::Client
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "AzureSTT::Client";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../AzureSTT.html" title="AzureSTT (module)">AzureSTT</a></span></span>
41
+ &raquo;
42
+ <span class="title">Client</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: AzureSTT::Client
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">AzureSTT::Client</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <dl>
91
+ <dt>Includes:</dt>
92
+ <dd>HTTParty</dd>
93
+ </dl>
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dl>
101
+ <dt>Defined in:</dt>
102
+ <dd>lib/azure_stt/client.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+
110
+ <p>Client class that uses HTTParty to communicate with the API</p>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+
118
+ </div>
119
+
120
+
121
+
122
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
123
+ <ul class="summary">
124
+
125
+ <li class="public ">
126
+ <span class="summary_signature">
127
+
128
+ <a href="#region-instance_method" title="#region (instance method)">#<strong>region</strong> &#x21d2; Object </a>
129
+
130
+
131
+
132
+ </span>
133
+
134
+
135
+
136
+
137
+ <span class="note title readonly">readonly</span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'>
148
+ <p>Returns the value of attribute region.</p>
149
+ </div></span>
150
+
151
+ </li>
152
+
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#subscription_key-instance_method" title="#subscription_key (instance method)">#<strong>subscription_key</strong> &#x21d2; Object </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+ <span class="note title readonly">readonly</span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'>
177
+ <p>Returns the value of attribute subscription_key.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ </ul>
184
+
185
+
186
+
187
+
188
+
189
+ <h2>
190
+ Instance Method Summary
191
+ <small><a href="#" class="summary_toggle">collapse</a></small>
192
+ </h2>
193
+
194
+ <ul class="summary">
195
+
196
+ <li class="public ">
197
+ <span class="summary_signature">
198
+
199
+ <a href="#create_transcription-instance_method" title="#create_transcription (instance method)">#<strong>create_transcription</strong>(**args) &#x21d2; Hash </a>
200
+
201
+
202
+
203
+ </span>
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <span class="summary_desc"><div class='inline'>
214
+ <p>Create a transcription for a batch or a single file.</p>
215
+ </div></span>
216
+
217
+ </li>
218
+
219
+
220
+ <li class="public ">
221
+ <span class="summary_signature">
222
+
223
+ <a href="#get_file-instance_method" title="#get_file (instance method)">#<strong>get_file</strong>(file_url) &#x21d2; Hash </a>
224
+
225
+
226
+
227
+ </span>
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+ <span class="summary_desc"><div class='inline'>
238
+ <p>Read a JSON file and parse it.</p>
239
+ </div></span>
240
+
241
+ </li>
242
+
243
+
244
+ <li class="public ">
245
+ <span class="summary_signature">
246
+
247
+ <a href="#get_transcription-instance_method" title="#get_transcription (instance method)">#<strong>get_transcription</strong>(id) &#x21d2; Hash </a>
248
+
249
+
250
+
251
+ </span>
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <span class="summary_desc"><div class='inline'>
262
+ <p>Get a transcription by giving it&#39;s id.</p>
263
+ </div></span>
264
+
265
+ </li>
266
+
267
+
268
+ <li class="public ">
269
+ <span class="summary_signature">
270
+
271
+ <a href="#get_transcription_files-instance_method" title="#get_transcription_files (instance method)">#<strong>get_transcription_files</strong>(id) &#x21d2; Array[Hash] </a>
272
+
273
+
274
+
275
+ </span>
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+ <span class="summary_desc"><div class='inline'>
286
+ <p>Get an array containing the files for a given transcription.</p>
287
+ </div></span>
288
+
289
+ </li>
290
+
291
+
292
+ <li class="public ">
293
+ <span class="summary_signature">
294
+
295
+ <a href="#get_transcriptions-instance_method" title="#get_transcriptions (instance method)">#<strong>get_transcriptions</strong>(skip: nil, top: nil) &#x21d2; Array[Hash] </a>
296
+
297
+
298
+
299
+ </span>
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+ <span class="summary_desc"><div class='inline'>
310
+ <p>Get an Array of all the transcriptions.</p>
311
+ </div></span>
312
+
313
+ </li>
314
+
315
+
316
+ <li class="public ">
317
+ <span class="summary_signature">
318
+
319
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(region:, subscription_key:) &#x21d2; Client </a>
320
+
321
+
322
+
323
+ </span>
324
+
325
+
326
+ <span class="note title constructor">constructor</span>
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+ <span class="summary_desc"><div class='inline'>
336
+ <p>Initialize the client.</p>
337
+ </div></span>
338
+
339
+ </li>
340
+
341
+
342
+ </ul>
343
+
344
+
345
+
346
+ <div id="constructor_details" class="method_details_list">
347
+ <h2>Constructor Details</h2>
348
+
349
+ <div class="method_details first">
350
+ <h3 class="signature first" id="initialize-instance_method">
351
+
352
+ #<strong>initialize</strong>(region:, subscription_key:) &#x21d2; <tt><span class='object_link'><a href="" title="AzureSTT::Client (class)">Client</a></span></tt>
353
+
354
+
355
+
356
+
357
+
358
+ </h3><div class="docstring">
359
+ <div class="discussion">
360
+
361
+ <p>Initialize the client</p>
362
+
363
+
364
+ </div>
365
+ </div>
366
+ <div class="tags">
367
+ <p class="tag_title">Parameters:</p>
368
+ <ul class="param">
369
+
370
+ <li>
371
+
372
+ <span class='name'>subscription_key</span>
373
+
374
+
375
+ <span class='type'>(<tt>String</tt>)</span>
376
+
377
+
378
+
379
+ &mdash;
380
+ <div class='inline'>
381
+ <p>Cognitive Services API Key</p>
382
+ </div>
383
+
384
+ </li>
385
+
386
+ <li>
387
+
388
+ <span class='name'>region</span>
389
+
390
+
391
+ <span class='type'>(<tt>String</tt>)</span>
392
+
393
+
394
+
395
+ &mdash;
396
+ <div class='inline'>
397
+ <p>The region of your resources</p>
398
+ </div>
399
+
400
+ </li>
401
+
402
+ </ul>
403
+
404
+
405
+ </div><table class="source_code">
406
+ <tr>
407
+ <td>
408
+ <pre class="lines">
409
+
410
+
411
+ 20
412
+ 21
413
+ 22
414
+ 23
415
+ 24</pre>
416
+ </td>
417
+ <td>
418
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/client.rb', line 20</span>
419
+
420
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>region:</span><span class='comma'>,</span> <span class='label'>subscription_key:</span><span class='rparen'>)</span>
421
+ <span class='ivar'>@subscription_key</span> <span class='op'>=</span> <span class='id identifier rubyid_subscription_key'>subscription_key</span>
422
+ <span class='ivar'>@region</span> <span class='op'>=</span> <span class='id identifier rubyid_region'>region</span>
423
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_base_uri'>base_uri</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>https://</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_region'>region</span><span class='embexpr_end'>}</span><span class='tstring_content'>.api.cognitive.microsoft.com/speechtotext/v3.0</span><span class='tstring_end'>&quot;</span></span>
424
+ <span class='kw'>end</span></pre>
425
+ </td>
426
+ </tr>
427
+ </table>
428
+ </div>
429
+
430
+ </div>
431
+
432
+ <div id="instance_attr_details" class="attr_details">
433
+ <h2>Instance Attribute Details</h2>
434
+
435
+
436
+ <span id=""></span>
437
+ <div class="method_details first">
438
+ <h3 class="signature first" id="region-instance_method">
439
+
440
+ #<strong>region</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
441
+
442
+
443
+
444
+
445
+
446
+ </h3><div class="docstring">
447
+ <div class="discussion">
448
+
449
+ <p>Returns the value of attribute region.</p>
450
+
451
+
452
+ </div>
453
+ </div>
454
+ <div class="tags">
455
+
456
+
457
+ </div><table class="source_code">
458
+ <tr>
459
+ <td>
460
+ <pre class="lines">
461
+
462
+
463
+ 12
464
+ 13
465
+ 14</pre>
466
+ </td>
467
+ <td>
468
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/client.rb', line 12</span>
469
+
470
+ <span class='kw'>def</span> <span class='id identifier rubyid_region'>region</span>
471
+ <span class='ivar'>@region</span>
472
+ <span class='kw'>end</span></pre>
473
+ </td>
474
+ </tr>
475
+ </table>
476
+ </div>
477
+
478
+
479
+ <span id=""></span>
480
+ <div class="method_details ">
481
+ <h3 class="signature " id="subscription_key-instance_method">
482
+
483
+ #<strong>subscription_key</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
484
+
485
+
486
+
487
+
488
+
489
+ </h3><div class="docstring">
490
+ <div class="discussion">
491
+
492
+ <p>Returns the value of attribute subscription_key.</p>
493
+
494
+
495
+ </div>
496
+ </div>
497
+ <div class="tags">
498
+
499
+
500
+ </div><table class="source_code">
501
+ <tr>
502
+ <td>
503
+ <pre class="lines">
504
+
505
+
506
+ 12
507
+ 13
508
+ 14</pre>
509
+ </td>
510
+ <td>
511
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/client.rb', line 12</span>
512
+
513
+ <span class='kw'>def</span> <span class='id identifier rubyid_subscription_key'>subscription_key</span>
514
+ <span class='ivar'>@subscription_key</span>
515
+ <span class='kw'>end</span></pre>
516
+ </td>
517
+ </tr>
518
+ </table>
519
+ </div>
520
+
521
+ </div>
522
+
523
+
524
+ <div id="instance_method_details" class="method_details_list">
525
+ <h2>Instance Method Details</h2>
526
+
527
+
528
+ <div class="method_details first">
529
+ <h3 class="signature first" id="create_transcription-instance_method">
530
+
531
+ #<strong>create_transcription</strong>(**args) &#x21d2; <tt>Hash</tt>
532
+
533
+
534
+
535
+
536
+
537
+ </h3><div class="docstring">
538
+ <div class="discussion">
539
+
540
+ <p>Create a transcription for a batch or a single file.</p>
541
+
542
+
543
+ </div>
544
+ </div>
545
+ <div class="tags">
546
+ <p class="tag_title">Parameters:</p>
547
+ <ul class="param">
548
+
549
+ <li>
550
+
551
+ <span class='name'>args</span>
552
+
553
+
554
+ <span class='type'>(<tt>Hash</tt>)</span>
555
+
556
+
557
+
558
+ </li>
559
+
560
+ </ul>
561
+
562
+ <p class="tag_title">Returns:</p>
563
+ <ul class="return">
564
+
565
+ <li>
566
+
567
+
568
+ <span class='type'>(<tt>Hash</tt>)</span>
569
+
570
+
571
+
572
+ &mdash;
573
+ <div class='inline'>
574
+ <p>The JSON body response, parsed by HTTParty</p>
575
+ </div>
576
+
577
+ </li>
578
+
579
+ </ul>
580
+
581
+ <p class="tag_title">See Also:</p>
582
+ <ul class="see">
583
+
584
+ <li><a href="https://francecentral.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateTranscription" target="_parent" title="https://francecentral.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateTranscription">https://francecentral.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/CreateTranscription</a></li>
585
+
586
+ </ul>
587
+
588
+ </div><table class="source_code">
589
+ <tr>
590
+ <td>
591
+ <pre class="lines">
592
+
593
+
594
+ 35
595
+ 36
596
+ 37
597
+ 38
598
+ 39
599
+ 40
600
+ 41
601
+ 42</pre>
602
+ </td>
603
+ <td>
604
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/client.rb', line 35</span>
605
+
606
+ <span class='kw'>def</span> <span class='id identifier rubyid_create_transcription'>create_transcription</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
607
+ <span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span>
608
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/transcriptions</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
609
+ <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
610
+ <span class='rparen'>)</span>
611
+
612
+ <span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_parsed_response'>parsed_response</span>
613
+ <span class='kw'>end</span></pre>
614
+ </td>
615
+ </tr>
616
+ </table>
617
+ </div>
618
+
619
+ <div class="method_details ">
620
+ <h3 class="signature " id="get_file-instance_method">
621
+
622
+ #<strong>get_file</strong>(file_url) &#x21d2; <tt>Hash</tt>
623
+
624
+
625
+
626
+
627
+
628
+ </h3><div class="docstring">
629
+ <div class="discussion">
630
+
631
+ <p>Read a JSON file and parse it.</p>
632
+
633
+
634
+ </div>
635
+ </div>
636
+ <div class="tags">
637
+ <p class="tag_title">Parameters:</p>
638
+ <ul class="param">
639
+
640
+ <li>
641
+
642
+ <span class='name'>file_url</span>
643
+
644
+
645
+ <span class='type'>(<tt>String</tt>)</span>
646
+
647
+
648
+
649
+ &mdash;
650
+ <div class='inline'>
651
+ <p>The url of the content</p>
652
+ </div>
653
+
654
+ </li>
655
+
656
+ </ul>
657
+
658
+ <p class="tag_title">Returns:</p>
659
+ <ul class="return">
660
+
661
+ <li>
662
+
663
+
664
+ <span class='type'>(<tt>Hash</tt>)</span>
665
+
666
+
667
+
668
+ &mdash;
669
+ <div class='inline'>
670
+ <p>the file parsed</p>
671
+ </div>
672
+
673
+ </li>
674
+
675
+ </ul>
676
+
677
+ </div><table class="source_code">
678
+ <tr>
679
+ <td>
680
+ <pre class="lines">
681
+
682
+
683
+ 100
684
+ 101
685
+ 102
686
+ 103
687
+ 104
688
+ 105
689
+ 106</pre>
690
+ </td>
691
+ <td>
692
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/client.rb', line 100</span>
693
+
694
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_file'>get_file</span><span class='lparen'>(</span><span class='id identifier rubyid_file_url'>file_url</span><span class='rparen'>)</span>
695
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_file_url'>file_url</span><span class='rparen'>)</span>
696
+
697
+ <span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='id identifier rubyid_handle_response'>handle_response</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
698
+
699
+ <span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_parsed_response'>parsed_response</span>
700
+ <span class='kw'>end</span></pre>
701
+ </td>
702
+ </tr>
703
+ </table>
704
+ </div>
705
+
706
+ <div class="method_details ">
707
+ <h3 class="signature " id="get_transcription-instance_method">
708
+
709
+ #<strong>get_transcription</strong>(id) &#x21d2; <tt>Hash</tt>
710
+
711
+
712
+
713
+
714
+
715
+ </h3><div class="docstring">
716
+ <div class="discussion">
717
+
718
+ <p>Get a transcription by giving it&#39;s id</p>
719
+
720
+
721
+ </div>
722
+ </div>
723
+ <div class="tags">
724
+ <p class="tag_title">Parameters:</p>
725
+ <ul class="param">
726
+
727
+ <li>
728
+
729
+ <span class='name'>id</span>
730
+
731
+
732
+ <span class='type'>(<tt>String</tt>)</span>
733
+
734
+
735
+
736
+ &mdash;
737
+ <div class='inline'>
738
+ <p>The identifier of the transcription</p>
739
+ </div>
740
+
741
+ </li>
742
+
743
+ </ul>
744
+
745
+ <p class="tag_title">Returns:</p>
746
+ <ul class="return">
747
+
748
+ <li>
749
+
750
+
751
+ <span class='type'>(<tt>Hash</tt>)</span>
752
+
753
+
754
+
755
+ &mdash;
756
+ <div class='inline'>
757
+ <p>The JSON body response, parsed by HTTParty</p>
758
+ </div>
759
+
760
+ </li>
761
+
762
+ </ul>
763
+
764
+ </div><table class="source_code">
765
+ <tr>
766
+ <td>
767
+ <pre class="lines">
768
+
769
+
770
+ 51
771
+ 52
772
+ 53
773
+ 54
774
+ 55</pre>
775
+ </td>
776
+ <td>
777
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/client.rb', line 51</span>
778
+
779
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_transcription'>get_transcription</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
780
+ <span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/transcriptions/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
781
+
782
+ <span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_parsed_response'>parsed_response</span>
783
+ <span class='kw'>end</span></pre>
784
+ </td>
785
+ </tr>
786
+ </table>
787
+ </div>
788
+
789
+ <div class="method_details ">
790
+ <h3 class="signature " id="get_transcription_files-instance_method">
791
+
792
+ #<strong>get_transcription_files</strong>(id) &#x21d2; <tt>Array[Hash]</tt>
793
+
794
+
795
+
796
+
797
+
798
+ </h3><div class="docstring">
799
+ <div class="discussion">
800
+
801
+ <p>Get an array containing the files for a given transcription</p>
802
+
803
+
804
+ </div>
805
+ </div>
806
+ <div class="tags">
807
+ <p class="tag_title">Parameters:</p>
808
+ <ul class="param">
809
+
810
+ <li>
811
+
812
+ <span class='name'>id</span>
813
+
814
+
815
+ <span class='type'>(<tt>Integer</tt>)</span>
816
+
817
+
818
+
819
+ &mdash;
820
+ <div class='inline'>
821
+ <p>The identifier of the transcription</p>
822
+ </div>
823
+
824
+ </li>
825
+
826
+ </ul>
827
+
828
+ <p class="tag_title">Returns:</p>
829
+ <ul class="return">
830
+
831
+ <li>
832
+
833
+
834
+ <span class='type'>(<tt>Array[Hash]</tt>)</span>
835
+
836
+
837
+
838
+ &mdash;
839
+ <div class='inline'>
840
+ <p>Array of the files of a transcription</p>
841
+ </div>
842
+
843
+ </li>
844
+
845
+ </ul>
846
+
847
+ <p class="tag_title">See Also:</p>
848
+ <ul class="see">
849
+
850
+ <li><a href="https://uscentral.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptionFiles" target="_parent" title="https://uscentral.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptionFiles">https://uscentral.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetTranscriptionFiles</a></li>
851
+
852
+ </ul>
853
+
854
+ </div><table class="source_code">
855
+ <tr>
856
+ <td>
857
+ <pre class="lines">
858
+
859
+
860
+ 87
861
+ 88
862
+ 89
863
+ 90
864
+ 91</pre>
865
+ </td>
866
+ <td>
867
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/client.rb', line 87</span>
868
+
869
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_transcription_files'>get_transcription_files</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
870
+ <span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/transcriptions/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/files</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
871
+
872
+ <span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_parsed_response'>parsed_response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>values</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
873
+ <span class='kw'>end</span></pre>
874
+ </td>
875
+ </tr>
876
+ </table>
877
+ </div>
878
+
879
+ <div class="method_details ">
880
+ <h3 class="signature " id="get_transcriptions-instance_method">
881
+
882
+ #<strong>get_transcriptions</strong>(skip: nil, top: nil) &#x21d2; <tt>Array[Hash]</tt>
883
+
884
+
885
+
886
+
887
+
888
+ </h3><div class="docstring">
889
+ <div class="discussion">
890
+
891
+ <p>Get an Array of all the transcriptions</p>
892
+
893
+ <p>are Hashes parsed by HTTParty.</p>
894
+
895
+
896
+ </div>
897
+ </div>
898
+ <div class="tags">
899
+ <p class="tag_title">Parameters:</p>
900
+ <ul class="param">
901
+
902
+ <li>
903
+
904
+ <span class='name'>skip</span>
905
+
906
+
907
+ <span class='type'>(<tt>Integer</tt>)</span>
908
+
909
+
910
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
911
+
912
+
913
+ &mdash;
914
+ <div class='inline'>
915
+ <p>Number of transcriptions that will be skipped (optional)</p>
916
+ </div>
917
+
918
+ </li>
919
+
920
+ <li>
921
+
922
+ <span class='name'>top</span>
923
+
924
+
925
+ <span class='type'>(<tt>Integer</tt>)</span>
926
+
927
+
928
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
929
+
930
+
931
+ &mdash;
932
+ <div class='inline'>
933
+ <p>Number of transcriptions that will be included (optional)</p>
934
+ </div>
935
+
936
+ </li>
937
+
938
+ </ul>
939
+
940
+ <p class="tag_title">Returns:</p>
941
+ <ul class="return">
942
+
943
+ <li>
944
+
945
+
946
+ <span class='type'>(<tt>Array[Hash]</tt>)</span>
947
+
948
+
949
+
950
+ &mdash;
951
+ <div class='inline'>
952
+ <p>Array of all the transcriptions. The transcriptions</p>
953
+ </div>
954
+
955
+ </li>
956
+
957
+ </ul>
958
+
959
+ </div><table class="source_code">
960
+ <tr>
961
+ <td>
962
+ <pre class="lines">
963
+
964
+
965
+ 66
966
+ 67
967
+ 68
968
+ 69
969
+ 70
970
+ 71
971
+ 72
972
+ 73
973
+ 74
974
+ 75
975
+ 76</pre>
976
+ </td>
977
+ <td>
978
+ <pre class="code"><span class="info file"># File 'lib/azure_stt/client.rb', line 66</span>
979
+
980
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_transcriptions'>get_transcriptions</span><span class='lparen'>(</span><span class='label'>skip:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>top:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
981
+ <span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span>
982
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/transcriptions</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
983
+ <span class='lbrace'>{</span>
984
+ <span class='label'>skip:</span> <span class='id identifier rubyid_skip'>skip</span><span class='comma'>,</span>
985
+ <span class='label'>top:</span> <span class='id identifier rubyid_top'>top</span>
986
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span>
987
+ <span class='rparen'>)</span>
988
+
989
+ <span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_parsed_response'>parsed_response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>values</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
990
+ <span class='kw'>end</span></pre>
991
+ </td>
992
+ </tr>
993
+ </table>
994
+ </div>
995
+
996
+ </div>
997
+
998
+ </div>
999
+
1000
+ <div id="footer">
1001
+ Generated on Thu Jun 24 14:16:27 2021 by
1002
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1003
+ 0.9.26 (ruby-2.6.6).
1004
+ </div>
1005
+
1006
+ </div>
1007
+ </body>
1008
+ </html>