Class: AzureSTT::Models::Transcription

Inherits:
Base
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#clientAzureSTT::Client (readonly)

Returns:



85
# File 'lib/azure_stt/models/transcription.rb', line 85

attribute :client, Types.Instance(AzureSTT::Client)

#created_date_timeTypes::Date (readonly)

Returns:

  • (Types::Date)


50
# File 'lib/azure_stt/models/transcription.rb', line 50

attribute :created_date_time, Types::Date

#display_nameTypes::Coercible::String (readonly)

Returns:

  • (Types::Coercible::String)


71
# File 'lib/azure_stt/models/transcription.rb', line 71

attribute :display_name, Types::Coercible::String

#idTypes::Coercible::String (readonly)

Returns:

  • (Types::Coercible::String)


15
# File 'lib/azure_stt/models/transcription.rb', line 15

attribute :id, Types::Coercible::String

#last_action_date_timeTypes::Date (readonly)

Returns:

  • (Types::Date)


43
# File 'lib/azure_stt/models/transcription.rb', line 43

attribute :last_action_date_time, Types::Date

Returns:

  • (Types::Hash)


36
# File 'lib/azure_stt/models/transcription.rb', line 36

attribute :links, Types::Hash

#localeTypes::Coercible::String (readonly)

Returns:

  • (Types::Coercible::String)


64
# File 'lib/azure_stt/models/transcription.rb', line 64

attribute :locale, Types::Coercible::String

#modelTypes::Coercible::String (readonly)

Returns:

  • (Types::Coercible::String)


22
# File 'lib/azure_stt/models/transcription.rb', line 22

attribute :model, Types::Coercible::String

#propertiesTypes::Hash (readonly)

Returns:

  • (Types::Hash)


29
# File 'lib/azure_stt/models/transcription.rb', line 29

attribute :properties, Types::Hash

#statusTypes::Coercible::String (readonly)

Returns:

  • (Types::Coercible::String)


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 ?

Returns:

  • (Boolean)


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)

Returns:

  • (Boolean)


119
120
121
# File 'lib/azure_stt/models/transcription.rb', line 119

def finished?
  succeeded? || failed?
end

#reportModels::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

#resultsArray[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.

Returns:



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 ?

Returns:

  • (Boolean)


92
93
94
# File 'lib/azure_stt/models/transcription.rb', line 92

def running?
  status == 'Running'
end

#succeeded?Boolean

Has the process succeeded ?

Returns:

  • (Boolean)


110
111
112
# File 'lib/azure_stt/models/transcription.rb', line 110

def succeeded?
  status == 'Succeeded'
end