Del via


TextToSpeechResponseUpdate Class

Definition

Represents a single streaming response chunk from an ITextToSpeechClient.

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

Remarks

TextToSpeechResponseUpdate is so named because it represents streaming updates to a text to speech generation. As such, it is considered erroneous for multiple updates that are part of the same request to contain competing values. For example, some updates that are part of the same request may have a null value, and others may have a non-null value, but all of those with a non-null value must have the same value (e.g. ResponseId).

The relationship between TextToSpeechResponse and TextToSpeechResponseUpdate is codified in the ToTextToSpeechResponseAsync(IAsyncEnumerable<TextToSpeechResponseUpdate>, CancellationToken) and ToTextToSpeechResponseUpdates(), which enable bidirectional conversions between the two. Note, however, that the conversion may be slightly lossy, for example if multiple updates all have different RawRepresentation objects whereas there's only one slot for such an object available in RawRepresentation.

Constructors

Name Description
TextToSpeechResponseUpdate()

Initializes a new instance of the TextToSpeechResponseUpdate class.

TextToSpeechResponseUpdate(IList<AIContent>)

Initializes a new instance of the TextToSpeechResponseUpdate class.

Properties

Name Description
AdditionalProperties

Gets or sets additional properties for the update.

Contents

Gets or sets the generated content items.

Kind

Gets or sets the kind of the generated audio speech update.

ModelId

Gets or sets the model ID used in the creation of the text to speech of which this update is a part.

RawRepresentation

Gets or sets the raw representation of the generated audio speech update from an underlying implementation.

ResponseId

Gets or sets the ID of the generated audio speech response of which this update is a part.

Applies to