feat: add encode_format to request of audio speech (#54)

Co-authored-by: yuhongxiao <hongxiao.yu@aminer.cn>
This commit is contained in:
iceAndFireisFailed 2025-09-28 12:24:25 +08:00 committed by GitHub
parent f422602aac
commit 0ec7aac35f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -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
*/

View file

@ -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();