Share via


DelegatingSpeechToTextClient Class

Definition

Provides an optional base class for an ISpeechToTextClient that passes through calls to another instance.

public ref class DelegatingSpeechToTextClient : IDisposable, Microsoft::Extensions::AI::ISpeechToTextClient
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001")]
public class DelegatingSpeechToTextClient : IDisposable, Microsoft.Extensions.AI.ISpeechToTextClient
public class DelegatingSpeechToTextClient : IDisposable, Microsoft.Extensions.AI.ISpeechToTextClient
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001")>]
type DelegatingSpeechToTextClient = class
    interface ISpeechToTextClient
    interface IDisposable
type DelegatingSpeechToTextClient = class
    interface ISpeechToTextClient
    interface IDisposable
Public Class DelegatingSpeechToTextClient
Implements IDisposable, ISpeechToTextClient
Inheritance
DelegatingSpeechToTextClient
Derived
Attributes
Implements

Remarks

This is recommended as a base type when building clients that can be chained in any order around an underlying ISpeechToTextClient. The default implementation simply passes each call to the inner client instance.

Constructors

DelegatingSpeechToTextClient(ISpeechToTextClient)

Initializes a new instance of the DelegatingSpeechToTextClient class.

Properties

InnerClient

Gets the inner ISpeechToTextClient.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(Boolean)

Provides a mechanism for releasing unmanaged resources.

GetService(Type, Object)

Asks the ISpeechToTextClient for an object of the specified type serviceType.

GetStreamingTextAsync(Stream, SpeechToTextOptions, CancellationToken)

Sends audio speech content to the model and streams back the generated text.

GetTextAsync(Stream, SpeechToTextOptions, CancellationToken)

Sends audio speech content to the model and returns the generated text.

Extension Methods

AsBuilder(ISpeechToTextClient)

Creates a new SpeechToTextClientBuilder using innerClient as its inner client.

GetService<TService>(ISpeechToTextClient, Object)

Asks the ISpeechToTextClient for an object of type TService.

GetStreamingTextAsync(ISpeechToTextClient, DataContent, SpeechToTextOptions, CancellationToken)

Generates text from speech providing a single audio speech DataContent.

GetTextAsync(ISpeechToTextClient, DataContent, SpeechToTextOptions, CancellationToken)

Generates text from speech providing a single audio speech DataContent.

Applies to