Class TextToVoiceRequest
- java.lang.Object
-
- com.tencentcloudapi.common.AbstractModel
-
- com.tencentcloudapi.tts.v20190823.models.TextToVoiceRequest
-
public class TextToVoiceRequest extends AbstractModel
-
-
Field Summary
-
Fields inherited from class com.tencentcloudapi.common.AbstractModel
header, skipSign
-
-
Constructor Summary
Constructors Constructor Description TextToVoiceRequest()TextToVoiceRequest(TextToVoiceRequest source)NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCodec()Get 返回音频格式,可取值:wav(默认),mp3,pcmStringgetEmotionCategory()Get 控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、撒娇(sajiao)、厌恶(disgusted)、震惊(amaze)、平静(peaceful)、兴奋(exciting)、傲娇(aojiao)、解说(jieshuo)LonggetEmotionIntensity()Get 控制合成音频情感程度,取值范围为[50,200],默认为100;只有EmotionCategory不为空时生效;BooleangetEnableSubtitle()Get 是否开启时间戳功能,默认为false。LonggetModelType()Get 模型类型,1-默认模型。LonggetPrimaryLanguage()Get 主语言类型:1-中文(默认)2-英文3-日文LonggetProjectId()Get 项目id,用户自定义,默认为0。LonggetSampleRate()Get 音频采样率: 24000:24k(部分音色支持,请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)) 16000:16k(默认) 8000:8kLonggetSegmentRate()Get 断句敏感阈值,默认值为:0,取值范围:[0,1,2]。该值越大越不容易断句,模型会更倾向于仅按照标点符号断句。此参数建议不要随意调整,可能会影响合成效果。StringgetSessionId()Get 一次请求对应一个SessionId,会原样返回,建议传入类似于uuid的字符串防止重复。FloatgetSpeed()Get 语速,范围:[-2,6],分别对应不同语速:-2代表0.6倍-1代表0.8倍0代表1.0倍(默认)1代表1.2倍2代表1.5倍6代表2.5倍如果需要更细化的语速,可以保留小数点后 2 位,例如0.5 1.1 1.8等。
参数值与实际语速转换,可参考[代码示例](https://sdk-1300466766.cos.ap-shanghai.myqcloud.com/sample/speed_sample.tar.gz)StringgetText()Get 合成语音的源文本,按UTF-8编码统一计算。 中文最大支持150个汉字(全角标点符号算一个汉字);英文最大支持500个字母(半角标点符号算一个字母)。LonggetVoiceType()Get 音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。FloatgetVolume()Get 音量大小,范围[0,10],对应音量大小。默认为0,代表正常音量,值越大音量越高。voidsetCodec(String Codec)Set 返回音频格式,可取值:wav(默认),mp3,pcmvoidsetEmotionCategory(String EmotionCategory)Set 控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、撒娇(sajiao)、厌恶(disgusted)、震惊(amaze)、平静(peaceful)、兴奋(exciting)、傲娇(aojiao)、解说(jieshuo)voidsetEmotionIntensity(Long EmotionIntensity)Set 控制合成音频情感程度,取值范围为[50,200],默认为100;只有EmotionCategory不为空时生效;voidsetEnableSubtitle(Boolean EnableSubtitle)Set 是否开启时间戳功能,默认为false。voidsetModelType(Long ModelType)Set 模型类型,1-默认模型。voidsetPrimaryLanguage(Long PrimaryLanguage)Set 主语言类型:1-中文(默认)2-英文3-日文voidsetProjectId(Long ProjectId)Set 项目id,用户自定义,默认为0。voidsetSampleRate(Long SampleRate)Set 音频采样率: 24000:24k(部分音色支持,请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)) 16000:16k(默认) 8000:8kvoidsetSegmentRate(Long SegmentRate)Set 断句敏感阈值,默认值为:0,取值范围:[0,1,2]。该值越大越不容易断句,模型会更倾向于仅按照标点符号断句。此参数建议不要随意调整,可能会影响合成效果。voidsetSessionId(String SessionId)Set 一次请求对应一个SessionId,会原样返回,建议传入类似于uuid的字符串防止重复。voidsetSpeed(Float Speed)Set 语速,范围:[-2,6],分别对应不同语速:-2代表0.6倍-1代表0.8倍0代表1.0倍(默认)1代表1.2倍2代表1.5倍6代表2.5倍如果需要更细化的语速,可以保留小数点后 2 位,例如0.5 1.1 1.8等。
参数值与实际语速转换,可参考[代码示例](https://sdk-1300466766.cos.ap-shanghai.myqcloud.com/sample/speed_sample.tar.gz)voidsetText(String Text)Set 合成语音的源文本,按UTF-8编码统一计算。 中文最大支持150个汉字(全角标点符号算一个汉字);英文最大支持500个字母(半角标点符号算一个字母)。voidsetVoiceType(Long VoiceType)Set 音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。voidsetVolume(Float Volume)Set 音量大小,范围[0,10],对应音量大小。默认为0,代表正常音量,值越大音量越高。voidtoMap(HashMap<String,String> map, String prefix)Internal implementation, normal users should not use it.-
Methods inherited from class com.tencentcloudapi.common.AbstractModel
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
-
-
-
-
Constructor Detail
-
TextToVoiceRequest
public TextToVoiceRequest()
-
TextToVoiceRequest
public TextToVoiceRequest(TextToVoiceRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
-
-
Method Detail
-
getText
public String getText()
Get 合成语音的源文本,按UTF-8编码统一计算。 中文最大支持150个汉字(全角标点符号算一个汉字);英文最大支持500个字母(半角标点符号算一个字母)。- Returns:
- Text 合成语音的源文本,按UTF-8编码统一计算。 中文最大支持150个汉字(全角标点符号算一个汉字);英文最大支持500个字母(半角标点符号算一个字母)。
-
setText
public void setText(String Text)
Set 合成语音的源文本,按UTF-8编码统一计算。 中文最大支持150个汉字(全角标点符号算一个汉字);英文最大支持500个字母(半角标点符号算一个字母)。- Parameters:
Text- 合成语音的源文本,按UTF-8编码统一计算。 中文最大支持150个汉字(全角标点符号算一个汉字);英文最大支持500个字母(半角标点符号算一个字母)。
-
getSessionId
public String getSessionId()
Get 一次请求对应一个SessionId,会原样返回,建议传入类似于uuid的字符串防止重复。- Returns:
- SessionId 一次请求对应一个SessionId,会原样返回,建议传入类似于uuid的字符串防止重复。
-
setSessionId
public void setSessionId(String SessionId)
Set 一次请求对应一个SessionId,会原样返回,建议传入类似于uuid的字符串防止重复。- Parameters:
SessionId- 一次请求对应一个SessionId,会原样返回,建议传入类似于uuid的字符串防止重复。
-
getVolume
public Float getVolume()
Get 音量大小,范围[0,10],对应音量大小。默认为0,代表正常音量,值越大音量越高。- Returns:
- Volume 音量大小,范围[0,10],对应音量大小。默认为0,代表正常音量,值越大音量越高。
-
setVolume
public void setVolume(Float Volume)
Set 音量大小,范围[0,10],对应音量大小。默认为0,代表正常音量,值越大音量越高。- Parameters:
Volume- 音量大小,范围[0,10],对应音量大小。默认为0,代表正常音量,值越大音量越高。
-
getSpeed
public Float getSpeed()
Get 语速,范围:[-2,6],分别对应不同语速:- -2代表0.6倍
- -1代表0.8倍
- 0代表1.0倍(默认)
- 1代表1.2倍
- 2代表1.5倍
- 6代表2.5倍
如果需要更细化的语速,可以保留小数点后 2 位,例如0.5 1.1 1.8等。
参数值与实际语速转换,可参考[代码示例](https://sdk-1300466766.cos.ap-shanghai.myqcloud.com/sample/speed_sample.tar.gz)- Returns:
- Speed 语速,范围:[-2,6],分别对应不同语速:
- -2代表0.6倍
- -1代表0.8倍
- 0代表1.0倍(默认)
- 1代表1.2倍
- 2代表1.5倍
- 6代表2.5倍
如果需要更细化的语速,可以保留小数点后 2 位,例如0.5 1.1 1.8等。
参数值与实际语速转换,可参考[代码示例](https://sdk-1300466766.cos.ap-shanghai.myqcloud.com/sample/speed_sample.tar.gz)
-
setSpeed
public void setSpeed(Float Speed)
Set 语速,范围:[-2,6],分别对应不同语速:- -2代表0.6倍
- -1代表0.8倍
- 0代表1.0倍(默认)
- 1代表1.2倍
- 2代表1.5倍
- 6代表2.5倍
如果需要更细化的语速,可以保留小数点后 2 位,例如0.5 1.1 1.8等。
参数值与实际语速转换,可参考[代码示例](https://sdk-1300466766.cos.ap-shanghai.myqcloud.com/sample/speed_sample.tar.gz)- Parameters:
Speed- 语速,范围:[-2,6],分别对应不同语速:- -2代表0.6倍
- -1代表0.8倍
- 0代表1.0倍(默认)
- 1代表1.2倍
- 2代表1.5倍
- 6代表2.5倍
如果需要更细化的语速,可以保留小数点后 2 位,例如0.5 1.1 1.8等。
参数值与实际语速转换,可参考[代码示例](https://sdk-1300466766.cos.ap-shanghai.myqcloud.com/sample/speed_sample.tar.gz)
-
getProjectId
public Long getProjectId()
Get 项目id,用户自定义,默认为0。- Returns:
- ProjectId 项目id,用户自定义,默认为0。
-
setProjectId
public void setProjectId(Long ProjectId)
Set 项目id,用户自定义,默认为0。- Parameters:
ProjectId- 项目id,用户自定义,默认为0。
-
getModelType
public Long getModelType()
Get 模型类型,1-默认模型。- Returns:
- ModelType 模型类型,1-默认模型。
-
setModelType
public void setModelType(Long ModelType)
Set 模型类型,1-默认模型。- Parameters:
ModelType- 模型类型,1-默认模型。
-
getVoiceType
public Long getVoiceType()
Get 音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。- Returns:
- VoiceType 音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。
-
setVoiceType
public void setVoiceType(Long VoiceType)
Set 音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。- Parameters:
VoiceType- 音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。
-
getPrimaryLanguage
public Long getPrimaryLanguage()
Get 主语言类型:- 1-中文(默认)
- 2-英文
- 3-日文
- Returns:
- PrimaryLanguage 主语言类型:
- 1-中文(默认)
- 2-英文
- 3-日文
-
setPrimaryLanguage
public void setPrimaryLanguage(Long PrimaryLanguage)
Set 主语言类型:- 1-中文(默认)
- 2-英文
- 3-日文
- Parameters:
PrimaryLanguage- 主语言类型:- 1-中文(默认)
- 2-英文
- 3-日文
-
getSampleRate
public Long getSampleRate()
Get 音频采样率:- 24000:24k(部分音色支持,请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668))
- 16000:16k(默认)
- 8000:8k
- Returns:
- SampleRate 音频采样率:
- 24000:24k(部分音色支持,请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668))
- 16000:16k(默认)
- 8000:8k
-
setSampleRate
public void setSampleRate(Long SampleRate)
Set 音频采样率:- 24000:24k(部分音色支持,请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668))
- 16000:16k(默认)
- 8000:8k
- Parameters:
SampleRate- 音频采样率:- 24000:24k(部分音色支持,请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668))
- 16000:16k(默认)
- 8000:8k
-
getCodec
public String getCodec()
Get 返回音频格式,可取值:wav(默认),mp3,pcm- Returns:
- Codec 返回音频格式,可取值:wav(默认),mp3,pcm
-
setCodec
public void setCodec(String Codec)
Set 返回音频格式,可取值:wav(默认),mp3,pcm- Parameters:
Codec- 返回音频格式,可取值:wav(默认),mp3,pcm
-
getEnableSubtitle
public Boolean getEnableSubtitle()
Get 是否开启时间戳功能,默认为false。- Returns:
- EnableSubtitle 是否开启时间戳功能,默认为false。
-
setEnableSubtitle
public void setEnableSubtitle(Boolean EnableSubtitle)
Set 是否开启时间戳功能,默认为false。- Parameters:
EnableSubtitle- 是否开启时间戳功能,默认为false。
-
getSegmentRate
public Long getSegmentRate()
Get 断句敏感阈值,默认值为:0,取值范围:[0,1,2]。该值越大越不容易断句,模型会更倾向于仅按照标点符号断句。此参数建议不要随意调整,可能会影响合成效果。- Returns:
- SegmentRate 断句敏感阈值,默认值为:0,取值范围:[0,1,2]。该值越大越不容易断句,模型会更倾向于仅按照标点符号断句。此参数建议不要随意调整,可能会影响合成效果。
-
setSegmentRate
public void setSegmentRate(Long SegmentRate)
Set 断句敏感阈值,默认值为:0,取值范围:[0,1,2]。该值越大越不容易断句,模型会更倾向于仅按照标点符号断句。此参数建议不要随意调整,可能会影响合成效果。- Parameters:
SegmentRate- 断句敏感阈值,默认值为:0,取值范围:[0,1,2]。该值越大越不容易断句,模型会更倾向于仅按照标点符号断句。此参数建议不要随意调整,可能会影响合成效果。
-
getEmotionCategory
public String getEmotionCategory()
Get 控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、撒娇(sajiao)、厌恶(disgusted)、震惊(amaze)、平静(peaceful)、兴奋(exciting)、傲娇(aojiao)、解说(jieshuo)- Returns:
- EmotionCategory 控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、撒娇(sajiao)、厌恶(disgusted)、震惊(amaze)、平静(peaceful)、兴奋(exciting)、傲娇(aojiao)、解说(jieshuo)
-
setEmotionCategory
public void setEmotionCategory(String EmotionCategory)
Set 控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、撒娇(sajiao)、厌恶(disgusted)、震惊(amaze)、平静(peaceful)、兴奋(exciting)、傲娇(aojiao)、解说(jieshuo)- Parameters:
EmotionCategory- 控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、撒娇(sajiao)、厌恶(disgusted)、震惊(amaze)、平静(peaceful)、兴奋(exciting)、傲娇(aojiao)、解说(jieshuo)
-
getEmotionIntensity
public Long getEmotionIntensity()
Get 控制合成音频情感程度,取值范围为[50,200],默认为100;只有EmotionCategory不为空时生效;- Returns:
- EmotionIntensity 控制合成音频情感程度,取值范围为[50,200],默认为100;只有EmotionCategory不为空时生效;
-
setEmotionIntensity
public void setEmotionIntensity(Long EmotionIntensity)
Set 控制合成音频情感程度,取值范围为[50,200],默认为100;只有EmotionCategory不为空时生效;- Parameters:
EmotionIntensity- 控制合成音频情感程度,取值范围为[50,200],默认为100;只有EmotionCategory不为空时生效;
-
-