azure_stt 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +1 -1
  3. data/CHANGELOG.md +10 -1
  4. data/Gemfile +1 -0
  5. data/README.md +2 -2
  6. data/azure_stt.gemspec +2 -2
  7. data/docs/AzureSTT/Client.html +148 -39
  8. data/docs/AzureSTT/Configuration.html +4 -4
  9. data/docs/AzureSTT/Error.html +4 -170
  10. data/docs/AzureSTT/Models/Base.html +4 -4
  11. data/docs/AzureSTT/Models/CombinedRecognizedPhrases.html +4 -4
  12. data/docs/AzureSTT/Models/File.html +5 -5
  13. data/docs/AzureSTT/Models/RecognizedPhrase.html +4 -4
  14. data/docs/AzureSTT/Models/Report.html +4 -4
  15. data/docs/AzureSTT/Models/Result.html +4 -4
  16. data/docs/AzureSTT/Models/Sentence.html +4 -4
  17. data/docs/AzureSTT/Models/Transcription.html +5 -5
  18. data/docs/AzureSTT/Models/Word.html +4 -4
  19. data/docs/AzureSTT/Models.html +4 -4
  20. data/docs/AzureSTT/NetError.html +161 -11
  21. data/docs/AzureSTT/Parsers/Base.html +4 -4
  22. data/docs/AzureSTT/Parsers/CombinedRecognizedPhrases.html +4 -4
  23. data/docs/AzureSTT/Parsers/File.html +4 -4
  24. data/docs/AzureSTT/Parsers/RecognizedPhrase.html +4 -4
  25. data/docs/AzureSTT/Parsers/Report.html +4 -4
  26. data/docs/AzureSTT/Parsers/Result.html +4 -4
  27. data/docs/AzureSTT/Parsers/Sentence.html +4 -4
  28. data/docs/AzureSTT/Parsers/Transcription.html +4 -4
  29. data/docs/AzureSTT/Parsers/Word.html +4 -4
  30. data/docs/AzureSTT/Parsers.html +4 -4
  31. data/docs/AzureSTT/ServiceError.html +161 -11
  32. data/docs/AzureSTT/Session.html +132 -24
  33. data/docs/AzureSTT/Types.html +4 -4
  34. data/docs/AzureSTT.html +4 -4
  35. data/docs/AzureStt_.html +5 -5
  36. data/docs/_index.html +5 -5
  37. data/docs/file.README.html +133 -95
  38. data/docs/frames.html +1 -1
  39. data/docs/index.html +133 -95
  40. data/docs/method_list.html +66 -34
  41. data/docs/top-level-namespace.html +4 -4
  42. data/lib/azure_stt/client.rb +9 -8
  43. data/lib/azure_stt/errors.rb +16 -9
  44. data/lib/azure_stt/models/file.rb +1 -1
  45. data/lib/azure_stt/models/transcription.rb +1 -1
  46. data/lib/azure_stt/session.rb +4 -4
  47. data/lib/azure_stt/version.rb +1 -1
  48. metadata +4 -7
  49. data/docs/AzureBatchTranscription/Configuration.html +0 -212
  50. data/docs/AzureBatchTranscription.html +0 -301
  51. data/docs/AzureSTT/Transcription.html +0 -635
data/docs/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.34
10
10
 
11
11
  </title>
12
12
 
@@ -57,143 +57,181 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
- <div id="content"><div id='filecontents'><h1 id="azurestt">azure_stt</h1>
61
- <p>API Wrapper for the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-speech-to-text">Microsoft Azure Speech Services Speech-to-text REST API 3.0</a> (Cognitive Services).</p>
60
+ <div id="content"><div id='filecontents'>
61
+ <h1 id="label-azure_stt">azure_stt</h1>
62
62
 
