tencentcloud-sdk-trtc 3.0.860 → 3.0.862

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: b96e4f6d1a60494fdd4fa7edf2d356258535cb68
4
- data.tar.gz: 187b96325199543f82459a5c952b938680f15a15
3
+ metadata.gz: c68d8b68060b24aa13af36fffd3f71873a11d32d
4
+ data.tar.gz: 916284cbd4af0d8d23511f6e743b314a344212a9
5
5
  SHA512:
6
- metadata.gz: f2ea5a68bffdcc36d1fb7214a1f13d066d93b7a8f05768f56dd4fa0e06a15aed31ec6ed4f8d63c86e1f5cab1dae5c2c133138112a16063b237407029197c8988
7
- data.tar.gz: a5750bf51c5f1c77edadcb4f47a66e7f6920d31592e89639eb6238a887d33802fce584e18f96cf310239461590c0a2432e2a402bf576e31ad31ca920453d6724
6
+ metadata.gz: 11f88be4547a3cdde6c698ef147a7bcdd0c8b6f59ea4d0a00e28885713c9282a8514f1f04fddfc5b470a286548b40c1055388ec8ed9a9b728c21e388107d7059
7
+ data.tar.gz: cfad79a02fb81a00b143dd63579e0611823db729527cfffeeb65f5b387e72ebc2969c16487d3a09f0e1553bc2b2df1a879f5b9f88156dbcc5ca7824b676a3f51
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.860
1
+ 3.0.862
@@ -136,6 +136,30 @@ module TencentCloud
136
136
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
137
137
  end
138
138
 
139
+ # 查询AI对话任务状态。
140
+
141
+ # @param request: Request instance for DescribeAIConversation.
142
+ # @type request: :class:`Tencentcloud::trtc::V20190722::DescribeAIConversationRequest`
143
+ # @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeAIConversationResponse`
144
+ def DescribeAIConversation(request)
145
+ body = send_request('DescribeAIConversation', request.serialize)
146
+ response = JSON.parse(body)
147
+ if response['Response'].key?('Error') == false
148
+ model = DescribeAIConversationResponse.new
149
+ model.deserialize(response['Response'])
150
+ model
151
+ else
152
+ code = response['Response']['Error']['Code']
153
+ message = response['Response']['Error']['Message']
154
+ reqid = response['Response']['RequestId']
155
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
156
+ end
157
+ rescue TencentCloud::Common::TencentCloudSDKException => e
158
+ raise e
159
+ rescue StandardError => e
160
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
161
+ end
162
+
139
163
  # 查询AI转录任务状态。
140
164
 
141
165
  # @param request: Request instance for DescribeAITranscription.
@@ -1007,6 +1031,30 @@ module TencentCloud
1007
1031
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1008
1032
  end
1009
1033
 
1034
+ # 启动一个任务,机器人将进入TRTC房间,与指定成员进行AI对话
1035
+
1036
+ # @param request: Request instance for StartAIConversation.
1037
+ # @type request: :class:`Tencentcloud::trtc::V20190722::StartAIConversationRequest`
1038
+ # @rtype: :class:`Tencentcloud::trtc::V20190722::StartAIConversationResponse`
1039
+ def StartAIConversation(request)
1040
+ body = send_request('StartAIConversation', request.serialize)
1041
+ response = JSON.parse(body)
1042
+ if response['Response'].key?('Error') == false
1043
+ model = StartAIConversationResponse.new
1044
+ model.deserialize(response['Response'])
1045
+ model
1046
+ else
1047
+ code = response['Response']['Error']['Code']
1048
+ message = response['Response']['Error']['Message']
1049
+ reqid = response['Response']['RequestId']
1050
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1051
+ end
1052
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1053
+ raise e
1054
+ rescue StandardError => e
1055
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1056
+ end
1057
+
1010
1058
  # 这个接口调用后,后台会启动转录机器人,实时进行语音识别并下发字幕和转录消息。
1011
1059
  # 转录机器人支持两种拉流方式,通过TranscriptionMode字段控制:
