tencentcloud-sdk-trtc 3.0.1115 → 3.0.1122

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41641e4ea5026508abd16a9009d7c8d8873af3fb
4
- data.tar.gz: be1261817c9cd80fc54b1ba976e88731a67b5cfc
3
+ metadata.gz: f3eae43465cd8a58ce19c00a84cd4175330a5994
4
+ data.tar.gz: 301fcff735cd7351f6295ddcd93ed58a58d160e1
5
5
  SHA512:
6
- metadata.gz: 8e65ff7abfcbae384d812ca3770ed94c39c9cbb31e526a2195c8d88b6af4b96b75485ef4d8a973067129bff91e7da248493f06fcd200c1ae1043c077fee1ce62
7
- data.tar.gz: 5854270f9264ce57921a98bd2fe6fdd8e7ea174c7663820b516ef4f495dea8a7d581cbde13856acd1e4312ffee02b931e66dfe5fa41fc867ed5c6abf9e665dc0
6
+ metadata.gz: bec2a1d22109fee883f41d1ec39fb7464c0f4282992e2594b106cec8fd35ad882a30adb54304fd196b3c38d23d4b61b2ff78e8e47aee72d4e6300803291c7c43
7
+ data.tar.gz: a10b55244b88832a7605c59cc69d733cfe5e85480ebaf28fcedd81f2a47a4556717b6a13eca19536e390d8e619d35c9600ffb71eb337890072a4a02767b46fa0
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1115
1
+ 3.0.1122
@@ -1774,6 +1774,54 @@ module TencentCloud
1774
1774
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1775
1775
  end
1776
1776
 
1777
+ # 语音合成接口
1778
+
1779
+ # @param request: Request instance for TextToSpeech.
1780
+ # @type request: :class:`Tencentcloud::trtc::V20190722::TextToSpeechRequest`
1781
+ # @rtype: :class:`Tencentcloud::trtc::V20190722::TextToSpeechResponse`
1782
+ def TextToSpeech(request)
1783
+ body = send_request('TextToSpeech', request.serialize)
1784
+ response = JSON.parse(body)
1785
+ if response['Response'].key?('Error') == false
1786
+ model = TextToSpeechResponse.new
1787
+ model.deserialize(response['Response'])
1788
+ model
1789
+ else
1790
+ code = response['Response']['Error']['Code']
1791
+ message = response['Response']['Error']['Message']
1792
+ reqid = response['Response']['RequestId']
1793
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1794
+ end
1795
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1796
+ raise e
1797
+ rescue StandardError => e
1798
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1799
+ end
1800
+
1801
+ # SSE流式文本转语音
1802
+
1803
+ # @param request: Request instance for TextToSpeechSSE.
1804
+ # @type request: :class:`Tencentcloud::trtc::V20190722::TextToSpeechSSERequest`
1805
+ # @rtype: :class:`Tencentcloud::trtc::V20190722::TextToSpeechSSEResponse`
1806
+ def TextToSpeechSSE(request)
1807
+ body = send_request('TextToSpeechSSE', request.serialize)
1808
+ response = JSON.parse(body)
1809
+ if response['Response'].key?('Error') == false
1810
+ model = TextToSpeechSSEResponse.new
1811
+ model.deserialize(response['Response'])
1812
+ model
1813
+ else
1814
+ code = response['Response']['Error']['Code']
1815
+ message = response['Response']['Error']['Message']
1816
+ reqid = response['Response']['RequestId']
1817
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1818
+ end
1819
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1820
+ raise e
1821
+ rescue StandardError => e
1822
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1823
+ end
1824
+
1777
1825
  # 更新AIConversation参数
1778
1826
 
1779
1827
  # @param request: Request instance for UpdateAIConversation.
@@ -1872,6 +1920,30 @@ module TencentCloud
1872
1920
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1873
1921
  end
1874
1922
 
1923
+ # 声音克隆
1924
+
1925
+ # @param request: Request instance for VoiceClone.
1926
+ # @type request: :class:`Tencentcloud::trtc::V20190722::VoiceCloneRequest`
1927
+ # @rtype: :class:`Tencentcloud::trtc::V20190722::VoiceCloneResponse`
1928
+ def VoiceClone(request)
1929
+ body = send_request('VoiceClone', request.serialize)
1930
+ response = JSON.parse(body)
1931
+ if response['Response'].key?('Error') == false
1932
+ model = VoiceCloneResponse.new
1933
+ model.deserialize(response['Response'])
1934
+ model
1935
+ else
1936
+ code = response['Response']['Error']['Code']
1937
+ message = response['Response']['Error']['Message']
1938
+ reqid = response['Response']['RequestId']
1939
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1940
+ end
1941
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1942
+ raise e
1943
+ rescue StandardError => e
1944
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1945
+ end
1946
+
1875
1947
 
1876
1948
  end