63
- <h2 id="installation">Installation</h2>
63
+ <p><a href="https://badge.fury.io/rb/azure_stt"><img src="https://badge.fury.io/rb/azure_stt.svg"></a> <a href="https://github.com/PerfectMemory/azure_stt/actions/workflows/ci.yml"><img src="https://github.com/PerfectMemory/azure_stt/actions/workflows/ci.yml/badge.svg"></a> <a href="https://coveralls.io/github/PerfectMemory/azure_stt"><img src="https://coveralls.io/repos/github/PerfectMemory/azure_stt/badge.svg"></a> <a href="https://codeclimate.com/github/PerfectMemory/azure_stt/maintainability"><img src="https://api.codeclimate.com/v1/badges/375190d3122da56a9fe1/maintainability"></a></p>
64
64
 
65
- <p>Add this line to your application’s Gemfile:</p>
65
+ <p>API Wrapper for the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-speech-to-text">Microsoft Azure Speech Services Speech-to-text REST API 3.1</a> (Cognitive Services).</p>
66
66
 
67
- <p><code>ruby
68
- gem 'azure_stt'
69
- </code></p>
67
+ <h2 id="label-Installation">Installation</h2>
68
+
69
+ <p>Add this line to your application&#39;s Gemfile:</p>
70
+
71
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>azure_stt</span><span class='tstring_end'>&#39;</span></span>
72
+ </code></pre>
70
73
 
71
74
  <p>And then execute:</p>
72
75
 
73
- <p><code>bash
74
- bundle
75
- </code></p>
76
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span>
77
+ </code></pre>
76
78
 
77
79
  <p>Or install it yourself as:</p>
78
80
 
79
- <p><code>bash
80
- gem install azure_stt
81
- </code></p>
82
-
83
- <h2 id="azure-speech-to-text-subscription-key">Azure Speech-to-text Subscription key</h2>
81
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_azure_stt'>azure_stt</span>
82
+ </code></pre>
84
83
 
85
- <p>To be able to use the gem, you must have a subscription key.
86
- You can generate one on your Azure account.</p>
84
+ <h2 id="label-Azure+Speech-to-text+Subscription+key">Azure Speech-to-text Subscription key</h2>
87
85
 
88
- <ul>
89
- <li>If you don’t have an Azure account, you can create one for free on <a href="https://azure.microsoft.com/en-us/free/">this page</a>.</li>
90
- <li>Once logged on your <a href="https://portal.azure.com/">Azure portal</a>, subscribe to SpeechServices in Microsoft Cognitive Service.</li>
91
- <li>You will find two subscription keys available in ‘RESOURCE MANAGEMENT &gt; Keys’ (‘KEY 1’ and ‘KEY 2’).</li>
92
- </ul>
86
+ <p>To be able to use the gem, you must have a subscription key. You can generate one on your Azure account.</p>
87
+ <ul><li>
88
+ <p>If you don&#39;t have an Azure account, you can create one for free on <a href="https://azure.microsoft.com/en-us/free/">this page</a>.</p>
89
+ </li><li>
90
+ <p>Once logged on your <a href="https://portal.azure.com/">Azure portal</a>, subscribe to Speech in Microsoft Cognitive Services.</p>
91
+ </li><li>
92
+ <p>You will find two subscription keys available in &#39;RESOURCE MANAGEMENT &gt; Keys&#39; (&#39;KEY 1&#39; and &#39;KEY 2&#39;).</p>
93
+ </li></ul>
93
94
 
94
- <h2 id="usage">Usage</h2>
95
+ <h2 id="label-Usage">Usage</h2>
95
96
 
96
- <h3 id="configuration">Configuration</h3>
97
+ <h3 id="label-Configuration">Configuration</h3>
97
98
 
98
99
  <p>Two environment variables are used:</p>
100
+ <ul><li>
101
+ <p>&#39;REGION&#39;: the region of your subscription</p>
102
+ </li><li>
103
+ <p>&#39;SUBSCRIPTION_KEY&#39;: the API key you can generate on your Azure account.</p>
104
+ </li></ul>
99
105
 