1012
1060
  # - 拉取全房间的流。
@@ -1330,6 +1378,30 @@ module TencentCloud
1330
1378
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1331
1379
  end
1332
1380
 
1381
+ # 停止AI对话任务
1382
+
1383
+ # @param request: Request instance for StopAIConversation.
1384
+ # @type request: :class:`Tencentcloud::trtc::V20190722::StopAIConversationRequest`
1385
+ # @rtype: :class:`Tencentcloud::trtc::V20190722::StopAIConversationResponse`
1386
+ def StopAIConversation(request)
1387
+ body = send_request('StopAIConversation', request.serialize)
1388
+ response = JSON.parse(body)
1389
+ if response['Response'].key?('Error') == false
1390
+ model = StopAIConversationResponse.new
1391
+ model.deserialize(response['Response'])
1392
+ model
1393
+ else
1394
+ code = response['Response']['Error']['Code']
1395
+ message = response['Response']['Error']['Message']
1396
+ reqid = response['Response']['RequestId']
1397
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1398
+ end
1399
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1400
+ raise e
1401
+ rescue StandardError => e
1402
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1403
+ end
1404
+
1333
1405
  # 停止AI转录任务。
1334
1406
 
1335
1407
  # @param request: Request instance for StopAITranscription.
@@ -77,6 +77,38 @@ module TencentCloud
77
77
  end
78
78
  end
79
79
 
80
+ # 机器人参数
81
+ class AgentConfig < TencentCloud::Common::AbstractModel
82
+ # @param UserId: 机器人的UserId,用于进房发起任务。【注意】这个UserId不能与当前房间内的主播观众[UserId](https://cloud.tencent.com/document/product/647/46351#userid)重复。如果一个房间发起多个任务时,机器人的UserId也不能相互重复,否则会中断前一个任务。需要保证机器人UserId在房间内唯一。
83
+ # 注意:此字段可能返回 null,表示取不到有效值。
84
+ # @type UserId: String
85
+ # @param UserSig: 机器人UserId对应的校验签名,即UserId和UserSig相当于机器人进房的登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
86
+ # 注意:此字段可能返回 null,表示取不到有效值。
87
+ # @type UserSig: String
88
+ # @param TargetUserId: 机器人拉流的UserId, 填写后,机器人会拉取该UserId的流进行实时处理
89
+ # 注意:此字段可能返回 null,表示取不到有效值。
90
+ # @type TargetUserId: String
91
+ # @param MaxIdleTime: 房间内推流用户全部退出后超过MaxIdleTime秒,后台自动关闭任务,默认值是60s。
92
+ # 注意:此字段可能返回 null,表示取不到有效值。
93
+ # @type MaxIdleTime: Integer
94
+
95
+ attr_accessor :UserId, :UserSig, :TargetUserId, :MaxIdleTime
96
+
97
+ def initialize(userid=nil, usersig=nil, targetuserid=nil, maxidletime=nil)
98
+ @UserId = userid
99
+ @UserSig = usersig
100
+ @TargetUserId = targetuserid
101
+ @MaxIdleTime = maxidletime
102
+ end
103
+
104
+ def deserialize(params)
105
+ @UserId = params['UserId']
106
+ @UserSig = params['UserSig']
107
+ @TargetUserId = params['TargetUserId']
108
+ @MaxIdleTime = params['MaxIdleTime']
109
+ end
110
+ end
111
+
80
112
  # 转推服务加入TRTC房间的机器人参数。
81
113
  class AgentParams < TencentCloud::Common::AbstractModel
82
114
  # @param UserId: 转推服务在TRTC房间使用的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),注意这个userId不能与其他TRTC或者转推服务等已经使用的UserId重复,建议可以把房间ID作为userId的标识的一部分。
@@ -482,6 +514,62 @@ module TencentCloud
482
514
  end
483
515
  end
484
516
 
