feat: add encode_format to request of audio speech (#54)
Co-authored-by: yuhongxiao <hongxiao.yu@aminer.cn>
This commit is contained in:
parent
f422602aac
commit
0ec7aac35f
2 changed files with 12 additions and 0 deletions
|
|
@ -38,6 +38,12 @@ public class AudioSpeechRequest extends CommonRequest implements ClientRequest<A
|
|||
@JsonProperty("response_format")
|
||||
private String responseFormat;
|
||||
|
||||
/**
|
||||
* Encode format of the generated speech file
|
||||
*/
|
||||
@JsonProperty("encode_format")
|
||||
private String encodeFormat;
|
||||
|
||||
/**
|
||||
* Sensitive word detection control
|
||||
*/
|
||||
|
|
@ -50,6 +56,11 @@ public class AudioSpeechRequest extends CommonRequest implements ClientRequest<A
|
|||
@JsonProperty("watermark_enabled")
|
||||
private Boolean watermarkEnabled;
|
||||
|
||||
/**
|
||||
* Is streaming response
|
||||
*/
|
||||
private Boolean stream;
|
||||
|
||||
/**
|
||||
* Voice speed for speech generation
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public class AudioServiceTest {
|
|||
.model(Constants.ModelTTS)
|
||||
.input("Hello, this is a test for text-to-speech functionality.")
|
||||
.voice("tongtong")
|
||||
.encodeFormat("base64")
|
||||
.requestId(requestId)
|
||||
.build();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue