次の方法で共有


TextToAudioServiceExtensions.GetAudioContentAsync Method

Definition

Get audio content from text.

public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.AudioContent> GetAudioContentAsync (this Microsoft.SemanticKernel.TextToAudio.ITextToAudioService textToAudioService, string text, Microsoft.SemanticKernel.PromptExecutionSettings? executionSettings = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
static member GetAudioContentAsync : Microsoft.SemanticKernel.TextToAudio.ITextToAudioService * string * Microsoft.SemanticKernel.PromptExecutionSettings * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.AudioContent>
<Extension()>
Public Function GetAudioContentAsync (textToAudioService As ITextToAudioService, text As String, Optional executionSettings As PromptExecutionSettings = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AudioContent)

Parameters

textToAudioService
ITextToAudioService
text
String

The text to generate audio for.

executionSettings
PromptExecutionSettings

The AI execution settings (optional).

kernel
Kernel

The Kernel containing services, plugins, and other state for use throughout the operation.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

Audio content from text.

Applies to