tencentcloud-sdk-asr 3.0.1179 → 3.0.1192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/VERSION +1 -1
  3. data/lib/v20190614/models.rb +47 -5
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 081a75541335e0863d2746f45309878db8e89298
4
- data.tar.gz: 37076a6da3dc5dc65e39b5e251cf5d7b02471251
3
+ metadata.gz: 03375c81825b28125d30c48da4d062dfbade93b1
4
+ data.tar.gz: 0f4e074d1912e036ac9315932f72281db60fb6a3
5
5
  SHA512:
6
- metadata.gz: 2cf4c3f853458d52a95ce7c53c60d1f1b5747d57535add6f198eee10abdb110497d3a6cb50e15e8c289fcb54e07f0116f7f3225a5240d2b64e8797ee2a8fb03f
7
- data.tar.gz: 91719b55a4e8e074239f556c115eacba1d001aa9c16634854db0533a0b0c9c6adfcfb58238b2c15d1eecc2a1472cc986bb691a671df0318d2296cdc0cf6d6cef
6
+ metadata.gz: 51f6f0c4dd0f16ded462b618eb6d692fa496780f2462d6f11f689ea2d0e8ca6b0043590f1dd5f8aeab4ec548b84dcd4f4ad02d11d850bbc0ea82eeed648f109c
7
+ data.tar.gz: 54ee41a1e97868c9cd0fccb4d64768225dfd54989a984c0b89143b394bc498793b2a20f12dae876428d541a7441658aae3785fa8bf18fe7c01ffb2f1e06c0e98
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1179
1
+ 3.0.1192
@@ -433,6 +433,7 @@ module TencentCloud
433
433
  # @param SpeakerDiarization: 是否开启说话人分离
434
434
  # 0:不开启;
435
435
  # 1:开启(仅支持以下引擎:8k_zh/8k_zh_large/16k_zh/16k_ms/16k_en/16k_id/16k_zh_large/16k_zh_dialect/16k_zh_en,且ChannelNum=1时可用);
436
+ # 3: 开启角色分离,需配合SpeakerRoles参数使用(增值服务,仅支持16k_zh_en引擎,可支持传入声纹对录音文件内的说话人进行角色认证)
436
437
  # 默认值为 0
437
438
 
438
439
  # 注意:
@@ -537,13 +538,21 @@ module TencentCloud
537
538
  # 注意:
538
539
  # 1. 本功能配置完成后,预计在10分钟后生效
539
540
  # @type ReplaceTextId: String
540
-
541
- attr_accessor :EngineModelType, :ChannelNum, :ResTextFormat, :SourceType, :Data, :DataLen, :Url, :CallbackUrl, :SpeakerDiarization, :SpeakerNumber, :HotwordId, :ReinforceHotword, :CustomizationId, :EmotionRecognition, :EmotionalEnergy, :ConvertNumMode, :FilterDirty, :FilterPunc, :FilterModal, :SentenceMaxLength, :Extra, :HotwordList, :KeyWordLibIdList, :ReplaceTextId
541
+ # @param SpeakerRoles: 开启角色分离能力
542
+ # 配合SpeakerDiarization: 3 使用,ASR增值服务,可传入一组声纹信息进行角色认证,仅支持16k_zh_en引擎。
543
+ # 需传入SpeakerRoleInfo数据组,确定说话人的角色信息,涉及RoleAudioUrl和RoleName两个参数。
544
+ # RoleAudioUrl:需要认证角色的声纹音频地址,建议30s内的纯净人声,最长不能超过45s。
545
+ # RoleName:需要认证角色的名称,若匹配成功,会替换话者分离中的SpeakerID。
546
+ # 示例:
547
+ # "{\"EngineModelType\":\"16k_zh_en\",\"ChannelNum\":1,\"ResTextFormat\":1,\"SourceType\":0,\"Url\":\"需要进行ASR识别的音频链接\",\"SpeakerDiarization\":3,\"SpeakerRoles\":[{\"RoleAudioUrl\":\"需要认证角色的声纹音频地址\",\"RoleName\":\"需要认证角色的名称\"}]}"
548
+ # @type SpeakerRoles: Array
549
+
550
+ attr_accessor :EngineModelType, :ChannelNum, :ResTextFormat, :SourceType, :Data, :DataLen, :Url, :CallbackUrl, :SpeakerDiarization, :SpeakerNumber, :HotwordId, :ReinforceHotword, :CustomizationId, :EmotionRecognition, :EmotionalEnergy, :ConvertNumMode, :FilterDirty, :FilterPunc, :FilterModal, :SentenceMaxLength, :Extra, :HotwordList, :KeyWordLibIdList, :ReplaceTextId, :SpeakerRoles
542
551
  extend Gem::Deprecate