100
- <ul>
101
- <li>
102
- <p>‘REGION’: the region of your subscription</p>
103
- </li>
104
- <li>
105
- <p>‘SUBSCRIPTION_KEY’: the API key you can generate on your Azure account.</p>
106
- </li>
107
- </ul>
108
-
109
- <p>You can look at the file <code>env.sample</code> and change the values.
110
- If you do not want to use environment variables, you can configure the values like so:</p>
111
-
112
- <p><code>ruby
113
- AzureSTT.configure do |config|
114
- config.region = 'your_region'
115
- config.subscription_key = 'your_key'
116
- end
117
- </code></p>
106
+ <p>You can look at the file <code>env.sample</code> and change the values. If you do not want to use environment variables, you can configure the values like so:</p>
107
+
108
+ <pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="AzureSTT.html" title="AzureSTT (module)">AzureSTT</a></span></span><span class='period'>.</span><span class='id identifier rubyid_configure'><span class='object_link'><a href="AzureSTT.html#configure-class_method" title="AzureSTT.configure (method)">configure</a></span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_config'>config</span><span class='op'>|</span>
109
+ <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_region'>region</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>your_region</span><span class='tstring_end'>&#39;</span></span>
110
+ <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_subscription_key'>subscription_key</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>your_key</span><span class='tstring_end'>&#39;</span></span>
111
+ <span class='kw'>end</span>
112
+ </code></pre>
118
113
 
119
114
  <p>Finally, the class <code>AzureSTT::Session</code> uses by the default the values from the configuration, but you can initialize the session with custom values:</p>
120
115
 
121
- <p><code>ruby
122
- session = AzureSTT::Session.new(region: 'your_region', subscription_key: 'your_key')
123
- </code></p>
116
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_session'>session</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="AzureSTT.html" title="AzureSTT (module)">AzureSTT</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AzureSTT/Session.html" title="AzureSTT::Session (class)">Session</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AzureSTT/Session.html#initialize-instance_method" title="AzureSTT::Session#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>region:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>your_region</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>subscription_key:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>your_key</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
117
+ </code></pre>
124
118
 
125
- <h3 id="start-a-transcription">start a transcription</h3>
119
+ <h3 id="label-Start+a+transcription">Start a transcription</h3>
126
120
 
127
- <p>```ruby
128
- require ‘azure_stt’</p>
121
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>azure_stt</span><span class='tstring_end'>&#39;</span></span>
129
122
 
130
- <p>properties = {
131
- diarizationEnabled =&gt; false,
132
- wordLevelTimestampsEnabled =&gt; false,
133
- punctuationMode =&gt; DictatedAndAutomatic”,
134
- profanityFilterMode =&gt; Masked
135
- }</p>
123
+ <span class='id identifier rubyid_properties'>properties</span> <span class='op'>=</span> <span class='lbrace'>{</span>
124
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>diarizationEnabled</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>false</span><span class='comma'>,</span>
125
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>wordLevelTimestampsEnabled</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>false</span><span class='comma'>,</span>
126
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>punctuationMode</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>DictatedAndAutomatic</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
127
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>profanityFilterMode</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Masked</span><span class='tstring_end'>&quot;</span></span>
128
+ <span class='rbrace'>}</span>
136
129
 
137
- <p>content_urls = [ https://path.com/audio.ogg’, https://path.com/audio1.ogg]</p>
130
+ <span class='id identifier rubyid_content_urls'>content_urls</span> <span class='op'>=</span> <span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://path.com/audio.ogg</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://path.com/audio1.ogg</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
138
131
 
139
- <p>session = AzureSTT::Session.new</p>
132
+ <span class='id identifier rubyid_session'>session</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="AzureSTT.html" title="AzureSTT (module)">AzureSTT</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AzureSTT/Session.html" title="AzureSTT::Session (class)">Session</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AzureSTT/Session.html#initialize-instance_method" title="AzureSTT::Session#initialize (method)">new</a></span></span>
140
133
 
141
- <p>transcription = session.create_transcription(
142
- content_urls: content_urls,
143
- properties: properties,
144
- locale: en-US’,
145
- display_name: The name of the transcription)</p>
134
+ <span class='id identifier rubyid_transcription'>transcription</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_create_transcription'>create_transcription</span><span class='lparen'>(</span>
135
+ <span class='label'>content_urls:</span> <span class='id identifier rubyid_content_urls'>content_urls</span><span class='comma'>,</span>
136
+ <span class='label'>properties:</span> <span class='id identifier rubyid_properties'>properties</span><span class='comma'>,</span>
137
+ <span class='label'>locale:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>en-US</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
138
+ <span class='label'>display_name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>The name of the transcription</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
146
139
 
147
- <h1 id="you-can-the-retrieve-the-results-of-your-transcription-with-the-id">You can the retrieve the results of your transcription with the id</h1>
148
- <p>puts transcription.id
149
- # Outputs your_transcription_id’</p>
140
+ <span class='comment'># You can the retrieve the results of your transcription with the id
141
+ </span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_transcription'>transcription</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
142
+ <span class='comment'># Outputs &#39;your_transcription_id&#39;
143
+ </span></code></pre>
150
144
 
151
- <p>```</p>
145
+ <h3 id="label-Get+a+transcription">Get a transcription</h3>
152
146
 
