Share via


AudioToTextServiceExtensions.GetTextContentAsync Method

Definition

Get text content from audio content.

public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.TextContent> GetTextContentAsync (this Microsoft.SemanticKernel.AudioToText.IAudioToTextService audioToTextService, Microsoft.SemanticKernel.AudioContent content, Microsoft.SemanticKernel.PromptExecutionSettings? executionSettings = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
static member GetTextContentAsync : Microsoft.SemanticKernel.AudioToText.IAudioToTextService * Microsoft.SemanticKernel.AudioContent * Microsoft.SemanticKernel.PromptExecutionSettings * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.TextContent>
<Extension()>
Public Function GetTextContentAsync (audioToTextService As IAudioToTextService, content As AudioContent, Optional executionSettings As PromptExecutionSettings = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TextContent)

Parameters

audioToTextService
IAudioToTextService

Target IAudioToTextService instance.

content
AudioContent

Audio content.

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

Text content from audio content.

Applies to