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 4f1ab6a commit 6d0ac08Copy full SHA for 6d0ac08
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