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.



26553
26554
26555
26556
26557
26558
# File 'lib/v20190612/models.rb', line 26553

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:

    字词时间戳结果



26551
26552
26553
# File 'lib/v20190612/models.rb', line 26551

def End
  @End
end

#StartObject

Parameters:

  • Start:

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

  • End:

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

  • Text:

    音频识别结果

  • WordsInfo:

    字词时间戳结果



26551
26552
26553
# File 'lib/v20190612/models.rb', line 26551

def Start
  @Start
end

#TextObject

Parameters:

  • Start:

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

  • End:

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

  • Text:

    音频识别结果

  • WordsInfo:

    字词时间戳结果



26551
26552
26553
# File 'lib/v20190612/models.rb', line 26551

def Text
  @Text
end

#WordsInfoObject

Parameters:

  • Start:

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

  • End:

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

  • Text:

    音频识别结果

  • WordsInfo:

    字词时间戳结果



26551
26552
26553
# File 'lib/v20190612/models.rb', line 26551

def WordsInfo
  @WordsInfo
end

Instance Method Details

#deserialize(params) ⇒ Object



26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
# File 'lib/v20190612/models.rb', line 26560

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