153
- <h3 id="get-a-transcription">Get a transcription</h3>
147
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>azure_stt</span><span class='tstring_end'>&#39;</span></span>
154
148
 
155
- <p>```ruby
156
- require ‘azure_stt’</p>
149
+ <span class='id identifier rubyid_session'>session</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="AzureSTT.html" title="AzureSTT (module)">AzureSTT</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AzureSTT/Session.html" title="AzureSTT::Session (class)">Session</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AzureSTT/Session.html#initialize-instance_method" title="AzureSTT::Session#initialize (method)">new</a></span></span>
157
150
 
158
- <p>session = AzureSTT::Session.new</p>
151
+ <span class='id identifier rubyid_transcription'>transcription</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_get_transcription'>get_transcription</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>your_transcription_id</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
159
152
 
160
- <p>transcription = session.get_transcription(‘your_transcription_id’)</p>
153
+ <span class='comment'># Returns
154
+ </span><span class='comment'># #&lt;AzureSTT::Transcription id=&quot;d35a802d-70ae-4358-a35d-b5faa0c75457&quot;
155
+ </span><span class='comment'># # model=&quot;&quot; properties={&quot;diarizationEnabled&quot;=&gt;false,
156
+ </span><span class='comment'># # &quot;wordLevelTimestampsEnabled&quot;=&gt;false, &quot;channels&quot;=&gt;[0, 1],
157
+ </span><span class='comment'># # &quot;punctuationMode&quot;=&gt;&quot;DictatedAndAutomatic&quot;, &quot;profanityFilterMode&quot;=&gt;&quot;Masked&quot;,
158
+ </span><span class='comment'># # &quot;duration&quot;=&gt;&quot;PT5M18S&quot;}
159
+ </span><span class='comment'># # links={&quot;files&quot;=&gt;&quot;https://uscentral.api.cognitive.microsoft.com/speechtotext/v3.1/transcriptions/d35a802d-70ae-4358-a35d-b5faa0c75457/files&quot;}
160
+ </span><span class='comment'># # last_action_date_time=#&lt;Date: 2020-05-31 ((2459366j,0s,0n),+0s,2299161j)&gt; created_date_time=#&lt;Date: 2020-05-31 ((2459366j,0s,0n),+0s,2299161j)&gt;
161
+ </span><span class='comment'># # status=&quot;Succeeded&quot; locale=&quot;en-US&quot; display_name=&quot;Transcription name&quot; files=[]&gt;
162
+ </span>
163
+ <span class='kw'>if</span> <span class='id identifier rubyid_transcription'>transcription</span><span class='period'>.</span><span class='id identifier rubyid_succeeded?'>succeeded?</span>
164
+ <span class='comment'># You can then access to the text, for instance :
165
+ </span> <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_transcription'>transcription</span><span class='period'>.</span><span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
166
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span>
167
+ <span class='kw'>end</span>
168
+ </code></pre>
161
169
 
162
- <h1 id="returns">Returns</h1>
163
- <p># #&lt;AzureSTT::Transcription id=”d35a802d-70ae-4358-a35d-b5faa0c75457”
164
- # # model=”” properties=# # “wordLevelTimestampsEnabled”=&gt;false, “channels”=&gt;[0, 1],
165
- # # “punctuationMode”=&gt;”DictatedAndAutomatic”, “profanityFilterMode”=&gt;”Masked”,
166
- # # “duration”=&gt;”PT5M18S”
167
- # # links=<a href="“files”=>”https://uscentral.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/d35a802d-70ae-4358-a35d-b5faa0c75457/files”" target="_parent" title="“files”=&gt;”https://uscentral.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/d35a802d-70ae-4358-a35d-b5faa0c75457/files”">“files”=>”https://uscentral.api.cognitive.microsoft.com/speechtotext/v3.0/transcriptions/d35a802d-70ae-4358-a35d-b5faa0c75457/files”</a>
168
- # # last_action_date_time=#&lt;Date: 2020-05-31 ((2459366j,0s,0n),+0s,2299161j)&gt; created_date_time=#&lt;Date: 2020-05-31 ((2459366j,0s,0n),+0s,2299161j)&gt;
169
- # # status=”Succeeded” locale=”en-US” display_name=”Transcription name” files=[]&gt;</p>
170
+ <h3 id="label-Delete+a+transcription">Delete a transcription</h3>
170
171
 
171
- <p>if transcription.succeeded?
172
- # You can then access to the text, for instance :
173
- result = transcription.results.first
174
- puts result.text
175
- end
176
- ```</p>
172
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>azure_stt</span><span class='tstring_end'>&#39;</span></span>
177
173
 
