tencentcloud-sdk-vrs 3.0.548
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.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-vrs.rb +11 -0
- data/lib/v20200824/client.rb +146 -0
- data/lib/v20200824/models.rb +404 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e0c8f31cd571be806b8802017c0e451fb6dbca62
|
4
|
+
data.tar.gz: 8f561dbd38074f1ecae98cdc3f90b3f3bd058f94
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3e241a7936a4b12edebc6d27da29b6a8bc694b83f5b0d1c3d97a71c5183ce46d1e8a8b5db3b688ca0ca551155b4b97db1023931fd5361e557722bc1ba16a8031
|
7
|
+
data.tar.gz: 11ea32063a5fa3c6cfe16ef7a4b7003ae0339268ab3460933572baab40ea40f05eb1057483aa4e4b570c9276beb272dd6d55e684cf9074b4e7fcc02f8642ec9a
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.0.548
|
@@ -0,0 +1,146 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
require 'json'
|
18
|
+
|
19
|
+
module TencentCloud
|
20
|
+
module Vrs
|
21
|
+
module V20200824
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2020-08-24'
|
26
|
+
api_endpoint = 'vrs.tencentcloudapi.com'
|
27
|
+
sdk_version = 'VRS_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# 本接口服务对提交音频进行声音复刻任务创建接口,异步返回复刻结果。
|
33
|
+
# • 请求方法为 HTTP POST , Content-Type为"application/json; charset=utf-8"
|
34
|
+
# • 签名方法参考 公共参数 中签名方法v3。
|
35
|
+
# • 默认接口请求频率限制:30次/秒,
|
36
|
+
|
37
|
+
# @param request: Request instance for CreateVRSTask.
|
38
|
+
# @type request: :class:`Tencentcloud::vrs::V20200824::CreateVRSTaskRequest`
|
39
|
+
# @rtype: :class:`Tencentcloud::vrs::V20200824::CreateVRSTaskResponse`
|
40
|
+
def CreateVRSTask(request)
|
41
|
+
body = send_request('CreateVRSTask', request.serialize)
|
42
|
+
response = JSON.parse(body)
|
43
|
+
if response['Response'].key?('Error') == false
|
44
|
+
model = CreateVRSTaskResponse.new
|
45
|
+
model.deserialize(response['Response'])
|
46
|
+
model
|
47
|
+
else
|
48
|
+
code = response['Response']['Error']['Code']
|
49
|
+
message = response['Response']['Error']['Message']
|
50
|
+
reqid = response['Response']['RequestId']
|
51
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
52
|
+
end
|
53
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
54
|
+
raise e
|
55
|
+
rescue StandardError => e
|
56
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
57
|
+
end
|
58
|
+
|
59
|
+
# 在调用声音复刻创建任务请求接口后,有回调和轮询两种方式获取识别结果。
|
60
|
+
# • 当采用回调方式时,识别完成后会将结果通过 POST 请求的形式通知到用户在请求时填写的回调 URL,具体请参见 声音复刻结果回调 。
|
61
|
+
# • 当采用轮询方式时,需要主动提交任务ID来轮询识别结果,共有任务成功、等待、执行中和失败四种结果,具体信息请参见下文说明。
|
62
|
+
# • 请求方法为 HTTP POST , Content-Type为"application/json; charset=utf-8"
|
63
|
+
# • 签名方法参考 公共参数 中签名方法v3。
|
64
|
+
# • 默认接口请求频率限制:20次/秒,如您有提高请求频率限制的需求,请提工单进行咨询。
|
65
|
+
|
66
|
+
# @param request: Request instance for DescribeVRSTaskStatus.
|
67
|
+
# @type request: :class:`Tencentcloud::vrs::V20200824::DescribeVRSTaskStatusRequest`
|
68
|
+
# @rtype: :class:`Tencentcloud::vrs::V20200824::DescribeVRSTaskStatusResponse`
|
69
|
+
def DescribeVRSTaskStatus(request)
|
70
|
+
body = send_request('DescribeVRSTaskStatus', request.serialize)
|
71
|
+
response = JSON.parse(body)
|
72
|
+
if response['Response'].key?('Error') == false
|
73
|
+
model = DescribeVRSTaskStatusResponse.new
|
74
|
+
model.deserialize(response['Response'])
|
75
|
+
model
|
76
|
+
else
|
77
|
+
code = response['Response']['Error']['Code']
|
78
|
+
message = response['Response']['Error']['Message']
|
79
|
+
reqid = response['Response']['RequestId']
|
80
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
81
|
+
end
|
82
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
83
|
+
raise e
|
84
|
+
rescue StandardError => e
|
85
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
86
|
+
end
|
87
|
+
|
88
|
+
# 本接口用于检测音频的环境和音频质量。
|
89
|
+
# • 请求方法为 HTTP POST , Content-Type为"application/json; charset=utf-8"
|
90
|
+
# • 签名方法参考 公共参数 中签名方法v3。
|
91
|
+
# • 默认接口请求频率限制:20次/秒。
|
92
|
+
|
93
|
+
# @param request: Request instance for DetectEnvAndSoundQuality.
|
94
|
+
# @type request: :class:`Tencentcloud::vrs::V20200824::DetectEnvAndSoundQualityRequest`
|
95
|
+
# @rtype: :class:`Tencentcloud::vrs::V20200824::DetectEnvAndSoundQualityResponse`
|
96
|
+
def DetectEnvAndSoundQuality(request)
|
97
|
+
body = send_request('DetectEnvAndSoundQuality', request.serialize)
|
98
|
+
response = JSON.parse(body)
|
99
|
+
if response['Response'].key?('Error') == false
|
100
|
+
model = DetectEnvAndSoundQualityResponse.new
|
101
|
+
model.deserialize(response['Response'])
|
102
|
+
model
|
103
|
+
else
|
104
|
+
code = response['Response']['Error']['Code']
|
105
|
+
message = response['Response']['Error']['Message']
|
106
|
+
reqid = response['Response']['RequestId']
|
107
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
108
|
+
end
|
109
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
110
|
+
raise e
|
111
|
+
rescue StandardError => e
|
112
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
113
|
+
end
|
114
|
+
|
115
|
+
# 本接口用于获取声音复刻训练文本信息。
|
116
|
+
# 请求方法为 HTTP POST , Content-Type为"application/json; charset=utf-8"
|
117
|
+
# • 签名方法参考 公共参数 中签名方法v3。
|
118
|
+
# • 默认接口请求频率限制:20次/秒。
|
119
|
+
|
120
|
+
# @param request: Request instance for GetTrainingText.
|
121
|
+
# @type request: :class:`Tencentcloud::vrs::V20200824::GetTrainingTextRequest`
|
122
|
+
# @rtype: :class:`Tencentcloud::vrs::V20200824::GetTrainingTextResponse`
|
123
|
+
def GetTrainingText(request)
|
124
|
+
body = send_request('GetTrainingText', request.serialize)
|
125
|
+
response = JSON.parse(body)
|
126
|
+
if response['Response'].key?('Error') == false
|
127
|
+
model = GetTrainingTextResponse.new
|
128
|
+
model.deserialize(response['Response'])
|
129
|
+
model
|
130
|
+
else
|
131
|
+
code = response['Response']['Error']['Code']
|
132
|
+
message = response['Response']['Error']['Message']
|
133
|
+
reqid = response['Response']['RequestId']
|
134
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
135
|
+
end
|
136
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
137
|
+
raise e
|
138
|
+
rescue StandardError => e
|
139
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
140
|
+
end
|
141
|
+
|
142
|
+
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,404 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
module TencentCloud
|
18
|
+
module Vrs
|
19
|
+
module V20200824
|
20
|
+
# CreateVRSTask请求参数结构体
|
21
|
+
class CreateVRSTaskRequest < TencentCloud::Common::AbstractModel
|
22
|
+
# @param SessionId: 唯一请求 ID
|
23
|
+
# @type SessionId: String
|
24
|
+
# @param VoiceName: 音色名称
|
25
|
+
# @type VoiceName: String
|
26
|
+
# @param SampleRate: 音频采样率:
|
27
|
+
|
28
|
+
# 16000:16k(默认)
|
29
|
+
# @type SampleRate: Integer
|
30
|
+
# @param VoiceGender: 音色性别:
|
31
|
+
|
32
|
+
# 1-male
|
33
|
+
|
34
|
+
# 2-female
|
35
|
+
# @type VoiceGender: Integer
|
36
|
+
# @param VoiceLanguage: 语言类型:
|
37
|
+
|
38
|
+
# 1-中文(默认)
|
39
|
+
# @type VoiceLanguage: Integer
|
40
|
+
# @param Codec: 音频格式,音频类型(wav,mp3,aac,m4a)
|
41
|
+
# @type Codec: String
|
42
|
+
# @param AudioIdList: 音频ID集合
|
43
|
+
# @type AudioIdList: Array
|
44
|
+
# @param CallbackUrl: 回调 URL,用户自行搭建的用于接收识别结果的服务URL。如果用户使用轮询方式获取识别结果,则无需提交该参数。
|
45
|
+
# @type CallbackUrl: String
|
46
|
+
|
47
|
+
attr_accessor :SessionId, :VoiceName, :SampleRate, :VoiceGender, :VoiceLanguage, :Codec, :AudioIdList, :CallbackUrl
|
48
|
+
|
49
|
+
def initialize(sessionid=nil, voicename=nil, samplerate=nil, voicegender=nil, voicelanguage=nil, codec=nil, audioidlist=nil, callbackurl=nil)
|
50
|
+
@SessionId = sessionid
|
51
|
+
@VoiceName = voicename
|
52
|
+
@SampleRate = samplerate
|
53
|
+
@VoiceGender = voicegender
|
54
|
+
@VoiceLanguage = voicelanguage
|
55
|
+
@Codec = codec
|
56
|
+
@AudioIdList = audioidlist
|
57
|
+
@CallbackUrl = callbackurl
|
58
|
+
end
|
59
|
+
|
60
|
+
def deserialize(params)
|
61
|
+
@SessionId = params['SessionId']
|
62
|
+
@VoiceName = params['VoiceName']
|
63
|
+
@SampleRate = params['SampleRate']
|
64
|
+
@VoiceGender = params['VoiceGender']
|
65
|
+
@VoiceLanguage = params['VoiceLanguage']
|
66
|
+
@Codec = params['Codec']
|
67
|
+
@AudioIdList = params['AudioIdList']
|
68
|
+
@CallbackUrl = params['CallbackUrl']
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# 声音复刻任务创建响应
|
73
|
+
class CreateVRSTaskRespData < TencentCloud::Common::AbstractModel
|
74
|
+
# @param TaskId: 任务ID
|
75
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
76
|
+
# @type TaskId: String
|
77
|
+
|
78
|
+
attr_accessor :TaskId
|
79
|
+
|
80
|
+
def initialize(taskid=nil)
|
81
|
+
@TaskId = taskid
|
82
|
+
end
|
83
|
+
|
84
|
+
def deserialize(params)
|
85
|
+
@TaskId = params['TaskId']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# CreateVRSTask返回参数结构体
|
90
|
+
class CreateVRSTaskResponse < TencentCloud::Common::AbstractModel
|
91
|
+
# @param Data: 创建任务结果
|
92
|
+
# @type Data: :class:`Tencentcloud::Vrs.v20200824.models.CreateVRSTaskRespData`
|
93
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
94
|
+
# @type RequestId: String
|
95
|
+
|
96
|
+
attr_accessor :Data, :RequestId
|
97
|
+
|
98
|
+
def initialize(data=nil, requestid=nil)
|
99
|
+
@Data = data
|
100
|
+
@RequestId = requestid
|
101
|
+
end
|
102
|
+
|
103
|
+
def deserialize(params)
|
104
|
+
unless params['Data'].nil?
|
105
|
+
@Data = CreateVRSTaskRespData.new
|
106
|
+
@Data.deserialize(params['Data'])
|
107
|
+
end
|
108
|
+
@RequestId = params['RequestId']
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# DescribeVRSTaskStatus请求参数结构体
|
113
|
+
class DescribeVRSTaskStatusRequest < TencentCloud::Common::AbstractModel
|
114
|
+
# @param TaskId: 任务ID
|
115
|
+
# @type TaskId: String
|
116
|
+
|
117
|
+
attr_accessor :TaskId
|
118
|
+
|
119
|
+
def initialize(taskid=nil)
|
120
|
+
@TaskId = taskid
|
121
|
+
end
|
122
|
+
|
123
|
+
def deserialize(params)
|
124
|
+
@TaskId = params['TaskId']
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# 任务结果
|
129
|
+
class DescribeVRSTaskStatusRespData < TencentCloud::Common::AbstractModel
|
130
|
+
# @param TaskId: 任务ID
|
131
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
132
|
+
# @type TaskId: String
|
133
|
+
# @param Status: 任务状态码,0:任务等待,1:任务执行中,2:任务成功,3:任务失败。
|
134
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
135
|
+
# @type Status: Integer
|
136
|
+
# @param StatusStr: 任务状态,waiting:任务等待,doing:任务执行中,success:任务成功,failed:任务失败。
|
137
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
138
|
+
# @type StatusStr: String
|
139
|
+
# @param VoiceType: 音色id
|
140
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
141
|
+
# @type VoiceType: Integer
|
142
|
+
# @param ErrorMsg: 失败原因说明。
|
143
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
144
|
+
# @type ErrorMsg: String
|
145
|
+
|
146
|
+
attr_accessor :TaskId, :Status, :StatusStr, :VoiceType, :ErrorMsg
|
147
|
+
|
148
|
+
def initialize(taskid=nil, status=nil, statusstr=nil, voicetype=nil, errormsg=nil)
|
149
|
+
@TaskId = taskid
|
150
|
+
@Status = status
|
151
|
+
@StatusStr = statusstr
|
152
|
+
@VoiceType = voicetype
|
153
|
+
@ErrorMsg = errormsg
|
154
|
+
end
|
155
|
+
|
156
|
+
def deserialize(params)
|
157
|
+
@TaskId = params['TaskId']
|
158
|
+
@Status = params['Status']
|
159
|
+
@StatusStr = params['StatusStr']
|
160
|
+
@VoiceType = params['VoiceType']
|
161
|
+
@ErrorMsg = params['ErrorMsg']
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# DescribeVRSTaskStatus返回参数结构体
|
166
|
+
class DescribeVRSTaskStatusResponse < TencentCloud::Common::AbstractModel
|
167
|
+
# @param Data: 声音复刻任务结果
|
168
|
+
# @type Data: :class:`Tencentcloud::Vrs.v20200824.models.DescribeVRSTaskStatusRespData`
|
169
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
170
|
+
# @type RequestId: String
|
171
|
+
|
172
|
+
attr_accessor :Data, :RequestId
|
173
|
+
|
174
|
+
def initialize(data=nil, requestid=nil)
|
175
|
+
@Data = data
|
176
|
+
@RequestId = requestid
|
177
|
+
end
|
178
|
+
|
179
|
+
def deserialize(params)
|
180
|
+
unless params['Data'].nil?
|
181
|
+
@Data = DescribeVRSTaskStatusRespData.new
|
182
|
+
@Data.deserialize(params['Data'])
|
183
|
+
end
|
184
|
+
@RequestId = params['RequestId']
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
# DetectEnvAndSoundQuality请求参数结构体
|
189
|
+
class DetectEnvAndSoundQualityRequest < TencentCloud::Common::AbstractModel
|
190
|
+
# @param TextId: 标注文本信息 ID
|
191
|
+
# @type TextId: String
|
192
|
+
# @param AudioData: 语音数据 要使用base64编码(采用python语言时注意读取文件应该为string而不是byte,以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。
|
193
|
+
# @type AudioData: String
|
194
|
+
# @param Codec: 音频格式,音频类型(wav,mp3,aac,m4a)
|
195
|
+
# @type Codec: String
|
196
|
+
# @param TypeId: 1:环境检测 2:音质检测
|
197
|
+
# @type TypeId: Integer
|
198
|
+
# @param SampleRate: 音频采样率:
|
199
|
+
|
200
|
+
# 16000:16k(默认)
|
201
|
+
# @type SampleRate: Integer
|
202
|
+
|
203
|
+
attr_accessor :TextId, :AudioData, :Codec, :TypeId, :SampleRate
|
204
|
+
|
205
|
+
def initialize(textid=nil, audiodata=nil, codec=nil, typeid=nil, samplerate=nil)
|
206
|
+
@TextId = textid
|
207
|
+
@AudioData = audiodata
|
208
|
+
@Codec = codec
|
209
|
+
@TypeId = typeid
|
210
|
+
@SampleRate = samplerate
|
211
|
+
end
|
212
|
+
|
213
|
+
def deserialize(params)
|
214
|
+
@TextId = params['TextId']
|
215
|
+
@AudioData = params['AudioData']
|
216
|
+
@Codec = params['Codec']
|
217
|
+
@TypeId = params['TypeId']
|
218
|
+
@SampleRate = params['SampleRate']
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
# DetectEnvAndSoundQuality返回参数结构体
|
223
|
+
class DetectEnvAndSoundQualityResponse < TencentCloud::Common::AbstractModel
|
224
|
+
# @param Data: 检测结果
|
225
|
+
# @type Data: :class:`Tencentcloud::Vrs.v20200824.models.DetectionEnvAndSoundQualityRespData`
|
226
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
227
|
+
# @type RequestId: String
|
228
|
+
|
229
|
+
attr_accessor :Data, :RequestId
|
230
|
+
|
231
|
+
def initialize(data=nil, requestid=nil)
|
232
|
+
@Data = data
|
233
|
+
@RequestId = requestid
|
234
|
+
end
|
235
|
+
|
236
|
+
def deserialize(params)
|
237
|
+
unless params['Data'].nil?
|
238
|
+
@Data = DetectionEnvAndSoundQualityRespData.new
|
239
|
+
@Data.deserialize(params['Data'])
|
240
|
+
end
|
241
|
+
@RequestId = params['RequestId']
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
# 环境检测和音频检测响应
|
246
|
+
class DetectionEnvAndSoundQualityRespData < TencentCloud::Common::AbstractModel
|
247
|
+
# @param AudioId: 音频ID (用于创建任务接口AudioIds),环境检测该值为空,仅在音质检测情况下返回
|
248
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
249
|
+
# @type AudioId: String
|
250
|
+
# @param DetectionCode: 检测code
|
251
|
+
|
252
|
+
# 0 表示当前语音通过
|
253
|
+
# -1 表示检测失败,需要重试
|
254
|
+
# -2 表示语音检测不通过,提示用户再重新录制一下(通常漏读,错读,或多读)
|
255
|
+
# -3 表示语音中噪声较大,不通过
|
256
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
257
|
+
# @type DetectionCode: Integer
|
258
|
+
# @param DetectionMsg: 检测提示信息
|
259
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
260
|
+
# @type DetectionMsg: String
|
261
|
+
# @param DetectionTip: 检测提示信息
|
262
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
263
|
+
# @type DetectionTip: Array
|
264
|
+
|
265
|
+
attr_accessor :AudioId, :DetectionCode, :DetectionMsg, :DetectionTip
|
266
|
+
|
267
|
+
def initialize(audioid=nil, detectioncode=nil, detectionmsg=nil, detectiontip=nil)
|
268
|
+
@AudioId = audioid
|
269
|
+
@DetectionCode = detectioncode
|
270
|
+
@DetectionMsg = detectionmsg
|
271
|
+
@DetectionTip = detectiontip
|
272
|
+
end
|
273
|
+
|
274
|
+
def deserialize(params)
|
275
|
+
@AudioId = params['AudioId']
|
276
|
+
@DetectionCode = params['DetectionCode']
|
277
|
+
@DetectionMsg = params['DetectionMsg']
|
278
|
+
unless params['DetectionTip'].nil?
|
279
|
+
@DetectionTip = []
|
280
|
+
params['DetectionTip'].each do |i|
|
281
|
+
words_tmp = Words.new
|
282
|
+
words_tmp.deserialize(i)
|
283
|
+
@DetectionTip << words_tmp
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
# GetTrainingText请求参数结构体
|
290
|
+
class GetTrainingTextRequest < TencentCloud::Common::AbstractModel
|
291
|
+
|
292
|
+
|
293
|
+
def initialize()
|
294
|
+
end
|
295
|
+
|
296
|
+
def deserialize(params)
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
# GetTrainingText返回参数结构体
|
301
|
+
class GetTrainingTextResponse < TencentCloud::Common::AbstractModel
|
302
|
+
# @param Data: 文本列表
|
303
|
+
# @type Data: :class:`Tencentcloud::Vrs.v20200824.models.TrainingTexts`
|
304
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
305
|
+
# @type RequestId: String
|
306
|
+
|
307
|
+
attr_accessor :Data, :RequestId
|
308
|
+
|
309
|
+
def initialize(data=nil, requestid=nil)
|
310
|
+
@Data = data
|
311
|
+
@RequestId = requestid
|
312
|
+
end
|
313
|
+
|
314
|
+
def deserialize(params)
|
315
|
+
unless params['Data'].nil?
|
316
|
+
@Data = TrainingTexts.new
|
317
|
+
@Data.deserialize(params['Data'])
|
318
|
+
end
|
319
|
+
@RequestId = params['RequestId']
|
320
|
+
end
|
321
|
+
end
|
322
|
+
|
323
|
+
# 训练文本
|
324
|
+
class TrainingText < TencentCloud::Common::AbstractModel
|
325
|
+
# @param TextId: 文本ID
|
326
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
327
|
+
# @type TextId: String
|
328
|
+
# @param Text: 文本
|
329
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
330
|
+
# @type Text: String
|
331
|
+
|
332
|
+
attr_accessor :TextId, :Text
|
333
|
+
|
334
|
+
def initialize(textid=nil, text=nil)
|
335
|
+
@TextId = textid
|
336
|
+
@Text = text
|
337
|
+
end
|
338
|
+
|
339
|
+
def deserialize(params)
|
340
|
+
@TextId = params['TextId']
|
341
|
+
@Text = params['Text']
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
# 训练文本列表
|
346
|
+
class TrainingTexts < TencentCloud::Common::AbstractModel
|
347
|
+
# @param TrainingTextList: 训练文本列表
|
348
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
349
|
+
# @type TrainingTextList: Array
|
350
|
+
|
351
|
+
attr_accessor :TrainingTextList
|
352
|
+
|
353
|
+
def initialize(trainingtextlist=nil)
|
354
|
+
@TrainingTextList = trainingtextlist
|
355
|
+
end
|
356
|
+
|
357
|
+
def deserialize(params)
|
358
|
+
unless params['TrainingTextList'].nil?
|
359
|
+
@TrainingTextList = []
|
360
|
+
params['TrainingTextList'].each do |i|
|
361
|
+
trainingtext_tmp = TrainingText.new
|
362
|
+
trainingtext_tmp.deserialize(i)
|
363
|
+
@TrainingTextList << trainingtext_tmp
|
364
|
+
end
|
365
|
+
end
|
366
|
+
end
|
367
|
+
end
|
368
|
+
|
369
|
+
# Words
|
370
|
+
class Words < TencentCloud::Common::AbstractModel
|
371
|
+
# @param PronAccuracy: 准确度
|
372
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
373
|
+
# @type PronAccuracy: Float
|
374
|
+
# @param PronFluency: 流畅度
|
375
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
376
|
+
# @type PronFluency: Float
|
377
|
+
# @param Tag: tag: 0: match, 1: insert, 2: delete, 3: replace, 4: oov, 5: unknown
|
378
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
379
|
+
# @type Tag: Integer
|
380
|
+
# @param Word: 字
|
381
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
382
|
+
# @type Word: String
|
383
|
+
|
384
|
+
attr_accessor :PronAccuracy, :PronFluency, :Tag, :Word
|
385
|
+
|
386
|
+
def initialize(pronaccuracy=nil, pronfluency=nil, tag=nil, word=nil)
|
387
|
+
@PronAccuracy = pronaccuracy
|
388
|
+
@PronFluency = pronfluency
|
389
|
+
@Tag = tag
|
390
|
+
@Word = word
|
391
|
+
end
|
392
|
+
|
393
|
+
def deserialize(params)
|
394
|
+
@PronAccuracy = params['PronAccuracy']
|
395
|
+
@PronFluency = params['PronFluency']
|
396
|
+
@Tag = params['Tag']
|
397
|
+
@Word = params['Word']
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
end
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tencentcloud-sdk-vrs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.548
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tencent Cloud
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-04-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: tencentcloud-sdk-common
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
description: Tencent Cloud Ruby SDK is the official software development kit, which
|
28
|
+
allows Ruby developers to write software that makes use of Tencent Cloud service
|
29
|
+
VRS.
|
30
|
+
email:
|
31
|
+
- tencentcloudapi@tencent.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- lib/v20200824/client.rb
|
37
|
+
- lib/v20200824/models.rb
|
38
|
+
- lib/tencentcloud-sdk-vrs.rb
|
39
|
+
- lib/VERSION
|
40
|
+
homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
|
41
|
+
licenses:
|
42
|
+
- Apache-2.0
|
43
|
+
metadata:
|
44
|
+
source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-vrs
|
45
|
+
changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
requirements: []
|
61
|
+
rubyforge_project:
|
62
|
+
rubygems_version: 2.0.14
|
63
|
+
signing_key:
|
64
|
+
specification_version: 4
|
65
|
+
summary: Tencent Cloud SDK for Ruby - VRS
|
66
|
+
test_files: []
|