tencentcloud-sdk-trtc 3.0.1115 → 3.0.1123

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: 4bd190712763744dfa0a90d9cde36e574c0f9703
4
+ data.tar.gz: 4306bc9b602c2ac3edcc06f4525b6278702dc225
5
5
  SHA512:
6
- metadata.gz: 8e65ff7abfcbae384d812ca3770ed94c39c9cbb31e526a2195c8d88b6af4b96b75485ef4d8a973067129bff91e7da248493f06fcd200c1ae1043c077fee1ce62
7
- data.tar.gz: 5854270f9264ce57921a98bd2fe6fdd8e7ea174c7663820b516ef4f495dea8a7d581cbde13856acd1e4312ffee02b931e66dfe5fa41fc867ed5c6abf9e665dc0
6
+ metadata.gz: 8d9f0cca3c16aa53e8bdf28e34e527ae80dc58bdda8b34228dffa5a30901673af2188e883a355ec568febb532b18fee3698c4c7f76bdc19587d3673cdadebdb4
7
+ data.tar.gz: 66b66c117736e412d2d8df1b48069513e467b2cd847c208b447a9ed8f6c1d6e107769de3d2c1140915f797ea10d60d173b629783254dcb3ec4c25461bcb07ab6
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1115
1
+ 3.0.1123
@@ -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)
@@ -1308,6 +1324,7 @@ module TencentCloud
1308
1324
  # aCapEnergy:音频采集能量;
1309
1325
  # aPlayEnergy:音频播放能量;
1310
1326
  # rtt:SDK到云端的往返延时;单位: ms
1327
+ # bigvRecFps: 云端送达帧率;
1311
1328
  # @type DataType: Array
1312
1329
  # @param PageNumber: 当前页数,默认为0,
1313
1330
  # 注意:PageNumber和PageSize 其中一个不填均默认返回6条数据。
@@ -5446,7 +5463,7 @@ module TencentCloud
5446
5463
  # @param STTConfig: 语音识别配置。
5447
5464
  # @type STTConfig: :class:`Tencentcloud::Trtc.v20190722.models.STTConfig`
5448
5465
  # @param LLMConfig: LLM配置。需符合openai规范,为JSON字符串,示例如下:
5449
- # <pre> { <br> &emsp; "LLMType": "大模型类型", // String 必填,如:"openai" <br> &emsp; "Model": "您的模型名称", // String 必填,指定使用的模型<br> "APIKey": "您的LLM API密钥", // String 必填 <br> &emsp; "APIUrl": "https://api.xxx.com/chat/completions", // String 必填,LLM API访问的URL<br> &emsp; "Streaming": true // Boolean 非必填,指定是否使用流式传输<br> &emsp;} </pre>
5466
+ # <pre> { <br> &emsp; "LLMType": "大模型类型", // String 必填,如:"openai" <br> &emsp; "Model": "您的模型名称", // String 必填,指定使用的模型<br> "APIKey": "您的LLM API密钥", // String 必填 <br> &emsp; "APIUrl": "https://api.xxx.com/chat/completions", // String 必填,LLM API访问的URL<br> &emsp; "History": 10, // Integer 选填,设置 LLM 的上下文轮次,默认值为0,最大值50<br> &emsp; "HistoryMode": 1, // Integer 选填,1表示LLM上下文中的内容会和播放音频做同步,没有播放的音频对应的文本不会出现在上下文中。0表示不会做同步,默认值为0<br> &emsp; "Streaming": true // Boolean 非必填,指定是否使用流式传输<br> &emsp;} </pre>
5450
5467
  # @type LLMConfig: String
5451
5468
  # @param TTSConfig: TTS配置,为JSON字符串,腾讯云TTS示例如下: <pre>{ <br> &emsp; "AppId": 您的应用ID, // Integer 必填<br> &emsp; "TTSType": "TTS类型", // String TTS类型, 固定为"tencent"<br> &emsp; "SecretId": "您的密钥ID", // String 必填<br> &emsp; "SecretKey": "您的密钥Key", // String 必填<br> &emsp; "VoiceType": 101001, // Integer 必填,音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见<a href="https://cloud.tencent.com/document/product/1073/34112">语音合成计费概述</a>。完整的音色 ID 列表请参见<a href="https://cloud.tencent.com/document/product/1073/92668#55924b56-1a73-4663-a7a1-a8dd82d6e823">语音合成音色列表</a>。<br> &emsp; "Speed": 1.25, // Integer 非必填,语速,范围:[-2,6],分别对应不同语速: -2: 代表0.6倍 -1: 代表0.8倍 0: 代表1.0倍(默认) 1: 代表1.2倍 2: 代表1.5倍 6: 代表2.5倍 如果需要更细化的语速,可以保留小数点后 2 位,例如0.5/1.25/2.81等。 参数值与实际语速转换,可参考 <a href="https://sdk-1300466766.cos.ap-shanghai.myqcloud.com/sample/speed_sample.tar.gz">语速转换</a><br> &emsp; "Volume": 5, // Integer 非必填,音量大小,范围:[0,10],分别对应11个等级的音量,默认值为0,代表正常音量。<br> &emsp; "EmotionCategory": "angry", // String 非必填 控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、sajiao(撒娇)、disgusted(厌恶)、amaze(震惊)、peaceful(平静)、exciting(兴奋)、aojiao(傲娇)、jieshuo(解说)。<br> &emsp; "EmotionIntensity": 150 // Integer 非必填 控制合成音频情感程度,取值范围为 [50,200],默认为 100;只有 EmotionCategory 不为空时生效。<br> &emsp; }</pre>
