Class: TencentCloud::Mps::V20190612::RecognizeAudioSentence

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20190612/models.rb

Overview

识别音频单句结果

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(start = nil, _end = nil, text = nil, wordsinfo = nil) ⇒ RecognizeAudioSentence

Returns a new instance of RecognizeAudioSentence.



26215
26216
26217
26218
26219
26220
# File 'lib/v20190612/models.rb', line 26215

def initialize(start=nil, _end=nil, text=nil, wordsinfo=nil)
  @Start = start
  @End = _end
  @Text = text
  @WordsInfo = wordsinfo
end

Instance Attribute Details

#EndObject

Parameters:

  • Start:

    在音频中的起始时间,单位秒

  • End:

    在音频中的截止时间,单位秒

  • Text:

    音频识别结果

  • WordsInfo:

    字词时间戳结果



26213
26214
26215
# File 'lib/v20190612/models.rb', line 26213

def End
  @End
end

#StartObject

Parameters:

  • Start:

    在音频中的起始时间,单位秒

  • End:

    在音频中的截止时间,单位秒

  • Text:

    音频识别结果

  • WordsInfo:

    字词时间戳结果



26213
26214
26215
# File 'lib/v20190612/models.rb', line 26213

def Start
  @Start
end

#TextObject

Parameters:

  • Start:

    在音频中的起始时间,单位秒

  • End:

    在音频中的截止时间,单位秒

  • Text:

    音频识别结果

  • WordsInfo:

    字词时间戳结果



26213
26214
26215
# File 'lib/v20190612/models.rb', line 26213

def Text
  @Text
end

#WordsInfoObject

Parameters:

  • Start:

    在音频中的起始时间,单位秒

  • End:

    在音频中的截止时间,单位秒

  • Text:

    音频识别结果

  • WordsInfo:

    字词时间戳结果



26213
26214
26215
# File 'lib/v20190612/models.rb', line 26213

def WordsInfo
  @WordsInfo
end

Instance Method Details

#deserialize(params) ⇒ Object



26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
# File 'lib/v20190612/models.rb', line 26222

def deserialize(params)
  @Start = params['Start']
  @End = params['End']
  @Text = params['Text']
  unless params['WordsInfo'].nil?
    @WordsInfo = []
    params['WordsInfo'].each do |i|
      wordresult_tmp = WordResult.new
      wordresult_tmp.deserialize(i)
      @WordsInfo << wordresult_tmp
    end
  end
end