543
552
  deprecate :ReinforceHotword, :none, 2025, 12
544
553
  deprecate :ReinforceHotword=, :none, 2025, 12
545
554
 
546
- def initialize(enginemodeltype=nil, channelnum=nil, restextformat=nil, sourcetype=nil, data=nil, datalen=nil, url=nil, callbackurl=nil, speakerdiarization=nil, speakernumber=nil, hotwordid=nil, reinforcehotword=nil, customizationid=nil, emotionrecognition=nil, emotionalenergy=nil, convertnummode=nil, filterdirty=nil, filterpunc=nil, filtermodal=nil, sentencemaxlength=nil, extra=nil, hotwordlist=nil, keywordlibidlist=nil, replacetextid=nil)
555
+ def initialize(enginemodeltype=nil, channelnum=nil, restextformat=nil, sourcetype=nil, data=nil, datalen=nil, url=nil, callbackurl=nil, speakerdiarization=nil, speakernumber=nil, hotwordid=nil, reinforcehotword=nil, customizationid=nil, emotionrecognition=nil, emotionalenergy=nil, convertnummode=nil, filterdirty=nil, filterpunc=nil, filtermodal=nil, sentencemaxlength=nil, extra=nil, hotwordlist=nil, keywordlibidlist=nil, replacetextid=nil, speakerroles=nil)
547
556
  @EngineModelType = enginemodeltype
548
557
  @ChannelNum = channelnum
549
558
  @ResTextFormat = restextformat
@@ -568,6 +577,7 @@ module TencentCloud
568
577
  @HotwordList = hotwordlist
569
578
  @KeyWordLibIdList = keywordlibidlist
570
579
  @ReplaceTextId = replacetextid
580
+ @SpeakerRoles = speakerroles
571
581
  end
572
582
 
573
583
  def deserialize(params)
@@ -595,6 +605,14 @@ module TencentCloud
595
605
  @HotwordList = params['HotwordList']
596
606
  @KeyWordLibIdList = params['KeyWordLibIdList']
597
607
  @ReplaceTextId = params['ReplaceTextId']
608
+ unless params['SpeakerRoles'].nil?
609
+ @SpeakerRoles = []
610
+ params['SpeakerRoles'].each do |i|
611
+ speakerroleinfo_tmp = SpeakerRoleInfo.new
612
+ speakerroleinfo_tmp.deserialize(i)
613
+ @SpeakerRoles << speakerroleinfo_tmp
614
+ end
615
+ end
598
616
  end
599
617
  end
600
618
 
@@ -1635,8 +1653,10 @@ module TencentCloud
1635
1653
  # @type HotwordList: String
1636
1654
  # @param InputSampleRate: 支持pcm格式的8k音频在与引擎采样率不匹配的情况下升采样到16k后识别,能有效提升识别准确率。仅支持:8000。如:传入 8000 ,则pcm音频采样率为8k,当引擎选用16k_zh, 那么该8k采样率的pcm音频可以在16k_zh引擎下正常识别。 注:此参数仅适用于pcm格式音频,不传入值将维持默认状态,即默认调用的引擎采样率等于pcm音频采样率。
1637
1655
  # @type InputSampleRate: Integer
1656
+ # @param ReplaceTextId: 替换词id。用于调用对应的替换词表。
1657
+ # @type ReplaceTextId: String
1638
1658
 
1639
- attr_accessor :EngSerViceType, :SourceType, :VoiceFormat, :ProjectId, :SubServiceType, :Url, :UsrAudioKey, :Data, :DataLen, :WordInfo, :FilterDirty, :FilterModal, :FilterPunc, :ConvertNumMode, :HotwordId, :CustomizationId, :ReinforceHotword, :HotwordList, :InputSampleRate
1659
+ attr_accessor :EngSerViceType, :SourceType, :VoiceFormat, :ProjectId, :SubServiceType, :Url, :UsrAudioKey, :Data, :DataLen, :WordInfo, :FilterDirty, :FilterModal, :FilterPunc, :ConvertNumMode, :HotwordId, :CustomizationId, :ReinforceHotword, :HotwordList, :InputSampleRate, :ReplaceTextId
1640
1660
  extend Gem::Deprecate
