109 lines
4.7 KiB
C#
109 lines
4.7 KiB
C#
|
|
/*
|
|||
|
|
* 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.Tts.V20190823.Models
|
|||
|
|
{
|
|||
|
|
using Newtonsoft.Json;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using TencentCloud.Common;
|
|||
|
|
|
|||
|
|
public class TextToVoiceRequest : AbstractModel
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 合成语音的源文本,按UTF-8编码统一计算。
|
|||
|
|
/// 中文最大支持110个汉字(全角标点符号算一个汉字);英文最大支持350个字母(半角标点符号算一个字母)。
|
|||
|
|
/// </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>
|
|||
|
|
/// 音量大小,范围:[0,10],分别对应11个等级的音量,默认为0,代表正常音量。没有静音选项。
|
|||
|
|
/// 输入除以上整数之外的其他参数不生效,按默认值处理。
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("Volume")]
|
|||
|
|
public float? Volume{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 语速,范围:[-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>如果需要更细化的语速,可以保留小数点后一位,例如0.5 1.1 1.8等。<br>
|
|||
|
|
/// </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>4-云小叶,温暖女声</li><li>5-云小欣,情感女声</li><li>6-云小龙,情感男声</li><li>7-云小曼,客服女声(新)</li><li>1000-智侠,情感男声(新)</li><li>1001-智瑜,情感女声(新)</li><li>1002-智聆,通用女声(新)</li><li>1003-智美,客服女声(新)</li><li>1050-WeJack,英文男声(新)</li><li>1051-WeRose,英文女声(新)</li>
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("VoiceType")]
|
|||
|
|
public long? VoiceType{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 主语言类型:<li>1-中文(默认)</li><li>2-英文</li>
|
|||
|
|
/// </summary>
|
|||
|
|
[JsonProperty("PrimaryLanguage")]
|
|||
|
|
public long? PrimaryLanguage{ get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 音频采样率:<li>16000:16k(默认)</li><li>8000:8k</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);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|