517
+ # DescribeAIConversation请求参数结构体
518
+ class DescribeAIConversationRequest < TencentCloud::Common::AbstractModel
519
+ # @param SdkAppId: TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和开启转录任务的房间使用的SdkAppId相同。
520
+ # @type SdkAppId: Integer
521
+ # @param TaskId: 唯一标识一次任务。
522
+ # @type TaskId: String
523
+ # @param SessionId: 开启任务时填写的SessionId,如果没写则不返回。
524
+ # @type SessionId: String
525
+
526
+ attr_accessor :SdkAppId, :TaskId, :SessionId
527
+
528
+ def initialize(sdkappid=nil, taskid=nil, sessionid=nil)
529
+ @SdkAppId = sdkappid
530
+ @TaskId = taskid
531
+ @SessionId = sessionid
532
+ end
533
+
534
+ def deserialize(params)
535
+ @SdkAppId = params['SdkAppId']
536
+ @TaskId = params['TaskId']
537
+ @SessionId = params['SessionId']
538
+ end
539
+ end
540
+
541
+ # DescribeAIConversation返回参数结构体
542
+ class DescribeAIConversationResponse < TencentCloud::Common::AbstractModel
543
+ # @param StartTime: 任务开始时间。
544
+ # @type StartTime: String
545
+ # @param Status: 任务状态。有4个值:1、Idle表示任务未开始2、Preparing表示任务准备中3、InProgress表示任务正在运行4、Stopped表示任务已停止,正在清理资源中
546
+ # @type Status: String
547
+ # @param TaskId: 唯一标识一次任务。
548
+ # @type TaskId: String
549
+ # @param SessionId: 开启对话任务时填写的SessionId,如果没写则不返回。
550
+ # @type SessionId: String
551
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
552
+ # @type RequestId: String
553
+
554
+ attr_accessor :StartTime, :Status, :TaskId, :SessionId, :RequestId
555
+
556
+ def initialize(starttime=nil, status=nil, taskid=nil, sessionid=nil, requestid=nil)
557
+ @StartTime = starttime
558
+ @Status = status
559
+ @TaskId = taskid
560
+ @SessionId = sessionid
561
+ @RequestId = requestid
562
+ end
563
+
564
+ def deserialize(params)
565
+ @StartTime = params['StartTime']
566
+ @Status = params['Status']
567
+ @TaskId = params['TaskId']
568
+ @SessionId = params['SessionId']
569
+ @RequestId = params['RequestId']
570
+ end
571
+ end
572
+
485
573
  # DescribeAITranscription请求参数结构体
486
574
  class DescribeAITranscriptionRequest < TencentCloud::Common::AbstractModel
487
575
  # @param TaskId: 查询任务状态,不使用时传入空字符串。
@@ -3671,6 +3759,53 @@ module TencentCloud
3671
3759
  end
3672
3760
  end
3673
3761
 
3762
+ # 语音转文字参数
3763
+ class STTConfig < TencentCloud::Common::AbstractModel
3764
+ # @param Language: 语音识别支持的语言,默认是"zh" 中文
3765
+ # 目前全量支持的语言如下,等号左面是语言英文名,右面是Language字段需要填写的值,该值遵循[ISO639](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes):
3766
+ # 1. Chinese = "zh" # 中文
3767
+ # 2. Chinese_TW = "zh-TW" # 中国台湾
3768
+ # 3. Chinese_DIALECT = "zh-dialect" # 中国方言
3769
+ # 4. English = "en" # 英语
3770
+ # 5. Vietnamese = "vi" # 越南语
3771
+ # 6. Japanese = "ja" # 日语
3772
+ # 7. Korean = "ko" # 汉语
3773
+ # 8. Indonesia = "id" # 印度尼西亚语
3774
+ # 9. Thai = "th" # 泰语
3775
+ # 10. Portuguese = "pt" # 葡萄牙语
3776
+ # 11. Turkish = "tr" # 土耳其语
3777
+ # 12. Arabic = "ar" # 阿拉伯语
3778
+ # 13. Spanish = "es" # 西班牙语
3779
+ # 14. Hindi = "hi" # 印地语
3780
+ # 15. French = "fr" # 法语
3781
+ # 16. Malay = "ms" # 马来语
3782
+ # 17. Filipino = "fil" # 菲律宾语
3783
+ # 18. German = "de" # 德语
3784
+ # 19. Italian = "it" # 意大利语
3785
+ # 20. Russian = "ru" # 俄语
3786
+
3787
+ # 注意:
3788
+ # 如果缺少满足您需求的语言,请联系我们技术人员。
3789
+ # 注意:此字段可能返回 null,表示取不到有效值。
3790
+ # @type Language: String
3791
+ # @param AlternativeLanguage: 额外识别可能替代语言,最多3个, 需高级版支持,Language指定方言时,不允许设置该字段
3792
+
3793
+ # 注意:此字段可能返回 null,表示取不到有效值。
3794
+ # @type AlternativeLanguage: Array
3795
+
3796
+ attr_accessor :Language, :AlternativeLanguage
3797
+
3798
+ def initialize(language=nil, alternativelanguage=nil)
3799
+ @Language = language
3800
+ @AlternativeLanguage = alternativelanguage
3801
+ end
3802
+
3803
+ def deserialize(params)
3804
+ @Language = params['Language']
3805
+ @AlternativeLanguage = params['AlternativeLanguage']
3806
+ end
3807
+ end
3808
+
3674
3809
  # 历史规模信息
3675
3810
  class ScaleInfomation < TencentCloud::Common::AbstractModel
3676
3811
  # @param Time: 每天开始的时间
@@ -3872,6 +4007,78 @@ module TencentCloud
3872
4007
  end
3873
4008
  end
3874
4009
 
4010
+ # StartAIConversation请求参数结构体
4011
+ class StartAIConversationRequest < TencentCloud::Common::AbstractModel
4012
+ # @param SdkAppId: TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和开启转录任务的房间使用的SdkAppId相同。
4013
+ # @type SdkAppId: Integer
4014
+ # @param RoomId: TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),表示开启对话任务的房间号。
4015
+ # @type RoomId: String
4016
+ # @param AgentConfig: 机器人参数
4017
+ # @type AgentConfig: :class:`Tencentcloud::Trtc.v20190722.models.AgentConfig`
4018
+ # @param SessionId: 调用方传入的唯一Id,服务端用来去重。
4019
+ # @type SessionId: String
4020
+ # @param RoomIdType: TRTC房间号的类型,0代表数字房间号,1代表字符串房间号。不填默认是数字房间号。
4021
+ # @type RoomIdType: Integer
4022
+ # @param STTConfig: 语音识别配置。
4023
+ # @type STTConfig: :class:`Tencentcloud::Trtc.v20190722.models.STTConfig`
4024
+ # @param LLMConfig: LLM配置。需符合openai规范,为JSON字符串,示例如下:
4025
+ # <pre> { <br> &emsp; "LLMType": “大模型类型", // String 必填,目前固定为"openai" <br> &emsp; "Model": "您的模型名称", // String 必填,指定使用的模型<br> "APIKey": "您的OpenAI API密钥", // String 必填,相当于环境变量中的OPENAI_API_KEY<br> &emsp; "APIBaseUrl": "https://api.openai.com", // String 必填,OpenAI API的基础URL<br> &emsp; "Streaming": true // Boolean 非必填,指定是否使用流式传输<br> &emsp;} </pre>
4026
+ # @type LLMConfig: String
4027
+ # @param TTSConfig: TTS配置。目前支持腾讯云TTS, 为JSON字符串,示例如下:
4028
+ # <pre>{ <br> &emsp; "AppId": "您的应用ID", // String 必填<br> &emsp; "TTSType": "TTS类型", // String TTS类型, 固定为"tencent"<br> &emsp; "SercetId": "您的密钥ID", // String 必填<br> &emsp; "SercetKey": "您的密钥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; "PrimaryLanguage": "zh-CN" // String 非必填,主要语言<br> &emsp;}</pre>
4029
+ # @type TTSConfig: String
4030
+
4031
+ attr_accessor :SdkAppId, :RoomId, :AgentConfig, :SessionId, :RoomIdType, :STTConfig, :LLMConfig, :TTSConfig
4032
+
4033
+ def initialize(sdkappid=nil, roomid=nil, agentconfig=nil, sessionid=nil, roomidtype=nil, sttconfig=nil, llmconfig=nil, ttsconfig=nil)
4034
+ @SdkAppId = sdkappid
4035
+ @RoomId = roomid
4036
+ @AgentConfig = agentconfig
4037
+ @SessionId = sessionid
4038
+ @RoomIdType = roomidtype
4039
+ @STTConfig = sttconfig
4040
+ @LLMConfig = llmconfig
4041
+ @TTSConfig = ttsconfig
4042
+ end
4043
+
4044
+ def deserialize(params)
4045
+ @SdkAppId = params['SdkAppId']
4046
+ @RoomId = params['RoomId']
4047
+ unless params['AgentConfig'].nil?
4048
+ @AgentConfig = AgentConfig.new
4049
+ @AgentConfig.deserialize(params['AgentConfig'])
4050
+ end
4051
+ @SessionId = params['SessionId']
4052
+ @RoomIdType = params['RoomIdType']
4053
+ unless params['STTConfig'].nil?
4054
+ @STTConfig = STTConfig.new
4055
+ @STTConfig.deserialize(params['STTConfig'])
4056
+ end
4057
+ @LLMConfig = params['LLMConfig']
4058
+ @TTSConfig = params['TTSConfig']
4059
+ end
4060
+ end
4061
+
4062
+ # StartAIConversation返回参数结构体
4063
+ class StartAIConversationResponse < TencentCloud::Common::AbstractModel
4064
+ # @param TaskId: 用于唯一标识对话任务。
4065
+ # @type TaskId: String
4066
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4067
+ # @type RequestId: String
4068
+
4069
+ attr_accessor :TaskId, :RequestId
4070
+
4071
+ def initialize(taskid=nil, requestid=nil)
4072
+ @TaskId = taskid
4073
+ @RequestId = requestid
4074
+ end
4075
+
4076
+ def deserialize(params)
4077
+ @TaskId = params['TaskId']
4078
+ @RequestId = params['RequestId']
4079
+ end
4080
+ end
4081
+
3875
4082
  # StartAITranscription请求参数结构体
