tencentcloud-sdk-asr 3.0.848 → 3.0.850
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20190614/client.rb +24 -0
- data/lib/v20190614/models.rb +151 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4c7ed2b8c62c0b9f6866cfcbd41f948fce33d6a
|
4
|
+
data.tar.gz: 414eb350f45eedec0741135abd97d1b7cfef681c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fad2597ef50285a06d83789c78199b45869f82db146ee2cbc8a174519ce04023665237dc86917e5903d43f6a5a7d4f340535f8623fe60b0709fe33af38ec6f89
|
7
|
+
data.tar.gz: 824470bd842a1bcc37e1b6effb4db50723ba48f14a52824e6526b8926f02990e205e6fa21c4d83f6380e127e79da76b445462f65d9ccf8f22c6b140d77b81691
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.850
|
data/lib/v20190614/client.rb
CHANGED
@@ -640,6 +640,30 @@ module TencentCloud
|
|
640
640
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
641
641
|
end
|
642
642
|
|
643
|
+
# 说话人验证1:N接口,可以通过传入一段说话人音频,并且指定已存在的groupId, 和返回topN, 接口返回groupId内所有声纹和传入音频声纹比对打分TopN的结果。
|
644
|
+
|
645
|
+
# @param request: Request instance for VoicePrintGroupVerify.
|
646
|
+
# @type request: :class:`Tencentcloud::asr::V20190614::VoicePrintGroupVerifyRequest`
|
647
|
+
# @rtype: :class:`Tencentcloud::asr::V20190614::VoicePrintGroupVerifyResponse`
|
648
|
+
def VoicePrintGroupVerify(request)
|
649
|
+
body = send_request('VoicePrintGroupVerify', request.serialize)
|
650
|
+
response = JSON.parse(body)
|
651
|
+
if response['Response'].key?('Error') == false
|
652
|
+
model = VoicePrintGroupVerifyResponse.new
|
653
|
+
model.deserialize(response['Response'])
|
654
|
+
model
|
655
|
+
else
|
656
|
+
code = response['Response']['Error']['Code']
|
657
|
+
message = response['Response']['Error']['Message']
|
658
|
+
reqid = response['Response']['RequestId']
|
659
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
660
|
+
end
|
661
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
662
|
+
raise e
|
663
|
+
rescue StandardError => e
|
664
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
665
|
+
end
|
666
|
+
|
643
667
|
# 本接口用于更新和覆盖已注册的音频数据和说话人昵称,更新后原有的音频数据将失效。
|
644
668
|
|
645
669
|
# @param request: Request instance for VoicePrintUpdate.
|
data/lib/v20190614/models.rb
CHANGED
@@ -1598,6 +1598,57 @@ module TencentCloud
|
|
1598
1598
|
end
|
1599
1599
|
end
|
1600
1600
|
|
1601
|
+
# 声纹组对比结果top数据
|
1602
|
+
class VerifyTop < TencentCloud::Common::AbstractModel
|
1603
|
+
# @param Score: 相似度打分
|
1604
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1605
|
+
# @type Score: String
|
1606
|
+
# @param VoicePrintId: 说话人id
|
1607
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1608
|
+
# @type VoicePrintId: String
|
1609
|
+
# @param SpeakerId: 说话人昵称
|
1610
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1611
|
+
# @type SpeakerId: String
|
1612
|
+
|
1613
|
+
attr_accessor :Score, :VoicePrintId, :SpeakerId
|
1614
|
+
|
1615
|
+
def initialize(score=nil, voiceprintid=nil, speakerid=nil)
|
1616
|
+
@Score = score
|
1617
|
+
@VoicePrintId = voiceprintid
|
1618
|
+
@SpeakerId = speakerid
|
1619
|
+
end
|
1620
|
+
|
1621
|
+
def deserialize(params)
|
1622
|
+
@Score = params['Score']
|
1623
|
+
@VoicePrintId = params['VoicePrintId']
|
1624
|
+
@SpeakerId = params['SpeakerId']
|
1625
|
+
end
|
1626
|
+
end
|
1627
|
+
|
1628
|
+
# 说话人验证1:N返回结果
|
1629
|
+
class VerifyTopResult < TencentCloud::Common::AbstractModel
|
1630
|
+
# @param VerifyTops: 对比打分结果,按照打分降序排列返回
|
1631
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1632
|
+
# @type VerifyTops: Array
|
1633
|
+
|
1634
|
+
attr_accessor :VerifyTops
|
1635
|
+
|
1636
|
+
def initialize(verifytops=nil)
|
1637
|
+
@VerifyTops = verifytops
|
1638
|
+
end
|
1639
|
+
|
1640
|
+
def deserialize(params)
|
1641
|
+
unless params['VerifyTops'].nil?
|
1642
|
+
@VerifyTops = []
|
1643
|
+
params['VerifyTops'].each do |i|
|
1644
|
+
verifytop_tmp = VerifyTop.new
|
1645
|
+
verifytop_tmp.deserialize(i)
|
1646
|
+
@VerifyTops << verifytop_tmp
|
1647
|
+
end
|
1648
|
+
end
|
1649
|
+
end
|
1650
|
+
end
|
1651
|
+
|
1601
1652
|
# [词表内容](https://cloud.tencent.com/document/product/1093/41484#3.-.E8.BE.93.E5.87.BA.E5.8F.82.E6.95.B0)
|
1602
1653
|
class Vocab < TencentCloud::Common::AbstractModel
|
1603
1654
|
# @param Name: 热词表名称
|
@@ -1750,26 +1801,49 @@ module TencentCloud
|
|
1750
1801
|
# @param Total: 总数
|
1751
1802
|
# 注意:此字段可能返回 null,表示取不到有效值。
|
1752
1803
|
# @type Total: Integer
|
1804
|
+
# @param VoicePrintList: 说话人id列表
|
1805
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1806
|
+
# @type VoicePrintList: Array
|
1753
1807
|
|
1754
|
-
attr_accessor :Total
|
1808
|
+
attr_accessor :Total, :VoicePrintList
|
1755
1809
|
|
1756
|
-
def initialize(total=nil)
|
1810
|
+
def initialize(total=nil, voiceprintlist=nil)
|
1757
1811
|
@Total = total
|
1812
|
+
@VoicePrintList = voiceprintlist
|
1758
1813
|
end
|
1759
1814
|
|
1760
1815
|
def deserialize(params)
|
1761
1816
|
@Total = params['Total']
|
1817
|
+
unless params['VoicePrintList'].nil?
|
1818
|
+
@VoicePrintList = []
|
1819
|
+
params['VoicePrintList'].each do |i|
|
1820
|
+
voiceprintbasedata_tmp = VoicePrintBaseData.new
|
1821
|
+
voiceprintbasedata_tmp.deserialize(i)
|
1822
|
+
@VoicePrintList << voiceprintbasedata_tmp
|
1823
|
+
end
|
1824
|
+
end
|
1762
1825
|
end
|
1763
1826
|
end
|
1764
1827
|
|
1765
1828
|
# VoicePrintCount请求参数结构体
|
1766
1829
|
class VoicePrintCountRequest < TencentCloud::Common::AbstractModel
|
1830
|
+
# @param GroupId: 分组ID,仅支持大小写字母和下划线的组合,不超过128个字符
|
1831
|
+
# @type GroupId: String
|
1832
|
+
# @param CountMod: 统计模式
|
1833
|
+
# 0: 统计所有声纹数量
|
1834
|
+
# 1: 统计指定分组下的声纹数量
|
1835
|
+
# @type CountMod: Integer
|
1767
1836
|
|
1837
|
+
attr_accessor :GroupId, :CountMod
|
1768
1838
|
|
1769
|
-
def initialize()
|
1839
|
+
def initialize(groupid=nil, countmod=nil)
|
1840
|
+
@GroupId = groupid
|
1841
|
+
@CountMod = countmod
|
1770
1842
|
end
|
1771
1843
|
|
1772
1844
|
def deserialize(params)
|
1845
|
+
@GroupId = params['GroupId']
|
1846
|
+
@CountMod = params['CountMod']
|
1773
1847
|
end
|
1774
1848
|
end
|
1775
1849
|
|
@@ -1800,15 +1874,26 @@ module TencentCloud
|
|
1800
1874
|
class VoicePrintDeleteRequest < TencentCloud::Common::AbstractModel
|
1801
1875
|
# @param VoicePrintId: 说话人id,说话人唯一标识
|
1802
1876
|
# @type VoicePrintId: String
|
1877
|
+
# @param GroupId: 说话人分组ID,仅支持大小写字母和下划线的组合,不超过128个字符
|
1878
|
+
# @type GroupId: String
|
1879
|
+
# @param DelMod: 删除模式:
|
1880
|
+
# 0.默认值,删除该条声纹
|
1881
|
+
# 1.从分组中删除该条声纹,声纹本身不删除
|
1882
|
+
# 2.从声纹库中删除分组,仅删除分组信息,不会真正删除分组中的声纹
|
1883
|
+
# @type DelMod: Integer
|
1803
1884
|
|
1804
|
-
attr_accessor :VoicePrintId
|
1885
|
+
attr_accessor :VoicePrintId, :GroupId, :DelMod
|
1805
1886
|
|
1806
|
-
def initialize(voiceprintid=nil)
|
1887
|
+
def initialize(voiceprintid=nil, groupid=nil, delmod=nil)
|
1807
1888
|
@VoicePrintId = voiceprintid
|
1889
|
+
@GroupId = groupid
|
1890
|
+
@DelMod = delmod
|
1808
1891
|
end
|
1809
1892
|
|
1810
1893
|
def deserialize(params)
|
1811
1894
|
@VoicePrintId = params['VoicePrintId']
|
1895
|
+
@GroupId = params['GroupId']
|
1896
|
+
@DelMod = params['DelMod']
|
1812
1897
|
end
|
1813
1898
|
end
|
1814
1899
|
|
@@ -1845,14 +1930,17 @@ module TencentCloud
|
|
1845
1930
|
# @type Data: String
|
1846
1931
|
# @param SpeakerNick: 说话人昵称 不超过32字节
|
1847
1932
|
# @type SpeakerNick: String
|
1933
|
+
# @param GroupId: 分组id, 仅支持大小写字母和下划线的组合,不超过128个字符
|
1934
|
+
# @type GroupId: String
|
1848
1935
|
|
1849
|
-
attr_accessor :VoiceFormat, :SampleRate, :Data, :SpeakerNick
|
1936
|
+
attr_accessor :VoiceFormat, :SampleRate, :Data, :SpeakerNick, :GroupId
|
1850
1937
|
|
1851
|
-
def initialize(voiceformat=nil, samplerate=nil, data=nil, speakernick=nil)
|
1938
|
+
def initialize(voiceformat=nil, samplerate=nil, data=nil, speakernick=nil, groupid=nil)
|
1852
1939
|
@VoiceFormat = voiceformat
|
1853
1940
|
@SampleRate = samplerate
|
1854
1941
|
@Data = data
|
1855
1942
|
@SpeakerNick = speakernick
|
1943
|
+
@GroupId = groupid
|
1856
1944
|
end
|
1857
1945
|
|
1858
1946
|
def deserialize(params)
|
@@ -1860,6 +1948,7 @@ module TencentCloud
|
|
1860
1948
|
@SampleRate = params['SampleRate']
|
1861
1949
|
@Data = params['Data']
|
1862
1950
|
@SpeakerNick = params['SpeakerNick']
|
1951
|
+
@GroupId = params['GroupId']
|
1863
1952
|
end
|
1864
1953
|
end
|
1865
1954
|
|
@@ -1886,6 +1975,61 @@ module TencentCloud
|
|
1886
1975
|
end
|
1887
1976
|
end
|
1888
1977
|
|
1978
|
+
# VoicePrintGroupVerify请求参数结构体
|
1979
|
+
class VoicePrintGroupVerifyRequest < TencentCloud::Common::AbstractModel
|
1980
|
+
# @param VoiceFormat: 音频格式 0: pcm, 1: wav
|
1981
|
+
# @type VoiceFormat: Integer
|
1982
|
+
# @param SampleRate: 音频采样率,目前支持16000,单位:Hz,必填
|
1983
|
+
# @type SampleRate: Integer
|
1984
|
+
# @param Data: 音频数据, base64 编码, 音频时长不能超过30s,数据大小不超过2M
|
1985
|
+
# @type Data: String
|
1986
|
+
# @param GroupId: 分组id, 支持数字,字母,下划线,长度不超过128
|
1987
|
+
# @type GroupId: String
|
1988
|
+
# @param TopN: 返回打分结果降序排列topN, TopN大于0, 小于可创建声纹最大数量
|
1989
|
+
# @type TopN: Integer
|
1990
|
+
|
1991
|
+
attr_accessor :VoiceFormat, :SampleRate, :Data, :GroupId, :TopN
|
1992
|
+
|
1993
|
+
def initialize(voiceformat=nil, samplerate=nil, data=nil, groupid=nil, topn=nil)
|
1994
|
+
@VoiceFormat = voiceformat
|
1995
|
+
@SampleRate = samplerate
|
1996
|
+
@Data = data
|
1997
|
+
@GroupId = groupid
|
1998
|
+
@TopN = topn
|
1999
|
+
end
|
2000
|
+
|
2001
|
+
def deserialize(params)
|
2002
|
+
@VoiceFormat = params['VoiceFormat']
|
2003
|
+
@SampleRate = params['SampleRate']
|
2004
|
+
@Data = params['Data']
|
2005
|
+
@GroupId = params['GroupId']
|
2006
|
+
@TopN = params['TopN']
|
2007
|
+
end
|
2008
|
+
end
|
2009
|
+
|
2010
|
+
# VoicePrintGroupVerify返回参数结构体
|
2011
|
+
class VoicePrintGroupVerifyResponse < TencentCloud::Common::AbstractModel
|
2012
|
+
# @param Data: TopN 返回结果;系统建议打分70分以上为同一个人音色,评分也取决于音频质量、长度等其他原因影响,您可以按照业务需求适当提高或降低分数要求
|
2013
|
+
# @type Data: :class:`Tencentcloud::Asr.v20190614.models.VerifyTopResult`
|
2014
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
2015
|
+
# @type RequestId: String
|
2016
|
+
|
2017
|
+
attr_accessor :Data, :RequestId
|
2018
|
+
|
2019
|
+
def initialize(data=nil, requestid=nil)
|
2020
|
+
@Data = data
|
2021
|
+
@RequestId = requestid
|
2022
|
+
end
|
2023
|
+
|
2024
|
+
def deserialize(params)
|
2025
|
+
unless params['Data'].nil?
|
2026
|
+
@Data = VerifyTopResult.new
|
2027
|
+
@Data.deserialize(params['Data'])
|
2028
|
+
end
|
2029
|
+
@RequestId = params['RequestId']
|
2030
|
+
end
|
2031
|
+
end
|
2032
|
+
|
1889
2033
|
# VoicePrintUpdate请求参数结构体
|
1890
2034
|
class VoicePrintUpdateRequest < TencentCloud::Common::AbstractModel
|
1891
2035
|
# @param VoiceFormat: 音频格式 0: pcm, 1: wav
|
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.
|
4
|
+
version: 3.0.850
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-24 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
|
36
37
|
- lib/v20190614/models.rb
|
37
38
|
- lib/v20190614/client.rb
|
38
|
-
- lib/tencentcloud-sdk-asr.rb
|
39
39
|
- lib/VERSION
|
40
40
|
homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
|
41
41
|
licenses:
|