We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbd8b7f commit 085ac43Copy full SHA for 085ac43
spring-ai-model/src/main/java/org/springframework/ai/audio/tts/TextToSpeechModel.java
@@ -36,6 +36,16 @@ default byte[] call(String text) {
36
return (output != null) ? output : new byte[0];
37
}
38
39
+ default byte[] call(String text, TextToSpeechOptions options) {
40
+ TextToSpeechPrompt prompt = new TextToSpeechPrompt(text, options);
41
+ ModelResult<byte[]> result = call(prompt).getResult();
42
+ if (result == null) {
43
+ return new byte[0];
44
+ }
45
+ byte[] output = result.getOutput();
46
+ return (output != null) ? output : new byte[0];
47
48
+
49
@Override
50
TextToSpeechResponse call(TextToSpeechPrompt prompt);
51
0 commit comments