Class: AzureSTT::Models::Transcription
- Defined in:
- lib/azure_stt/models/transcription.rb
Overview
Model for a transcription. Contains the results and static methods to create and retrieve the transcriptions.
Instance Attribute Summary collapse
- #client ⇒ AzureSTT::Client readonly
- #created_date_time ⇒ Types::Date readonly
- #display_name ⇒ Types::Coercible::String readonly
- #id ⇒ Types::Coercible::String readonly
- #last_action_date_time ⇒ Types::Date readonly
- #links ⇒ Types::Hash readonly
- #locale ⇒ Types::Coercible::String readonly
- #model ⇒ Types::Coercible::String readonly
- #properties ⇒ Types::Hash readonly
- #status ⇒ Types::Coercible::String readonly
Instance Method Summary collapse
-
#failed? ⇒ Boolean
Is the status is failed ?.
-
#finished? ⇒ Boolean
Is the process finished ? (Succeeded or failed).
-
#report ⇒ Models::Report
Get the report of a transcription from transcriptions/id/files route.
-
#results ⇒ Array[Models::Result]
Get the results of a transcription.
-
#running? ⇒ Boolean
Is the process still running ?.
-
#succeeded? ⇒ Boolean
Has the process succeeded ?.
Instance Attribute Details
#client ⇒ AzureSTT::Client (readonly)
85 |
# File 'lib/azure_stt/models/transcription.rb', line 85 attribute :client, Types.Instance(AzureSTT::Client) |
#created_date_time ⇒ Types::Date (readonly)
50 |
# File 'lib/azure_stt/models/transcription.rb', line 50 attribute :created_date_time, Types::Date |
#display_name ⇒ Types::Coercible::String (readonly)
71 |
# File 'lib/azure_stt/models/transcription.rb', line 71 attribute :display_name, Types::Coercible::String |
#id ⇒ Types::Coercible::String (readonly)
15 |
# File 'lib/azure_stt/models/transcription.rb', line 15 attribute :id, Types::Coercible::String |
#last_action_date_time ⇒ Types::Date (readonly)
43 |
# File 'lib/azure_stt/models/transcription.rb', line 43 attribute :last_action_date_time, Types::Date |
#links ⇒ Types::Hash (readonly)
36 |
# File 'lib/azure_stt/models/transcription.rb', line 36 attribute :links, Types::Hash |
#locale ⇒ Types::Coercible::String (readonly)
64 |
# File 'lib/azure_stt/models/transcription.rb', line 64 attribute :locale, Types::Coercible::String |
#model ⇒ Types::Coercible::String (readonly)
22 |
# File 'lib/azure_stt/models/transcription.rb', line 22 attribute :model, Types::Coercible::String |
#properties ⇒ Types::Hash (readonly)
29 |
# File 'lib/azure_stt/models/transcription.rb', line 29 attribute :properties, Types::Hash |
#status ⇒ Types::Coercible::String (readonly)
57 |
# File 'lib/azure_stt/models/transcription.rb', line 57 attribute :status, Types::Coercible::String |
Instance Method Details
#failed? ⇒ Boolean
Is the status is failed ?
101 102 103 |
# File 'lib/azure_stt/models/transcription.rb', line 101 def failed? status == 'Failed' end |
#finished? ⇒ Boolean
Is the process finished ? (Succeeded or failed)
119 120 121 |
# File 'lib/azure_stt/models/transcription.rb', line 119 def finished? succeeded? || failed? end |
#report ⇒ Models::Report
Get the report of a transcription from transcriptions/id/files route
130 131 132 |
# File 'lib/azure_stt/models/transcription.rb', line 130 def report @report ||= retrieve_report end |
#results ⇒ Array[Models::Result]
Get the results of a transcription. The results are the files containing the speech-to-text. As a transcription process can have multiple files, the results are in an Array.
141 142 143 |
# File 'lib/azure_stt/models/transcription.rb', line 141 def results @results ||= retrieve_results end |
#running? ⇒ Boolean
Is the process still running ?
92 93 94 |
# File 'lib/azure_stt/models/transcription.rb', line 92 def running? status == 'Running' end |
#succeeded? ⇒ Boolean
Has the process succeeded ?
110 111 112 |
# File 'lib/azure_stt/models/transcription.rb', line 110 def succeeded? status == 'Succeeded' end |