178
- <h2 id="development">Development</h2>
174
+ <span class='id identifier rubyid_session'>session</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="AzureSTT.html" title="AzureSTT (module)">AzureSTT</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AzureSTT/Session.html" title="AzureSTT::Session (class)">Session</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AzureSTT/Session.html#initialize-instance_method" title="AzureSTT::Session#initialize (method)">new</a></span></span>
179
175
 
180
- <p>After checking out the repo, run <code>bin/setup</code> to install dependencies. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p>
176
+ <span class='id identifier rubyid_transcription'>transcription</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_delete_transcription'>delete_transcription</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>your_transcription_id</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
177
+ </code></pre>
178
+
179
+ <p>The API doesn&#39;t seem to send 404 errors when the id is unknown, but always send a 204 response. So the <code>Session#delete_transcription</code> returns <code>true</code> even when the transcription didn&#39;t exist.</p>
180
+
181
+ <h3 id="label-Starting+a+transcription-2C+fetching+the+results+and+deleting+the+transcription">Starting a transcription, fetching the results and deleting the transcription</h3>
182
+
183
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>azure_stt</span><span class='tstring_end'>&#39;</span></span>
184
+
185
+ <span class='id identifier rubyid_session'>session</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="AzureSTT.html" title="AzureSTT (module)">AzureSTT</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AzureSTT/Session.html" title="AzureSTT::Session (class)">Session</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AzureSTT/Session.html#initialize-instance_method" title="AzureSTT::Session#initialize (method)">new</a></span></span>
186
+
187
+ <span class='id identifier rubyid_properties'>properties</span> <span class='op'>=</span> <span class='lbrace'>{</span>
188
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>diarizationEnabled</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>false</span><span class='comma'>,</span>
189
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>wordLevelTimestampsEnabled</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>false</span><span class='comma'>,</span>
190
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>punctuationMode</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>DictatedAndAutomatic</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
191
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>profanityFilterMode</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Masked</span><span class='tstring_end'>&quot;</span></span>
192
+ <span class='rbrace'>}</span>
181
193
 