1877
1949
  end
@@ -271,6 +271,22 @@ module TencentCloud
271
271
  end
272
272
  end
273
273
 
274
+ # TTS音频输出的格式
275
+ class AudioFormat < TencentCloud::Common::AbstractModel
276
+ # @param Format: 生成的音频格式,默认pcm,目前支持的格式列表:[pcm]。
277
+ # @type Format: String
278
+
279
+ attr_accessor :Format
280
+
281
+ def initialize(format=nil)
282
+ @Format = format
283
+ end
284
+
285
+ def deserialize(params)
286
+ @Format = params['Format']
287
+ end
288
+ end
289
+
274
290
  # 录制音频转码参数。
275
291
  class AudioParams < TencentCloud::Common::AbstractModel
276
292
  # @param SampleRate: 音频采样率枚举值:(注意1 代表48000HZ, 2 代表44100HZ, 3 代表16000HZ)
@@ -6497,6 +6513,118 @@ module TencentCloud
6497
6513
  end
6498
6514
  end
6499
6515
 
6516
+ # TextToSpeech请求参数结构体
6517
+ class TextToSpeechRequest < TencentCloud::Common::AbstractModel
6518
+ # @param Text: 需要转语音的文字内容,长度范围:[1, 255]
6519
+ # @type Text: String
6520
+ # @param Voice: 文本转语音的声音配置
6521
+ # @type Voice: :class:`Tencentcloud::Trtc.v20190722.models.Voice`
6522
+ # @param SdkAppId: TRTC的SdkAppId
6523
+ # @type SdkAppId: Integer
6524
+ # @param AudioFormat: 文本转语音的输出音频的格式
6525
+ # @type AudioFormat: :class:`Tencentcloud::Trtc.v20190722.models.AudioFormat`
6526
+ # @param APIKey: TTS的API密钥
6527
+ # @type APIKey: String
6528
+
6529
+ attr_accessor :Text, :Voice, :SdkAppId, :AudioFormat, :APIKey
6530
+
6531
+ def initialize(text=nil, voice=nil, sdkappid=nil, audioformat=nil, apikey=nil)
6532
+ @Text = text
6533
+ @Voice = voice
6534
+ @SdkAppId = sdkappid
6535
+ @AudioFormat = audioformat
6536
+ @APIKey = apikey
6537
+ end
6538
+
6539
+ def deserialize(params)
6540
+ @Text = params['Text']
6541
+ unless params['Voice'].nil?
6542
+ @Voice = Voice.new
6543
+ @Voice.deserialize(params['Voice'])
6544
+ end
6545
+ @SdkAppId = params['SdkAppId']
6546
+ unless params['AudioFormat'].nil?
6547
+ @AudioFormat = AudioFormat.new
6548
+ @AudioFormat.deserialize(params['AudioFormat'])
6549
+ end
6550
+ @APIKey = params['APIKey']
6551
+ end
6552
+ end
6553
+
6554
+ # TextToSpeech返回参数结构体
6555
+ class TextToSpeechResponse < TencentCloud::Common::AbstractModel
6556
+ # @param Audio: Base64编码的音频数据
6557
+ # @type Audio: String
6558
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
6559
+ # @type RequestId: String
6560
+
6561
+ attr_accessor :Audio, :RequestId
6562
+
6563
+ def initialize(audio=nil, requestid=nil)
6564
+ @Audio = audio
6565
+ @RequestId = requestid
6566
+ end
6567
+
6568
+ def deserialize(params)
6569
+ @Audio = params['Audio']
6570
+ @RequestId = params['RequestId']
6571
+ end
6572
+ end
6573
+
6574
+ # TextToSpeechSSE请求参数结构体
6575
+ class TextToSpeechSSERequest < TencentCloud::Common::AbstractModel
6576
+ # @param Text: 需要转语音的文字内容,长度范围:[1, 255]
6577
+ # @type Text: String
6578
+ # @param Voice: 文本转语音的声音配置
6579
+ # @type Voice: :class:`Tencentcloud::Trtc.v20190722.models.Voice`
6580
+ # @param SdkAppId: TRTC的SdkAppId
6581
+ # @type SdkAppId: Integer
6582
+ # @param AudioFormat: 文本转语音的输出音频的格式
6583
+ # @type AudioFormat: :class:`Tencentcloud::Trtc.v20190722.models.AudioFormat`
6584
+ # @param APIKey: TTS的API密钥
6585
+ # @type APIKey: String
6586
+
6587
+ attr_accessor :Text, :Voice, :SdkAppId, :AudioFormat, :APIKey
6588
+
6589
+ def initialize(text=nil, voice=nil, sdkappid=nil, audioformat=nil, apikey=nil)
6590
+ @Text = text
6591
+ @Voice = voice
6592
+ @SdkAppId = sdkappid
6593
+ @AudioFormat = audioformat
6594
+ @APIKey = apikey
6595
+ end
6596
+
6597
+ def deserialize(params)
6598
+ @Text = params['Text']
6599
+ unless params['Voice'].nil?
6600
+ @Voice = Voice.new
6601
+ @Voice.deserialize(params['Voice'])
6602
+ end
6603
+ @SdkAppId = params['SdkAppId']
6604
+ unless params['AudioFormat'].nil?
6605
+ @AudioFormat = AudioFormat.new
6606
+ @AudioFormat.deserialize(params['AudioFormat'])
6607
+ end
6608
+ @APIKey = params['APIKey']
6609
+ end
6610
+ end
6611
+
6612
+ # TextToSpeechSSE返回参数结构体
6613
+ class TextToSpeechSSEResponse < TencentCloud::Common::AbstractModel
6614
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
6615
+ # @type RequestId: String
6616
+
6617
+ attr_accessor :RequestId
6618
+
6619
+ def initialize(requestid=nil)
6620
+ @RequestId = requestid
6621
+ end
6622
+
6623
+ def deserialize(params)
6624
+ @RequestId = params['RequestId']
6625
+ end
6626
+ end
6627
+
6500
6628
  # 返回的质量数据,时间:值
