From c2b6e8560841789c49185b6e96ba988a655c0b60 Mon Sep 17 00:00:00 2001 From: uzhuraul Date: Fri, 16 Aug 2024 00:08:48 +0200 Subject: [PATCH] Fix OpenAiAudioSpeechOptions speed description formatting --- .../springframework/ai/openai/OpenAiAudioSpeechOptions.java | 4 ++-- .../org/springframework/ai/openai/api/OpenAiAudioApi.java | 4 ++-- .../modules/ROOT/pages/api/audio/speech/openai-speech.adoc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioSpeechOptions.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioSpeechOptions.java index a05965e453..8d6ca7c9de 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioSpeechOptions.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioSpeechOptions.java @@ -60,8 +60,8 @@ public class OpenAiAudioSpeechOptions implements ModelOptions { private AudioResponseFormat responseFormat; /** - * The speed of the voice synthesis. The acceptable range is from 0.0 (slowest) to 1.0 - * (fastest). Defaults to 1 + * The speed of the voice synthesis. The acceptable range is from 0.25 (slowest) to + * 4.0 (fastest). Defaults to 1 (normal) */ @JsonProperty("speed") private Float speed; diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiAudioApi.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiAudioApi.java index e8b4fdaea6..23b27f372d 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiAudioApi.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiAudioApi.java @@ -171,8 +171,8 @@ public String getValue() { * chosen model: 'alloy', 'echo', 'fable', 'onyx', 'nova', and 'shimmer'. * @param responseFormat The format to audio in. Supported formats are mp3, opus, aac, * and flac. Defaults to mp3. - * @param speed The speed of the voice synthesis. The acceptable range is from 0.0 - * (slowest) to 1.0 (fastest). + * @param speed The speed of the voice synthesis. The acceptable range is from 0.25 + * (slowest) to 4.0 (fastest). */ @JsonInclude(Include.NON_NULL) public record SpeechRequest( diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/audio/speech/openai-speech.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/audio/speech/openai-speech.adoc index 4a55117351..bc3c0e2df5 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/audio/speech/openai-speech.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/audio/speech/openai-speech.adoc @@ -70,7 +70,7 @@ The prefix `spring.ai.openai.audio.speech` is used as the property prefix that l | spring.ai.openai.audio.speech.options.model | ID of the model to use. Only tts-1 is currently available. | tts-1 | spring.ai.openai.audio.speech.options.voice | The voice to use for the TTS output. Available options are: alloy, echo, fable, onyx, nova, and shimmer. | alloy | spring.ai.openai.audio.speech.options.response-format | The format of the audio output. Supported formats are mp3, opus, aac, flac, wav, and pcm. | mp3 -| spring.ai.openai.audio.speech.options.speed | The speed of the voice synthesis. The acceptable range is from 0.0 (slowest) to 1.0 (fastest). | 1.0 +| spring.ai.openai.audio.speech.options.speed | The speed of the voice synthesis. The acceptable range is from 0.25 (slowest) to 4.0 (fastest). | 1.0 |==== NOTE: You can override the common `spring.ai.openai.base-url`, `spring.ai.openai.api-key`, `spring.ai.openai.organization-id` and `spring.ai.openai.project-id` properties.