182
- <p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and tags, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
194
+ <span class='id identifier rubyid_content_urls'>content_urls</span> <span class='op'>=</span> <span class='lbracket'>[</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://path.com/audio.ogg</span><span class='tstring_end'>&#39;</span></span> <span class='rbracket'>]</span>
195
+
196
+ <span class='id identifier rubyid_session'>session</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="AzureSTT.html" title="AzureSTT (module)">AzureSTT</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AzureSTT/Session.html" title="AzureSTT::Session (class)">Session</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AzureSTT/Session.html#initialize-instance_method" title="AzureSTT::Session#initialize (method)">new</a></span></span>
197
+
198
+ <span class='id identifier rubyid_transcription'>transcription</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_create_transcription'>create_transcription</span><span class='lparen'>(</span>
199
+ <span class='label'>content_urls:</span> <span class='id identifier rubyid_content_urls'>content_urls</span><span class='comma'>,</span>
200
+ <span class='label'>properties:</span> <span class='id identifier rubyid_properties'>properties</span><span class='comma'>,</span>
201
+ <span class='label'>locale:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>en-US</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
202
+ <span class='label'>display_name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>The name of the transcription</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
203
+
204
+ <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='id identifier rubyid_transcription'>transcription</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
205
+
206
+ <span class='kw'>while</span><span class='lparen'>(</span><span class='op'>!</span><span class='id identifier rubyid_transcription'>transcription</span><span class='period'>.</span><span class='id identifier rubyid_finished?'>finished?</span><span class='rparen'>)</span> <span class='kw'>do</span>
207
+ <span class='id identifier rubyid_sleep'>sleep</span><span class='lparen'>(</span><span class='int'>30</span><span class='rparen'>)</span>
208
+ <span class='id identifier rubyid_transcription'>transcription</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</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>
209
+ <span class='kw'>end</span>
210
+
211
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_transcription'>transcription</span><span class='period'>.</span><span class='id identifier rubyid_succeeded?'>succeeded?</span><span class='rparen'>)</span>
212
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_transcription'>transcription</span><span class='period'>.</span><span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span>
213
+ <span class='kw'>end</span>
214
+
215
+ <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_delete_transcription'>delete_transcription</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
216
+ </code></pre>
217
+
218
+ <h2 id="label-Development">Development</h2>
219
+
220
+ <p>After checking out the repo, run <code>bin/setup</code> to install dependencies. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p>
183
221
 
184
- <h2 id="contributing">Contributing</h2>
222
+ <h2 id="label-Contributing">Contributing</h2>
185
223
 
186
- <p>Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/azure_stt. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="http://contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
224
+ <p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/PerfectMemory/azure_stt">github.com/PerfectMemory/azure_stt</a>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="http://contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
187
225
 
188
- <h2 id="code-of-conduct">Code of Conduct</h2>
226
+ <h2 id="label-Code+of+Conduct">Code of Conduct</h2>
189
227
 
190
- <p>Everyone interacting in the AzureStt project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the <a href="https://github.com/[USERNAME]/azure_stt/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
228
+ <p>Everyone interacting in the AzureStt project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the <a href="https://github.com/PerfectMemory/azure_stt/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
191
229
  </div></div>
192
230
 
193
231
  <div id="footer">
194
- Generated on Thu Jun 24 14:16:27 2021 by
195
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
196
- 0.9.26 (ruby-2.6.6).
232
+ Generated on Wed May 10 12:30:20 2023 by
233
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
234
+ 0.9.34 (ruby-2.7.7).
197
235
  </div>
198
236
 
199
237
  </div>