6501
6629
  class TimeValue < TencentCloud::Common::AbstractModel
6502
6630
  # @param Time: 时间,unix时间戳(1590065877s)
@@ -7045,6 +7173,74 @@ module TencentCloud
7045
7173
  end
7046
7174
  end
7047
7175
 
7176
+ # TTS的声音参数
7177
+ class Voice < TencentCloud::Common::AbstractModel
7178
+ # @param VoiceId: TTS的声音的ID
7179
+ # @type VoiceId: String
7180
+
7181
+ attr_accessor :VoiceId
7182
+
7183
+ def initialize(voiceid=nil)
7184
+ @VoiceId = voiceid
7185
+ end
7186
+
7187
+ def deserialize(params)
7188
+ @VoiceId = params['VoiceId']
7189
+ end
7190
+ end
7191
+
7192
+ # VoiceClone请求参数结构体
7193
+ class VoiceCloneRequest < TencentCloud::Common::AbstractModel
7194
+ # @param SdkAppId: TRTC的SdkAppId
7195
+ # @type SdkAppId: Integer
7196
+ # @param APIKey: TTS的API密钥
7197
+ # @type APIKey: String
7198
+ # @param VoiceName: 声音克隆的名字
7199
+ # @type VoiceName: String
7200
+ # @param PromptAudio: 声音克隆的参考音频,必须为16k单声道的wav的base64字符串, 长度在5秒~12秒之间
7201
+ # @type PromptAudio: String
7202
+ # @param PromptText: 声音克隆的参考文本,为参考音频对应的文字。
7203
+ # @type PromptText: String
7204
+
7205
+ attr_accessor :SdkAppId, :APIKey, :VoiceName, :PromptAudio, :PromptText
7206
+
7207
+ def initialize(sdkappid=nil, apikey=nil, voicename=nil, promptaudio=nil, prompttext=nil)
7208
+ @SdkAppId = sdkappid
7209
+ @APIKey = apikey
7210
+ @VoiceName = voicename
7211
+ @PromptAudio = promptaudio
7212
+ @PromptText = prompttext
7213
+ end
7214
+
7215
+ def deserialize(params)
7216
+ @SdkAppId = params['SdkAppId']
7217
+ @APIKey = params['APIKey']
7218
+ @VoiceName = params['VoiceName']
7219
+ @PromptAudio = params['PromptAudio']
7220
+ @PromptText = params['PromptText']
7221
+ end
7222
+ end
7223
+
7224
+ # VoiceClone返回参数结构体
7225
+ class VoiceCloneResponse < TencentCloud::Common::AbstractModel
7226
+ # @param VoiceId: 克隆出的音色ID,可以用此id进行语音合成
7227
+ # @type VoiceId: String
7228
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
7229
+ # @type RequestId: String
7230
+
7231
+ attr_accessor :VoiceId, :RequestId
7232
+
7233
+ def initialize(voiceid=nil, requestid=nil)
7234
+ @VoiceId = voiceid
7235
+ @RequestId = requestid
7236
+ end
7237
+
7238
+ def deserialize(params)
7239
+ @VoiceId = params['VoiceId']
7240
+ @RequestId = params['RequestId']
7241
+ end
7242
+ end
7243
+
7048
7244
  # 声纹配置参数
7049
7245
  class VoicePrint < TencentCloud::Common::AbstractModel
7050
7246
  # @param Mode: 默认为0,表示不启用声纹。1表示启用声纹,此时需要填写voiceprint id。
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-trtc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1115
4
+ version: 3.0.1122
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-08-01 00:00:00.000000000 Z
11
+ date: 2025-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common