Jaa


LoggingTextToSpeechClient Class

Definition

A delegating text to speech client that logs text to speech operations to an ILogger.

public ref class LoggingTextToSpeechClient : Microsoft::Extensions::AI::DelegatingTextToSpeechClient
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public class LoggingTextToSpeechClient : Microsoft.Extensions.AI.DelegatingTextToSpeechClient
public class LoggingTextToSpeechClient : Microsoft.Extensions.AI.DelegatingTextToSpeechClient
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type LoggingTextToSpeechClient = class
    inherit DelegatingTextToSpeechClient
type LoggingTextToSpeechClient = class
    inherit DelegatingTextToSpeechClient
Public Class LoggingTextToSpeechClient
Inherits DelegatingTextToSpeechClient
Inheritance
LoggingTextToSpeechClient
Attributes

Remarks

The provided implementation of ITextToSpeechClient is thread-safe for concurrent use so long as the ILogger employed is also thread-safe for concurrent use.

When the employed ILogger enables Trace, the contents of messages and options are logged. These messages and options may contain sensitive application data. Trace is disabled by default and should never be enabled in a production environment. Messages and options are not logged at other logging levels.

Constructors

Name Description
LoggingTextToSpeechClient(ITextToSpeechClient, ILogger)

Initializes a new instance of the LoggingTextToSpeechClient class.

Properties

Name Description
InnerClient

Gets the inner ITextToSpeechClient.

(Inherited from DelegatingTextToSpeechClient)
JsonSerializerOptions

Gets or sets JSON serialization options to use when serializing logging data.

Methods

Name Description
Dispose()

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

(Inherited from DelegatingTextToSpeechClient)
Dispose(Boolean)

Provides a mechanism for releasing unmanaged resources.

(Inherited from DelegatingTextToSpeechClient)
GetAudioAsync(String, TextToSpeechOptions, CancellationToken)

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

GetService(Type, Object)

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

(Inherited from DelegatingTextToSpeechClient)
GetStreamingAudioAsync(String, TextToSpeechOptions, CancellationToken)

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

Extension Methods

Name Description
AsBuilder(ITextToSpeechClient)

Creates a new TextToSpeechClientBuilder using innerClient as its inner client.

GetService<TService>(ITextToSpeechClient, Object)

Asks the ITextToSpeechClient for an object of type TService.

Applies to