1641
1661
  deprecate :ProjectId, :none, 2025, 12
1642
1662
  deprecate :ProjectId=, :none, 2025, 12
@@ -1647,7 +1667,7 @@ module TencentCloud
1647
1667
  deprecate :ReinforceHotword, :none, 2025, 12
1648
1668
  deprecate :ReinforceHotword=, :none, 2025, 12
1649
1669
 
1650
- def initialize(engservicetype=nil, sourcetype=nil, voiceformat=nil, projectid=nil, subservicetype=nil, url=nil, usraudiokey=nil, data=nil, datalen=nil, wordinfo=nil, filterdirty=nil, filtermodal=nil, filterpunc=nil, convertnummode=nil, hotwordid=nil, customizationid=nil, reinforcehotword=nil, hotwordlist=nil, inputsamplerate=nil)
1670
+ def initialize(engservicetype=nil, sourcetype=nil, voiceformat=nil, projectid=nil, subservicetype=nil, url=nil, usraudiokey=nil, data=nil, datalen=nil, wordinfo=nil, filterdirty=nil, filtermodal=nil, filterpunc=nil, convertnummode=nil, hotwordid=nil, customizationid=nil, reinforcehotword=nil, hotwordlist=nil, inputsamplerate=nil, replacetextid=nil)
1651
1671
  @EngSerViceType = engservicetype
1652
1672
  @SourceType = sourcetype
1653
1673
  @VoiceFormat = voiceformat
@@ -1667,6 +1687,7 @@ module TencentCloud
1667
1687
  @ReinforceHotword = reinforcehotword
1668
1688
  @HotwordList = hotwordlist
1669
1689
  @InputSampleRate = inputsamplerate
1690
+ @ReplaceTextId = replacetextid
1670
1691
  end
1671
1692
 
1672
1693
  def deserialize(params)
@@ -1689,6 +1710,7 @@ module TencentCloud
1689
1710
  @ReinforceHotword = params['ReinforceHotword']
1690
1711
  @HotwordList = params['HotwordList']
1691
1712
  @InputSampleRate = params['InputSampleRate']
1713
+ @ReplaceTextId = params['ReplaceTextId']
1692
1714
  end
1693
1715
  end
1694
1716
 
@@ -1824,6 +1846,26 @@ module TencentCloud
1824
1846
  end
1825
1847
  end
1826
1848
 
1849
+ # 说话人注册角色声纹信息
1850
+ class SpeakerRoleInfo < TencentCloud::Common::AbstractModel
1851
+ # @param RoleAudioUrl: 音频url地址,建议不超过30秒,最大45秒
1852
+ # @type RoleAudioUrl: String
1853
+ # @param RoleName: 不超过30字节
1854
+ # @type RoleName: String
1855
+
1856
+ attr_accessor :RoleAudioUrl, :RoleName
1857
+
1858
+ def initialize(roleaudiourl=nil, rolename=nil)
1859
+ @RoleAudioUrl = roleaudiourl
1860
+ @RoleName = rolename
1861
+ end
1862
+
1863
+ def deserialize(params)
1864
+ @RoleAudioUrl = params['RoleAudioUrl']
1865
+ @RoleName = params['RoleName']
1866
+ end
1867
+ end
1868
+
1827
1869
  # [录音文件识别](https://cloud.tencent.com/document/product/1093/37823#3.-.E8.BE.93.E5.87.BA.E5.8F.82.E6.95.B0)、[实时语音异步识别](https://cloud.tencent.com/document/product/1093/52061#3.-.E8.BE.93.E5.87.BA.E5.8F.82.E6.95.B0)请求的返回数据
1828
1870
  class Task < TencentCloud::Common::AbstractModel
1829
1871
  # @param TaskId: 任务ID,可通过此ID在轮询接口获取识别状态与结果。TaskId数据类型为**uint64**。
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-asr
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1179
4
+ version: 3.0.1192
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-09 00:00:00.000000000 Z
11
+ date: 2025-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common
@@ -33,9 +33,9 @@ executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
- - lib/tencentcloud-sdk-asr.rb
37
- - lib/v20190614/models.rb
38
36
  - lib/v20190614/client.rb
37
+ - lib/v20190614/models.rb
38
+ - lib/tencentcloud-sdk-asr.rb
39
39
  - lib/VERSION
40
40
  homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
41
  licenses: