首次推送

This commit is contained in:
lym
2026-03-09 00:13:46 +08:00
commit b19613bb31
13974 changed files with 2767735 additions and 0 deletions

View File

@@ -0,0 +1,220 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Aai.V20180522
{
using Newtonsoft.Json;
using System.Threading.Tasks;
using TencentCloud.Common;
using TencentCloud.Common.Profile;
using TencentCloud.Aai.V20180522.Models;
public class AaiClient : AbstractClient{
private const string endpoint = "aai.tencentcloudapi.com";
private const string version = "2018-05-22";
/// <summary>
/// Client constructor.
/// </summary>
/// <param name="credential">Credentials.</param>
/// <param name="region">Region name, such as "ap-guangzhou".</param>
public AaiClient(Credential credential, string region)
: this(credential, region, new ClientProfile())
{
}
/// <summary>
/// Client Constructor.
/// </summary>
/// <param name="credential">Credentials.</param>
/// <param name="region">Region name, such as "ap-guangzhou".</param>
/// <param name="profile">Client profiles.</param>
public AaiClient(Credential credential, string region, ClientProfile profile)
: base(endpoint, version, credential, region, profile)
{
}
/// <summary>
/// 提供基于文本的基础聊天能力,可以让您的应用快速拥有具备深度语义理解的机器聊天功能。
/// </summary>
/// <param name="req"><see cref="ChatRequest"/></param>
/// <returns><see cref="ChatResponse"/></returns>
public async Task<ChatResponse> Chat(ChatRequest req)
{
JsonResponseModel<ChatResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "Chat");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<ChatResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 提供基于文本的基础聊天能力,可以让您的应用快速拥有具备深度语义理解的机器聊天功能。
/// </summary>
/// <param name="req"><see cref="ChatRequest"/></param>
/// <returns><see cref="ChatResponse"/></returns>
public ChatResponse ChatSync(ChatRequest req)
{
JsonResponseModel<ChatResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "Chat");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<ChatResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 识别60s内的短语音当音频放在请求body中传输时整个请求大小不能超过600KB当音频以url方式传输时音频时长不可超过60s。所有请求参数放在post的body中采用x-www-form-urlencoded数据转换成一个字符串name1=value1&name2=value2…进行urlencode后编码传输。现暂只支持中文普通话识别支持识别8k(16k)的16bit的mp3或者wav音频。
/// </summary>
/// <param name="req"><see cref="SentenceRecognitionRequest"/></param>
/// <returns><see cref="SentenceRecognitionResponse"/></returns>
public async Task<SentenceRecognitionResponse> SentenceRecognition(SentenceRecognitionRequest req)
{
JsonResponseModel<SentenceRecognitionResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "SentenceRecognition");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentenceRecognitionResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 识别60s内的短语音当音频放在请求body中传输时整个请求大小不能超过600KB当音频以url方式传输时音频时长不可超过60s。所有请求参数放在post的body中采用x-www-form-urlencoded数据转换成一个字符串name1=value1&name2=value2…进行urlencode后编码传输。现暂只支持中文普通话识别支持识别8k(16k)的16bit的mp3或者wav音频。
/// </summary>
/// <param name="req"><see cref="SentenceRecognitionRequest"/></param>
/// <returns><see cref="SentenceRecognitionResponse"/></returns>
public SentenceRecognitionResponse SentenceRecognitionSync(SentenceRecognitionRequest req)
{
JsonResponseModel<SentenceRecognitionResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "SentenceRecognition");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentenceRecognitionResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 该接口是实时流式识别可同时返回语音识别文本及翻译文本当前仅支持中文和英文。该接口可配合同传windows客户端提供会议现场同传服务。
/// </summary>
/// <param name="req"><see cref="SimultaneousInterpretingRequest"/></param>
/// <returns><see cref="SimultaneousInterpretingResponse"/></returns>
public async Task<SimultaneousInterpretingResponse> SimultaneousInterpreting(SimultaneousInterpretingRequest req)
{
JsonResponseModel<SimultaneousInterpretingResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "SimultaneousInterpreting");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SimultaneousInterpretingResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 该接口是实时流式识别可同时返回语音识别文本及翻译文本当前仅支持中文和英文。该接口可配合同传windows客户端提供会议现场同传服务。
/// </summary>
/// <param name="req"><see cref="SimultaneousInterpretingRequest"/></param>
/// <returns><see cref="SimultaneousInterpretingResponse"/></returns>
public SimultaneousInterpretingResponse SimultaneousInterpretingSync(SimultaneousInterpretingRequest req)
{
JsonResponseModel<SimultaneousInterpretingResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "SimultaneousInterpreting");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SimultaneousInterpretingResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 腾讯云语音合成技术TTS可以将任意文本转化为语音实现让机器和应用张口说话。
/// 腾讯TTS技术可以应用到很多场景比如移动APP语音播报新闻智能设备语音提醒依靠网上现有节目或少量录音快速合成明星语音降低邀约成本支持车载导航语音合成的个性化语音播报。
/// 内测期间免费使用。
/// </summary>
/// <param name="req"><see cref="TextToVoiceRequest"/></param>
/// <returns><see cref="TextToVoiceResponse"/></returns>
public async Task<TextToVoiceResponse> TextToVoice(TextToVoiceRequest req)
{
JsonResponseModel<TextToVoiceResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "TextToVoice");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<TextToVoiceResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 腾讯云语音合成技术TTS可以将任意文本转化为语音实现让机器和应用张口说话。
/// 腾讯TTS技术可以应用到很多场景比如移动APP语音播报新闻智能设备语音提醒依靠网上现有节目或少量录音快速合成明星语音降低邀约成本支持车载导航语音合成的个性化语音播报。
/// 内测期间免费使用。
/// </summary>
/// <param name="req"><see cref="TextToVoiceRequest"/></param>
/// <returns><see cref="TextToVoiceResponse"/></returns>
public TextToVoiceResponse TextToVoiceSync(TextToVoiceRequest req)
{
JsonResponseModel<TextToVoiceResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "TextToVoice");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<TextToVoiceResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
}
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Aai.V20180522.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class ChatRequest : AbstractModel
{
/// <summary>
/// 聊天输入文本
/// </summary>
[JsonProperty("Text")]
public string Text{ get; set; }
/// <summary>
/// 腾讯云项目 ID可填 0总长度不超过 1024 字节。
/// </summary>
[JsonProperty("ProjectId")]
public long? ProjectId{ get; set; }
/// <summary>
/// json格式比如 {"id":"test","gender":"male"}。记录当前与机器人交互的用户id非必须但强烈建议传入否则多轮聊天功能会受影响
/// </summary>
[JsonProperty("User")]
public string User{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Text", this.Text);
this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.SetParamSimple(map, prefix + "User", this.User);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Aai.V20180522.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class ChatResponse : AbstractModel
{
/// <summary>
/// 聊天输出文本
/// </summary>
[JsonProperty("Answer")]
public string Answer{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Answer", this.Answer);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,99 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Aai.V20180522.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SentenceRecognitionRequest : AbstractModel
{
/// <summary>
/// 腾讯云项目 ID可填 0总长度不超过 1024 字节。
/// </summary>
[JsonProperty("ProjectId")]
public ulong? ProjectId{ get; set; }
/// <summary>
/// 子服务类型。2一句话识别。
/// </summary>
[JsonProperty("SubServiceType")]
public ulong? SubServiceType{ get; set; }
/// <summary>
/// 引擎类型。8k电话 8k 通用模型16k16k 通用模型。只支持单声道音频识别。
/// </summary>
[JsonProperty("EngSerViceType")]
public string EngSerViceType{ get; set; }
/// <summary>
/// 语音数据来源。0语音 URL1语音数据post body
/// </summary>
[JsonProperty("SourceType")]
public ulong? SourceType{ get; set; }
/// <summary>
/// 识别音频的音频格式支持mp3,wav
/// </summary>
[JsonProperty("VoiceFormat")]
public string VoiceFormat{ get; set; }
/// <summary>
/// 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
/// </summary>
[JsonProperty("UsrAudioKey")]
public string UsrAudioKey{ get; set; }
/// <summary>
/// 语音 URL公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填URL 的长度大于 0小于 2048需进行urlencode编码。音频时间长度要小于60s。
/// </summary>
[JsonProperty("Url")]
public string Url{ get; set; }
/// <summary>
/// 语音数据当SourceType 值为1时必须填写为0可不写。要base64编码(采用python语言时注意读取文件应该为string而不是byte以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。音频数据要小于600kB。
/// </summary>
[JsonProperty("Data")]
public string Data{ get; set; }
/// <summary>
/// 数据长度,当 SourceType 值为1时必须填写为0可不写此数据长度为数据未进行base64编码时的数据长度
/// </summary>
[JsonProperty("DataLen")]
public long? DataLen{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.SetParamSimple(map, prefix + "SubServiceType", this.SubServiceType);
this.SetParamSimple(map, prefix + "EngSerViceType", this.EngSerViceType);
this.SetParamSimple(map, prefix + "SourceType", this.SourceType);
this.SetParamSimple(map, prefix + "VoiceFormat", this.VoiceFormat);
this.SetParamSimple(map, prefix + "UsrAudioKey", this.UsrAudioKey);
this.SetParamSimple(map, prefix + "Url", this.Url);
this.SetParamSimple(map, prefix + "Data", this.Data);
this.SetParamSimple(map, prefix + "DataLen", this.DataLen);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Aai.V20180522.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SentenceRecognitionResponse : AbstractModel
{
/// <summary>
/// 识别结果。
/// </summary>
[JsonProperty("Result")]
public string Result{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Result", this.Result);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,120 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Aai.V20180522.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SimultaneousInterpretingRequest : AbstractModel
{
/// <summary>
/// 腾讯云项目 ID可填 0总长度不超过 1024 字节。
/// </summary>
[JsonProperty("ProjectId")]
public ulong? ProjectId{ get; set; }
/// <summary>
/// 子服务类型。0离线语音识别。1实时流式识别2一句话识别。3同传。
/// </summary>
[JsonProperty("SubServiceType")]
public ulong? SubServiceType{ get; set; }
/// <summary>
/// 识别引擎类型。8k_zh 8k 中文会场模型16k_zh16k 中文会场模型8k_en 8k 英文会场模型16k_en16k 英文会场模型。当前仅支持16K。
/// </summary>
[JsonProperty("RecEngineModelType")]
public string RecEngineModelType{ get; set; }
/// <summary>
/// 语音数据要base64编码。
/// </summary>
[JsonProperty("Data")]
public string Data{ get; set; }
/// <summary>
/// 数据长度。
/// </summary>
[JsonProperty("DataLen")]
public ulong? DataLen{ get; set; }
/// <summary>
/// 声音id标识一句话。
/// </summary>
[JsonProperty("VoiceId")]
public string VoiceId{ get; set; }
/// <summary>
/// 是否是一句话的结束。
/// </summary>
[JsonProperty("IsEnd")]
public ulong? IsEnd{ get; set; }
/// <summary>
/// 声音编码的格式1:pcm4:speex6:silk默认为1。
/// </summary>
[JsonProperty("VoiceFormat")]
public ulong? VoiceFormat{ get; set; }
/// <summary>
/// 是否需要翻译结果1表示需要翻译0是不需要。
/// </summary>
[JsonProperty("OpenTranslate")]
public ulong? OpenTranslate{ get; set; }
/// <summary>
/// 如果需要翻译表示源语言类型可取值zhen。
/// </summary>
[JsonProperty("SourceLanguage")]
public string SourceLanguage{ get; set; }
/// <summary>
/// 如果需要翻译表示目标语言类型可取值zhen。
/// </summary>
[JsonProperty("TargetLanguage")]
public string TargetLanguage{ get; set; }
/// <summary>
/// 表明当前语音分片的索引从0开始
/// </summary>
[JsonProperty("Seq")]
public ulong? Seq{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.SetParamSimple(map, prefix + "SubServiceType", this.SubServiceType);
this.SetParamSimple(map, prefix + "RecEngineModelType", this.RecEngineModelType);
this.SetParamSimple(map, prefix + "Data", this.Data);
this.SetParamSimple(map, prefix + "DataLen", this.DataLen);
this.SetParamSimple(map, prefix + "VoiceId", this.VoiceId);
this.SetParamSimple(map, prefix + "IsEnd", this.IsEnd);
this.SetParamSimple(map, prefix + "VoiceFormat", this.VoiceFormat);
this.SetParamSimple(map, prefix + "OpenTranslate", this.OpenTranslate);
this.SetParamSimple(map, prefix + "SourceLanguage", this.SourceLanguage);
this.SetParamSimple(map, prefix + "TargetLanguage", this.TargetLanguage);
this.SetParamSimple(map, prefix + "Seq", this.Seq);
}
}
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Aai.V20180522.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SimultaneousInterpretingResponse : AbstractModel
{
/// <summary>
/// 语音识别的结果
/// </summary>
[JsonProperty("AsrText")]
public string AsrText{ get; set; }
/// <summary>
/// 机器翻译的结果
/// </summary>
[JsonProperty("NmtText")]
public string NmtText{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "AsrText", this.AsrText);
this.SetParamSimple(map, prefix + "NmtText", this.NmtText);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,108 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Aai.V20180522.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class TextToVoiceRequest : AbstractModel
{
/// <summary>
/// 合成语音的源文本按UTF-8编码统一计算。
/// 中文最大支持100个汉字全角标点符号算一个汉字英文最大支持400个字母半角标点符号算一个字母。包含空格等字符时需要url encode再传输。
/// </summary>
[JsonProperty("Text")]
public string Text{ get; set; }
/// <summary>
/// 一次请求对应一个SessionId会原样返回建议传入类似于uuid的字符串防止重复。
/// </summary>
[JsonProperty("SessionId")]
public string SessionId{ get; set; }
/// <summary>
/// 模型类型1-默认模型。
/// </summary>
[JsonProperty("ModelType")]
public long? ModelType{ get; set; }
/// <summary>
/// 音量大小,范围:[010]分别对应11个等级的音量默认为0代表正常音量。没有静音选项。
/// 输入除以上整数之外的其他参数不生效,按默认值处理。
/// </summary>
[JsonProperty("Volume")]
public float? Volume{ get; set; }
/// <summary>
/// 语速,范围:[-22],分别对应不同语速:<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>输入除以上整数之外的其他参数不生效,按默认值处理。
/// </summary>
[JsonProperty("Speed")]
public float? Speed{ get; set; }
/// <summary>
/// 项目id用户自定义默认为0。
/// </summary>
[JsonProperty("ProjectId")]
public long? ProjectId{ get; set; }
/// <summary>
/// 音色<li>0-亲和女声(默认)</li><li>1-亲和男声</li><li>2-成熟男声</li><li>3-活力男声</li><li>4-温暖女声</li><li>5-情感女声</li><li>6-情感男声</li>
/// </summary>
[JsonProperty("VoiceType")]
public long? VoiceType{ get; set; }
/// <summary>
/// 主语言类型:<li>1-中文(默认)</li><li>2-英文</li>
/// </summary>
[JsonProperty("PrimaryLanguage")]
public ulong? PrimaryLanguage{ get; set; }
/// <summary>
/// 音频采样率:<li>1600016k默认</li><li>80008k</li>
/// </summary>
[JsonProperty("SampleRate")]
public ulong? SampleRate{ get; set; }
/// <summary>
/// 返回音频格式可取值wav默认mp3
/// </summary>
[JsonProperty("Codec")]
public string Codec{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Text", this.Text);
this.SetParamSimple(map, prefix + "SessionId", this.SessionId);
this.SetParamSimple(map, prefix + "ModelType", this.ModelType);
this.SetParamSimple(map, prefix + "Volume", this.Volume);
this.SetParamSimple(map, prefix + "Speed", this.Speed);
this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.SetParamSimple(map, prefix + "VoiceType", this.VoiceType);
this.SetParamSimple(map, prefix + "PrimaryLanguage", this.PrimaryLanguage);
this.SetParamSimple(map, prefix + "SampleRate", this.SampleRate);
this.SetParamSimple(map, prefix + "Codec", this.Codec);
}
}
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Aai.V20180522.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class TextToVoiceResponse : AbstractModel
{
/// <summary>
/// base64编码的wav/mp3音频数据
/// </summary>
[JsonProperty("Audio")]
public string Audio{ get; set; }
/// <summary>
/// 一次请求对应一个SessionId
/// </summary>
[JsonProperty("SessionId")]
public string SessionId{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Audio", this.Audio);
this.SetParamSimple(map, prefix + "SessionId", this.SessionId);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}