public class TextToVoiceRequest extends AbstractModel
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
String |
getCodec()
Get Format of returned audio.
|
Boolean |
getEnableSubtitle()
Get Whether to enable the timestamp feature.
|
Long |
getModelType()
Get Model type, with `1` for the default model.
|
Long |
getPrimaryLanguage()
Get Primary language type: 1 - Chinese (default)2 - English
|
Long |
getProjectId()
Get Project ID, which defaults to 0 and can be customized.
|
Long |
getSampleRate()
Get Audio sample rate: 16000: 16k (default)8000: 8k
|
Long |
getSegmentRate()
Get The threshold of speech segmentation sensibility, which can be `0` (default), `1`, or `2`.
|
String |
getSessionId()
Get The `SessionId` of a request, which will be returned as-is.
|
Float |
getSpeed()
Get Speed range: [-2, 6], corresponding to different speeds-2 for 0.6 times-1 for 0.8 times0 for 1.0 time (default)1 for 1.2 times2 for 1.5 times6 for 2.5 timesTo set finer-grained speed levels, keep one decimal place, such as 0.5, 1.1, and 1.8.
|
String |
getText()
Get The source text for synthesizing speech, which is encoded in UTF-8.
|
Long |
getVoiceType()
Get Standard voices 10510000-zhixiaoyao (Chinese)1001-zhiyu (Chinese)1002-zhiling (Chinese)1003-zhimei (Chinese)1004-zhiyun (Chinese)1005-zhili (Chinese)1007-zhina (Chinese)1008-zhiqi (Chinese)1009-zhiyun (Chinese)1010-zhihua (Chinese)1017-zhirong (Chinese)1018-zhijing (Chinese)1050-WeJack (English)1051-WeRose (English)Premium voices
Premium voices have higher fidelity and more natural-sounding quality than standard voices. |
Float |
getVolume()
Get Volume range: [0, 10], corresponding to 11 volume levels.
|
void |
setCodec(String Codec)
Set Format of returned audio.
|
void |
setEnableSubtitle(Boolean EnableSubtitle)
Set Whether to enable the timestamp feature.
|
void |
setModelType(Long ModelType)
Set Model type, with `1` for the default model.
|
void |
setPrimaryLanguage(Long PrimaryLanguage)
Set Primary language type: 1 - Chinese (default)2 - English
|
void |
setProjectId(Long ProjectId)
Set Project ID, which defaults to 0 and can be customized.
|
void |
setSampleRate(Long SampleRate)
Set Audio sample rate: 16000: 16k (default)8000: 8k
|
void |
setSegmentRate(Long SegmentRate)
Set The threshold of speech segmentation sensibility, which can be `0` (default), `1`, or `2`.
|
void |
setSessionId(String SessionId)
Set The `SessionId` of a request, which will be returned as-is.
|
void |
setSpeed(Float Speed)
Set Speed range: [-2, 6], corresponding to different speeds-2 for 0.6 times-1 for 0.8 times0 for 1.0 time (default)1 for 1.2 times2 for 1.5 times6 for 2.5 timesTo set finer-grained speed levels, keep one decimal place, such as 0.5, 1.1, and 1.8.
|
void |
setText(String Text)
Set The source text for synthesizing speech, which is encoded in UTF-8.
|
void |
setVoiceType(Long VoiceType)
Set Standard voices 10510000-zhixiaoyao (Chinese)1001-zhiyu (Chinese)1002-zhiling (Chinese)1003-zhimei (Chinese)1004-zhiyun (Chinese)1005-zhili (Chinese)1007-zhina (Chinese)1008-zhiqi (Chinese)1009-zhiyun (Chinese)1010-zhihua (Chinese)1017-zhirong (Chinese)1018-zhijing (Chinese)1050-WeJack (English)1051-WeRose (English)Premium voices
Premium voices have higher fidelity and more natural-sounding quality than standard voices. |
void |
setVolume(Float Volume)
Set Volume range: [0, 10], corresponding to 11 volume levels.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonString
public TextToVoiceRequest()
public TextToVoiceRequest(TextToVoiceRequest source)
public String getText()
public void setText(String Text)
Text
- The source text for synthesizing speech, which is encoded in UTF-8.
It can contain up to 150 Chinese characters (a full-width punctuation as a Chinese character) or 500 letters ( a half-width punctuation as a letter).public String getSessionId()
public void setSessionId(String SessionId)
SessionId
- The `SessionId` of a request, which will be returned as-is. We recommend that you pass characters like uuid to prevent repetition.public Float getVolume()
public void setVolume(Float Volume)
Volume
- Volume range: [0, 10], corresponding to 11 volume levels. 0 is the default value, indicating the normal volume. There is no mute option.public Float getSpeed()
public void setSpeed(Float Speed)
Speed
- Speed range: [-2, 6], corresponding to different speedspublic Long getProjectId()
public void setProjectId(Long ProjectId)
ProjectId
- Project ID, which defaults to 0 and can be customized.public Long getModelType()
public void setModelType(Long ModelType)
ModelType
- Model type, with `1` for the default model.public Long getVoiceType()
public void setVoiceType(Long VoiceType)
VoiceType
- Standard voices public Long getPrimaryLanguage()
public void setPrimaryLanguage(Long PrimaryLanguage)
PrimaryLanguage
- Primary language type: public Long getSampleRate()
public void setSampleRate(Long SampleRate)
SampleRate
- Audio sample rate: public String getCodec()
public void setCodec(String Codec)
Codec
- Format of returned audio. Valid values: WAV (default), MP3, and PCM.public Boolean getEnableSubtitle()
public void setEnableSubtitle(Boolean EnableSubtitle)
EnableSubtitle
- Whether to enable the timestamp feature. Default value: `false`.public Long getSegmentRate()
public void setSegmentRate(Long SegmentRate)
SegmentRate
- The threshold of speech segmentation sensibility, which can be `0` (default), `1`, or `2`. A larger value indicates fewer segments, and the model tends to only segment sentences based on punctuation marks. We recommend you not change this parameter to avoid adverse effect on speech synthesis.Copyright © 2023. All rights reserved.