3876
4083
  class StartAITranscriptionRequest < TencentCloud::Common::AbstractModel
3877
4084
  # @param SdkAppId: TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和开启转录任务的房间使用的SdkAppId相同。
@@ -4338,6 +4545,38 @@ module TencentCloud
4338
4545
  end
4339
4546
  end
4340
4547
 
4548
+ # StopAIConversation请求参数结构体
4549
+ class StopAIConversationRequest < TencentCloud::Common::AbstractModel
4550
+ # @param TaskId: 唯一标识任务。
4551
+ # @type TaskId: String
4552
+
4553
+ attr_accessor :TaskId
4554
+
4555
+ def initialize(taskid=nil)
4556
+ @TaskId = taskid
4557
+ end
4558
+
4559
+ def deserialize(params)
4560
+ @TaskId = params['TaskId']
4561
+ end
4562
+ end
4563
+
4564
+ # StopAIConversation返回参数结构体
4565
+ class StopAIConversationResponse < TencentCloud::Common::AbstractModel
4566
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4567
+ # @type RequestId: String
4568
+
4569
+ attr_accessor :RequestId
4570
+
4571
+ def initialize(requestid=nil)
4572
+ @RequestId = requestid
4573
+ end
4574
+
4575
+ def deserialize(params)
4576
+ @RequestId = params['RequestId']
4577
+ end
4578
+ end
4579
+
4341
4580
  # StopAITranscription请求参数结构体
4342
4581
  class StopAITranscriptionRequest < TencentCloud::Common::AbstractModel
4343
4582
  # @param TaskId: 唯一标识转录任务。
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.860
4
+ version: 3.0.862
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-07-08 00:00:00.000000000 Z
11
+ date: 2024-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common