5452
5469
  # @type TTSConfig: String
@@ -6497,6 +6514,118 @@ module TencentCloud
6497
6514
  end
6498
6515
  end
6499
6516
 
6517
+ # TextToSpeech请求参数结构体
6518
+ class TextToSpeechRequest < TencentCloud::Common::AbstractModel
6519
+ # @param Text: 需要转语音的文字内容,长度范围:[1, 255]
6520
+ # @type Text: String
6521
+ # @param Voice: 文本转语音的声音配置
6522
+ # @type Voice: :class:`Tencentcloud::Trtc.v20190722.models.Voice`
6523
+ # @param SdkAppId: TRTC的SdkAppId
6524
+ # @type SdkAppId: Integer
6525
+ # @param AudioFormat: 文本转语音的输出音频的格式
6526
+ # @type AudioFormat: :class:`Tencentcloud::Trtc.v20190722.models.AudioFormat`
6527
+ # @param APIKey: TTS的API密钥
6528
+ # @type APIKey: String
6529
+
6530
+ attr_accessor :Text, :Voice, :SdkAppId, :AudioFormat, :APIKey
6531
+
6532
+ def initialize(text=nil, voice=nil, sdkappid=nil, audioformat=nil, apikey=nil)
6533
+ @Text = text
6534
+ @Voice = voice
6535
+ @SdkAppId = sdkappid
6536
+ @AudioFormat = audioformat
6537
+ @APIKey = apikey
6538
+ end
6539
+
6540
+ def deserialize(params)
6541
+ @Text = params['Text']
6542
+ unless params['Voice'].nil?
6543
+ @Voice = Voice.new
6544
+ @Voice.deserialize(params['Voice'])
6545
+ end
6546
+ @SdkAppId = params['SdkAppId']
6547
+ unless params['AudioFormat'].nil?
6548
+ @AudioFormat = AudioFormat.new
6549
+ @AudioFormat.deserialize(params['AudioFormat'])
6550
+ end
6551
+ @APIKey = params['APIKey']
6552
+ end
6553
+ end
6554
+
6555
+ # TextToSpeech返回参数结构体
6556
+ class TextToSpeechResponse < TencentCloud::Common::AbstractModel
6557
+ # @param Audio: Base64编码的音频数据
6558
+ # @type Audio: String
6559
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
6560
+ # @type RequestId: String
6561
+
6562
+ attr_accessor :Audio, :RequestId
6563
+
6564
+ def initialize(audio=nil, requestid=nil)
6565
+ @Audio = audio
6566
+ @RequestId = requestid
6567
+ end
6568
+
6569
+ def deserialize(params)
6570
+ @Audio = params['Audio']
6571
+ @RequestId = params['RequestId']
6572
+ end
6573
+ end
6574
+
6575
+ # TextToSpeechSSE请求参数结构体
6576
+ class TextToSpeechSSERequest < TencentCloud::Common::AbstractModel
6577
+ # @param Text: 需要转语音的文字内容,长度范围:[1, 255]
6578
+ # @type Text: String
6579
+ # @param Voice: 文本转语音的声音配置
6580
+ # @type Voice: :class:`Tencentcloud::Trtc.v20190722.models.Voice`
6581
+ # @param SdkAppId: TRTC的SdkAppId
6582
+ # @type SdkAppId: Integer
6583
+ # @param AudioFormat: 文本转语音的输出音频的格式
6584
+ # @type AudioFormat: :class:`Tencentcloud::Trtc.v20190722.models.AudioFormat`
6585
+ # @param APIKey: TTS的API密钥
6586
+ # @type APIKey: String
6587
+
6588
+ attr_accessor :Text, :Voice, :SdkAppId, :AudioFormat, :APIKey
6589
+
6590
+ def initialize(text=nil, voice=nil, sdkappid=nil, audioformat=nil, apikey=nil)
6591
+ @Text = text
6592
+ @Voice = voice
6593
+ @SdkAppId = sdkappid
6594
+ @AudioFormat = audioformat
6595
+ @APIKey = apikey
6596
+ end
6597
+
6598
+ def deserialize(params)
6599
+ @Text = params['Text']
6600
+ unless params['Voice'].nil?
6601
+ @Voice = Voice.new
6602
+ @Voice.deserialize(params['Voice'])
6603
+ end
6604
+ @SdkAppId = params['SdkAppId']
6605
+ unless params['AudioFormat'].nil?
6606
+ @AudioFormat = AudioFormat.new
6607
+ @AudioFormat.deserialize(params['AudioFormat'])
6608
+ end
6609
+ @APIKey = params['APIKey']
6610
+ end
6611
+ end
6612
+
6613
+ # TextToSpeechSSE返回参数结构体
6614
+ class TextToSpeechSSEResponse < TencentCloud::Common::AbstractModel
6615
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
6616
+ # @type RequestId: String
6617
+
6618
+ attr_accessor :RequestId
6619
+
6620
+ def initialize(requestid=nil)
6621
+ @RequestId = requestid
6622
+ end
6623
+
6624
+ def deserialize(params)
6625
+ @RequestId = params['RequestId']
6626
+ end
6627
+ end
6628
+
6500
6629
  # 返回的质量数据,时间:值
