TextToAudioExecutionSettings.Builder Class

  • java.lang.Object
    • com.microsoft.semantickernel.services.audio.TextToAudioExecutionSettings.Builder

public static class TextToAudioExecutionSettings.Builder

Represents a builder for text to audio execution settings.

Method Summary

Modifier and Type Method and Description
TextToAudioExecutionSettings build()

Builds the settings.

Builder withResponseFormat(String responseFormat)

Sets the response format, e.g "mp3", "opus", "aac", "flak"

Builder withSpeed(Double speed)

Sets the speed of the audio generation.

Builder withVoice(String voice)

Sets the voice to use for the audio generation.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Method Details

build

public TextToAudioExecutionSettings build()

Builds the settings.

Returns:

The settings.

withResponseFormat

public TextToAudioExecutionSettings.Builder withResponseFormat(String responseFormat)

Sets the response format, e.g "mp3", "opus", "aac", "flak"

Parameters:

responseFormat - The response format.

Returns:

The builder.

withSpeed

public TextToAudioExecutionSettings.Builder withSpeed(Double speed)

Sets the speed of the audio generation.

Parameters:

speed - The speed.

Returns:

The builder.

withVoice

public TextToAudioExecutionSettings.Builder withVoice(String voice)

Sets the voice to use for the audio generation.

Parameters:

voice - The voice.

Returns:

The builder.

Applies to