tencentcloud-sdk-aai 1.0.200
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-aai.rb +11 -0
- data/lib/v20180522/client.rb +134 -0
- data/lib/v20180522/models.rb +297 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: af5d72ef4de32f763a3b5baaefd7f0a14d877dc8
|
4
|
+
data.tar.gz: 134d61ad16a7d12e23f93e82e5f67ce19154e227
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 863786e44040d2d22920cb07cb86d437cd3e874a6001734e716b2b95292acb1d76fcd1a78a88d2806dcf409512528912546470be4db3a180722a748ec5fccb7b
|
7
|
+
data.tar.gz: 135fc5c9e6a9a02257bd5e0bf769a8816420235444d80316f2661a99e11b3cfa18fb84978941d1c1e13d7d20107e3486cea508d3ed59933289d977036a0804fb
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.200
|
@@ -0,0 +1,134 @@
|
|
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 Aai
|
21
|
+
module V20180522
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2018-05-22'
|
26
|
+
api_endpoint = 'aai.tencentcloudapi.com'
|
27
|
+
sdk_version = 'AAI_' + 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
|
+
|
34
|
+
# @param request: Request instance for Chat.
|
35
|
+
# @type request: :class:`Tencentcloud::aai::V20180522::ChatRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::aai::V20180522::ChatResponse`
|
37
|
+
def Chat(request)
|
38
|
+
body = send_request('Chat', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = ChatResponse.new
|
42
|
+
model.deserialize(response['Response'])
|
43
|
+
model
|
44
|
+
else
|
45
|
+
code = response['Response']['Error']['Code']
|
46
|
+
message = response['Response']['Error']['Message']
|
47
|
+
reqid = response['Response']['RequestId']
|
48
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
49
|
+
end
|
50
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
51
|
+
raise e
|
52
|
+
rescue StandardError => e
|
53
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
54
|
+
end
|
55
|
+
|
56
|
+
# 识别60s内的短语音,当音频放在请求body中传输时整个请求大小不能超过600KB,当音频以url方式传输时,音频时长不可超过60s。所有请求参数放在post的body中采用x-www-form-urlencoded(数据转换成一个字符串(name1=value1&name2=value2…)进行urlencode后)编码传输。现暂只支持中文普通话识别,支持识别8k(16k)的16bit的mp3或者wav音频。
|
57
|
+
|
58
|
+
# @param request: Request instance for SentenceRecognition.
|
59
|
+
# @type request: :class:`Tencentcloud::aai::V20180522::SentenceRecognitionRequest`
|
60
|
+
# @rtype: :class:`Tencentcloud::aai::V20180522::SentenceRecognitionResponse`
|
61
|
+
def SentenceRecognition(request)
|
62
|
+
body = send_request('SentenceRecognition', request.serialize)
|
63
|
+
response = JSON.parse(body)
|
64
|
+
if response['Response'].key?('Error') == false
|
65
|
+
model = SentenceRecognitionResponse.new
|
66
|
+
model.deserialize(response['Response'])
|
67
|
+
model
|
68
|
+
else
|
69
|
+
code = response['Response']['Error']['Code']
|
70
|
+
message = response['Response']['Error']['Message']
|
71
|
+
reqid = response['Response']['RequestId']
|
72
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
73
|
+
end
|
74
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
75
|
+
raise e
|
76
|
+
rescue StandardError => e
|
77
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
78
|
+
end
|
79
|
+
|
80
|
+
# 该接口是实时流式识别,可同时返回语音识别文本及翻译文本,当前仅支持中文和英文。该接口可配合同传windows客户端,提供会议现场同传服务。
|
81
|
+
|
82
|
+
# @param request: Request instance for SimultaneousInterpreting.
|
83
|
+
# @type request: :class:`Tencentcloud::aai::V20180522::SimultaneousInterpretingRequest`
|
84
|
+
# @rtype: :class:`Tencentcloud::aai::V20180522::SimultaneousInterpretingResponse`
|
85
|
+
def SimultaneousInterpreting(request)
|
86
|
+
body = send_request('SimultaneousInterpreting', request.serialize)
|
87
|
+
response = JSON.parse(body)
|
88
|
+
if response['Response'].key?('Error') == false
|
89
|
+
model = SimultaneousInterpretingResponse.new
|
90
|
+
model.deserialize(response['Response'])
|
91
|
+
model
|
92
|
+
else
|
93
|
+
code = response['Response']['Error']['Code']
|
94
|
+
message = response['Response']['Error']['Message']
|
95
|
+
reqid = response['Response']['RequestId']
|
96
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
97
|
+
end
|
98
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
99
|
+
raise e
|
100
|
+
rescue StandardError => e
|
101
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
102
|
+
end
|
103
|
+
|
104
|
+
# 腾讯云语音合成技术(TTS)可以将任意文本转化为语音,实现让机器和应用张口说话。
|
105
|
+
# 腾讯TTS技术可以应用到很多场景,比如,移动APP语音播报新闻;智能设备语音提醒;依靠网上现有节目或少量录音,快速合成明星语音,降低邀约成本;支持车载导航语音合成的个性化语音播报。
|
106
|
+
# 内测期间免费使用。
|
107
|
+
|
108
|
+
# @param request: Request instance for TextToVoice.
|
109
|
+
# @type request: :class:`Tencentcloud::aai::V20180522::TextToVoiceRequest`
|
110
|
+
# @rtype: :class:`Tencentcloud::aai::V20180522::TextToVoiceResponse`
|
111
|
+
def TextToVoice(request)
|
112
|
+
body = send_request('TextToVoice', request.serialize)
|
113
|
+
response = JSON.parse(body)
|
114
|
+
if response['Response'].key?('Error') == false
|
115
|
+
model = TextToVoiceResponse.new
|
116
|
+
model.deserialize(response['Response'])
|
117
|
+
model
|
118
|
+
else
|
119
|
+
code = response['Response']['Error']['Code']
|
120
|
+
message = response['Response']['Error']['Message']
|
121
|
+
reqid = response['Response']['RequestId']
|
122
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
123
|
+
end
|
124
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
125
|
+
raise e
|
126
|
+
rescue StandardError => e
|
127
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
@@ -0,0 +1,297 @@
|
|
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 Aai
|
19
|
+
module V20180522
|
20
|
+
# Chat请求参数结构体
|
21
|
+
class ChatRequest < TencentCloud::Common::AbstractModel
|
22
|
+
# @param Text: 聊天输入文本
|
23
|
+
# @type Text: String
|
24
|
+
# @param ProjectId: 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
|
25
|
+
# @type ProjectId: Integer
|
26
|
+
# @param User: json格式,比如 {"id":"test","gender":"male"}。记录当前与机器人交互的用户id,非必须但强烈建议传入,否则多轮聊天功能会受影响
|
27
|
+
# @type User: String
|
28
|
+
|
29
|
+
attr_accessor :Text, :ProjectId, :User
|
30
|
+
|
31
|
+
def initialize(text=nil, projectid=nil, user=nil)
|
32
|
+
@Text = text
|
33
|
+
@ProjectId = projectid
|
34
|
+
@User = user
|
35
|
+
end
|
36
|
+
|
37
|
+
def deserialize(params)
|
38
|
+
@Text = params['Text']
|
39
|
+
@ProjectId = params['ProjectId']
|
40
|
+
@User = params['User']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Chat返回参数结构体
|
45
|
+
class ChatResponse < TencentCloud::Common::AbstractModel
|
46
|
+
# @param Answer: 聊天输出文本
|
47
|
+
# @type Answer: String
|
48
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
49
|
+
# @type RequestId: String
|
50
|
+
|
51
|
+
attr_accessor :Answer, :RequestId
|
52
|
+
|
53
|
+
def initialize(answer=nil, requestid=nil)
|
54
|
+
@Answer = answer
|
55
|
+
@RequestId = requestid
|
56
|
+
end
|
57
|
+
|
58
|
+
def deserialize(params)
|
59
|
+
@Answer = params['Answer']
|
60
|
+
@RequestId = params['RequestId']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# SentenceRecognition请求参数结构体
|
65
|
+
class SentenceRecognitionRequest < TencentCloud::Common::AbstractModel
|
66
|
+
# @param ProjectId: 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
|
67
|
+
# @type ProjectId: Integer
|
68
|
+
# @param SubServiceType: 子服务类型。2,一句话识别。
|
69
|
+
# @type SubServiceType: Integer
|
70
|
+
# @param EngSerViceType: 引擎类型。8k:电话 8k 通用模型;16k:16k 通用模型。只支持单声道音频识别。
|
71
|
+
# @type EngSerViceType: String
|
72
|
+
# @param SourceType: 语音数据来源。0:语音 URL;1:语音数据(post body)。
|
73
|
+
# @type SourceType: Integer
|
74
|
+
# @param VoiceFormat: 识别音频的音频格式(支持mp3,wav)。
|
75
|
+
# @type VoiceFormat: String
|
76
|
+
# @param UsrAudioKey: 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
|
77
|
+
# @type UsrAudioKey: String
|
78
|
+
# @param Url: 语音 URL,公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048,需进行urlencode编码。音频时间长度要小于60s。
|
79
|
+
# @type Url: String
|
80
|
+
# @param Data: 语音数据,当SourceType 值为1时必须填写,为0可不写。要base64编码(采用python语言时注意读取文件应该为string而不是byte,以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。音频数据要小于600kB。
|
81
|
+
# @type Data: String
|
82
|
+
# @param DataLen: 数据长度,当 SourceType 值为1时必须填写,为0可不写(此数据长度为数据未进行base64编码时的数据长度)。
|
83
|
+
# @type DataLen: Integer
|
84
|
+
|
85
|
+
attr_accessor :ProjectId, :SubServiceType, :EngSerViceType, :SourceType, :VoiceFormat, :UsrAudioKey, :Url, :Data, :DataLen
|
86
|
+
|
87
|
+
def initialize(projectid=nil, subservicetype=nil, engservicetype=nil, sourcetype=nil, voiceformat=nil, usraudiokey=nil, url=nil, data=nil, datalen=nil)
|
88
|
+
@ProjectId = projectid
|
89
|
+
@SubServiceType = subservicetype
|
90
|
+
@EngSerViceType = engservicetype
|
91
|
+
@SourceType = sourcetype
|
92
|
+
@VoiceFormat = voiceformat
|
93
|
+
@UsrAudioKey = usraudiokey
|
94
|
+
@Url = url
|
95
|
+
@Data = data
|
96
|
+
@DataLen = datalen
|
97
|
+
end
|
98
|
+
|
99
|
+
def deserialize(params)
|
100
|
+
@ProjectId = params['ProjectId']
|
101
|
+
@SubServiceType = params['SubServiceType']
|
102
|
+
@EngSerViceType = params['EngSerViceType']
|
103
|
+
@SourceType = params['SourceType']
|
104
|
+
@VoiceFormat = params['VoiceFormat']
|
105
|
+
@UsrAudioKey = params['UsrAudioKey']
|
106
|
+
@Url = params['Url']
|
107
|
+
@Data = params['Data']
|
108
|
+
@DataLen = params['DataLen']
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# SentenceRecognition返回参数结构体
|
113
|
+
class SentenceRecognitionResponse < TencentCloud::Common::AbstractModel
|
114
|
+
# @param Result: 识别结果。
|
115
|
+
# @type Result: String
|
116
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
117
|
+
# @type RequestId: String
|
118
|
+
|
119
|
+
attr_accessor :Result, :RequestId
|
120
|
+
|
121
|
+
def initialize(result=nil, requestid=nil)
|
122
|
+
@Result = result
|
123
|
+
@RequestId = requestid
|
124
|
+
end
|
125
|
+
|
126
|
+
def deserialize(params)
|
127
|
+
@Result = params['Result']
|
128
|
+
@RequestId = params['RequestId']
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# SimultaneousInterpreting请求参数结构体
|
133
|
+
class SimultaneousInterpretingRequest < TencentCloud::Common::AbstractModel
|
134
|
+
# @param ProjectId: 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
|
135
|
+
# @type ProjectId: Integer
|
136
|
+
# @param SubServiceType: 子服务类型。0:离线语音识别。1:实时流式识别,2,一句话识别。3:同传。
|
137
|
+
# @type SubServiceType: Integer
|
138
|
+
# @param RecEngineModelType: 识别引擎类型。8k_zh: 8k 中文会场模型;16k_zh:16k 中文会场模型,8k_en: 8k 英文会场模型;16k_en:16k 英文会场模型。当前仅支持16K。
|
139
|
+
# @type RecEngineModelType: String
|
140
|
+
# @param Data: 语音数据,要base64编码。
|
141
|
+
# @type Data: String
|
142
|
+
# @param DataLen: 数据长度。
|
143
|
+
# @type DataLen: Integer
|
144
|
+
# @param VoiceId: 声音id,标识一句话。
|
145
|
+
# @type VoiceId: String
|
146
|
+
# @param IsEnd: 是否是一句话的结束。
|
147
|
+
# @type IsEnd: Integer
|
148
|
+
# @param VoiceFormat: 声音编码的格式1:pcm,4:speex,6:silk,默认为1。
|
149
|
+
# @type VoiceFormat: Integer
|
150
|
+
# @param OpenTranslate: 是否需要翻译结果,1表示需要翻译,0是不需要。
|
151
|
+
# @type OpenTranslate: Integer
|
152
|
+
# @param SourceLanguage: 如果需要翻译,表示源语言类型,可取值:zh,en。
|
153
|
+
# @type SourceLanguage: String
|
154
|
+
# @param TargetLanguage: 如果需要翻译,表示目标语言类型,可取值:zh,en。
|
155
|
+
# @type TargetLanguage: String
|
156
|
+
# @param Seq: 表明当前语音分片的索引,从0开始
|
157
|
+
# @type Seq: Integer
|
158
|
+
|
159
|
+
attr_accessor :ProjectId, :SubServiceType, :RecEngineModelType, :Data, :DataLen, :VoiceId, :IsEnd, :VoiceFormat, :OpenTranslate, :SourceLanguage, :TargetLanguage, :Seq
|
160
|
+
|
161
|
+
def initialize(projectid=nil, subservicetype=nil, recenginemodeltype=nil, data=nil, datalen=nil, voiceid=nil, isend=nil, voiceformat=nil, opentranslate=nil, sourcelanguage=nil, targetlanguage=nil, seq=nil)
|
162
|
+
@ProjectId = projectid
|
163
|
+
@SubServiceType = subservicetype
|
164
|
+
@RecEngineModelType = recenginemodeltype
|
165
|
+
@Data = data
|
166
|
+
@DataLen = datalen
|
167
|
+
@VoiceId = voiceid
|
168
|
+
@IsEnd = isend
|
169
|
+
@VoiceFormat = voiceformat
|
170
|
+
@OpenTranslate = opentranslate
|
171
|
+
@SourceLanguage = sourcelanguage
|
172
|
+
@TargetLanguage = targetlanguage
|
173
|
+
@Seq = seq
|
174
|
+
end
|
175
|
+
|
176
|
+
def deserialize(params)
|
177
|
+
@ProjectId = params['ProjectId']
|
178
|
+
@SubServiceType = params['SubServiceType']
|
179
|
+
@RecEngineModelType = params['RecEngineModelType']
|
180
|
+
@Data = params['Data']
|
181
|
+
@DataLen = params['DataLen']
|
182
|
+
@VoiceId = params['VoiceId']
|
183
|
+
@IsEnd = params['IsEnd']
|
184
|
+
@VoiceFormat = params['VoiceFormat']
|
185
|
+
@OpenTranslate = params['OpenTranslate']
|
186
|
+
@SourceLanguage = params['SourceLanguage']
|
187
|
+
@TargetLanguage = params['TargetLanguage']
|
188
|
+
@Seq = params['Seq']
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# SimultaneousInterpreting返回参数结构体
|
193
|
+
class SimultaneousInterpretingResponse < TencentCloud::Common::AbstractModel
|
194
|
+
# @param AsrText: 语音识别的结果
|
195
|
+
# @type AsrText: String
|
196
|
+
# @param NmtText: 机器翻译的结果
|
197
|
+
# @type NmtText: String
|
198
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
199
|
+
# @type RequestId: String
|
200
|
+
|
201
|
+
attr_accessor :AsrText, :NmtText, :RequestId
|
202
|
+
|
203
|
+
def initialize(asrtext=nil, nmttext=nil, requestid=nil)
|
204
|
+
@AsrText = asrtext
|
205
|
+
@NmtText = nmttext
|
206
|
+
@RequestId = requestid
|
207
|
+
end
|
208
|
+
|
209
|
+
def deserialize(params)
|
210
|
+
@AsrText = params['AsrText']
|
211
|
+
@NmtText = params['NmtText']
|
212
|
+
@RequestId = params['RequestId']
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# TextToVoice请求参数结构体
|
217
|
+
class TextToVoiceRequest < TencentCloud::Common::AbstractModel
|
218
|
+
# @param Text: 合成语音的源文本,按UTF-8编码统一计算。
|
219
|
+
# 中文最大支持100个汉字(全角标点符号算一个汉字);英文最大支持400个字母(半角标点符号算一个字母)。包含空格等字符时需要url encode再传输。
|
220
|
+
# @type Text: String
|
221
|
+
# @param SessionId: 一次请求对应一个SessionId,会原样返回,建议传入类似于uuid的字符串防止重复。
|
222
|
+
# @type SessionId: String
|
223
|
+
# @param ModelType: 模型类型,1-默认模型。
|
224
|
+
# @type ModelType: Integer
|
225
|
+
# @param Volume: 音量大小,范围:[0,10],分别对应11个等级的音量,默认为0,代表正常音量。没有静音选项。
|
226
|
+
# 输入除以上整数之外的其他参数不生效,按默认值处理。
|
227
|
+
# @type Volume: Float
|
228
|
+
# @param Speed: 语速,范围:[-2,2],分别对应不同语速:<li>-2代表0.6倍</li><li>-1代表0.8倍</li><li>0代表1.0倍(默认)</li><li>1代表1.2倍</li><li>2代表1.5倍</li>输入除以上整数之外的其他参数不生效,按默认值处理。
|
229
|
+
# @type Speed: Float
|
230
|
+
# @param ProjectId: 项目id,用户自定义,默认为0。
|
231
|
+
# @type ProjectId: Integer
|
232
|
+
# @param VoiceType: 音色<li>0-亲和女声(默认)</li><li>1-亲和男声</li><li>2-成熟男声</li><li>3-活力男声</li><li>4-温暖女声</li><li>5-情感女声</li><li>6-情感男声</li>
|
233
|
+
# @type VoiceType: Integer
|
234
|
+
# @param PrimaryLanguage: 主语言类型:<li>1-中文(默认)</li><li>2-英文</li>
|
235
|
+
# @type PrimaryLanguage: Integer
|
236
|
+
# @param SampleRate: 音频采样率:<li>16000:16k(默认)</li><li>8000:8k</li>
|
237
|
+
# @type SampleRate: Integer
|
238
|
+
# @param Codec: 返回音频格式,可取值:wav(默认),mp3
|
239
|
+
# @type Codec: String
|
240
|
+
|
241
|
+
attr_accessor :Text, :SessionId, :ModelType, :Volume, :Speed, :ProjectId, :VoiceType, :PrimaryLanguage, :SampleRate, :Codec
|
242
|
+
|
243
|
+
def initialize(text=nil, sessionid=nil, modeltype=nil, volume=nil, speed=nil, projectid=nil, voicetype=nil, primarylanguage=nil, samplerate=nil, codec=nil)
|
244
|
+
@Text = text
|
245
|
+
@SessionId = sessionid
|
246
|
+
@ModelType = modeltype
|
247
|
+
@Volume = volume
|
248
|
+
@Speed = speed
|
249
|
+
@ProjectId = projectid
|
250
|
+
@VoiceType = voicetype
|
251
|
+
@PrimaryLanguage = primarylanguage
|
252
|
+
@SampleRate = samplerate
|
253
|
+
@Codec = codec
|
254
|
+
end
|
255
|
+
|
256
|
+
def deserialize(params)
|
257
|
+
@Text = params['Text']
|
258
|
+
@SessionId = params['SessionId']
|
259
|
+
@ModelType = params['ModelType']
|
260
|
+
@Volume = params['Volume']
|
261
|
+
@Speed = params['Speed']
|
262
|
+
@ProjectId = params['ProjectId']
|
263
|
+
@VoiceType = params['VoiceType']
|
264
|
+
@PrimaryLanguage = params['PrimaryLanguage']
|
265
|
+
@SampleRate = params['SampleRate']
|
266
|
+
@Codec = params['Codec']
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
# TextToVoice返回参数结构体
|
271
|
+
class TextToVoiceResponse < TencentCloud::Common::AbstractModel
|
272
|
+
# @param Audio: base64编码的wav/mp3音频数据
|
273
|
+
# @type Audio: String
|
274
|
+
# @param SessionId: 一次请求对应一个SessionId
|
275
|
+
# @type SessionId: String
|
276
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
277
|
+
# @type RequestId: String
|
278
|
+
|
279
|
+
attr_accessor :Audio, :SessionId, :RequestId
|
280
|
+
|
281
|
+
def initialize(audio=nil, sessionid=nil, requestid=nil)
|
282
|
+
@Audio = audio
|
283
|
+
@SessionId = sessionid
|
284
|
+
@RequestId = requestid
|
285
|
+
end
|
286
|
+
|
287
|
+
def deserialize(params)
|
288
|
+
@Audio = params['Audio']
|
289
|
+
@SessionId = params['SessionId']
|
290
|
+
@RequestId = params['RequestId']
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
end
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tencentcloud-sdk-aai
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.200
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tencent Cloud
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-11-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: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.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
|
+
AAI.
|
30
|
+
email:
|
31
|
+
- tencentcloudapi@tencent.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- lib/VERSION
|
37
|
+
- lib/tencentcloud-sdk-aai.rb
|
38
|
+
- lib/v20180522/client.rb
|
39
|
+
- lib/v20180522/models.rb
|
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-aai
|
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.6.14
|
63
|
+
signing_key:
|
64
|
+
specification_version: 4
|
65
|
+
summary: Tencent Cloud SDK for Ruby - AAI
|
66
|
+
test_files: []
|