6501
6630
  class TimeValue < TencentCloud::Common::AbstractModel
6502
6631
  # @param Time: 时间,unix时间戳(1590065877s)
@@ -7045,6 +7174,74 @@ module TencentCloud
7045
7174
  end
7046
7175
  end
7047
7176
 
7177
+ # TTS的声音参数
7178
+ class Voice < TencentCloud::Common::AbstractModel
7179
+ # @param VoiceId: TTS的声音的ID
7180
+ # @type VoiceId: String
7181
+
7182
+ attr_accessor :VoiceId
7183
+
7184
+ def initialize(voiceid=nil)
7185
+ @VoiceId = voiceid
7186
+ end
7187
+
7188
+ def deserialize(params)
7189
+ @VoiceId = params['VoiceId']
7190
+ end
7191
+ end
7192
+
7193
+ # VoiceClone请求参数结构体
7194
+ class VoiceCloneRequest < TencentCloud::Common::AbstractModel
7195
+ # @param SdkAppId: TRTC的SdkAppId
7196
+ # @type SdkAppId: Integer
7197
+ # @param APIKey: TTS的API密钥
7198
+ # @type APIKey: String
7199
+ # @param VoiceName: 声音克隆的名称, 只允许使用数字、字母、下划线,不能超过36位
7200
+ # @type VoiceName: String
7201
+ # @param PromptAudio: 声音克隆的参考音频,必须为16k单声道的wav的base64字符串, 长度在5秒~12秒之间
7202
+ # @type PromptAudio: String
7203
+ # @param PromptText: 声音克隆的参考文本,为参考音频对应的文字。
7204
+ # @type PromptText: String
7205
+
7206
+ attr_accessor :SdkAppId, :APIKey, :VoiceName, :PromptAudio, :PromptText
7207
+
7208
+ def initialize(sdkappid=nil, apikey=nil, voicename=nil, promptaudio=nil, prompttext=nil)
7209
+ @SdkAppId = sdkappid
7210
+ @APIKey = apikey
7211
+ @VoiceName = voicename
7212
+ @PromptAudio = promptaudio
7213
+ @PromptText = prompttext
7214
+ end
7215
+
7216
+ def deserialize(params)
7217
+ @SdkAppId = params['SdkAppId']
7218
+ @APIKey = params['APIKey']
7219
+ @VoiceName = params['VoiceName']
7220
+ @PromptAudio = params['PromptAudio']
7221
+ @PromptText = params['PromptText']
7222
+ end
7223
+ end
7224
+
7225
+ # VoiceClone返回参数结构体
7226
+ class VoiceCloneResponse < TencentCloud::Common::AbstractModel
7227
+ # @param VoiceId: 克隆出的音色ID,可以用此id进行语音合成
7228
+ # @type VoiceId: String
7229
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
7230
+ # @type RequestId: String
7231
+
7232
+ attr_accessor :VoiceId, :RequestId
7233
+
7234
+ def initialize(voiceid=nil, requestid=nil)
7235
+ @VoiceId = voiceid
7236
+ @RequestId = requestid
7237
+ end
7238
+
7239
+ def deserialize(params)
7240
+ @VoiceId = params['VoiceId']
7241
+ @RequestId = params['RequestId']
7242
+ end
7243
+ end
7244
+
7048
7245
  # 声纹配置参数
7049
7246
  class VoicePrint < TencentCloud::Common::AbstractModel
7050
7247
  # @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.1123
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-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common