26 instantiations of TextToSpeechResponseUpdate
Microsoft.Extensions.AI.Abstractions (2)
Generated\361d1da7f942c932\JsonContext.TextToSpeechResponseUpdate.g.cs (1)
33
ObjectCreator = () => new global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
(),
TextToSpeech\TextToSpeechResponse.cs (1)
57
TextToSpeechResponseUpdate update =
new
()
Microsoft.Extensions.AI.Abstractions.Tests (17)
Generated\361d1da7f942c932\TestJsonSerializerContext.TextToSpeechResponseUpdate.g.cs (1)
31
ObjectCreator = () => new global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
(),
TextToSpeech\DelegatingTextToSpeechClientTests.cs (2)
61
new
([new DataContent(new byte[] { 1, 2 }, "audio/mpeg")]),
62
new
([new DataContent(new byte[] { 3, 4 }, "audio/mpeg")])
TextToSpeech\TextToSpeechClientTests.cs (3)
68
yield return
new
([new DataContent(new byte[] { 1 }, "audio/mpeg")]);
69
yield return
new
([new DataContent(new byte[] { 2 }, "audio/mpeg")]);
70
yield return
new
([new DataContent(new byte[] { 3 }, "audio/mpeg")]);
TextToSpeech\TextToSpeechResponseUpdateExtensionsTests.cs (8)
26
new
([new DataContent(new byte[] { 1 }, "audio/mpeg")]) { ModelId = "model123", AdditionalProperties = new() { ["a"] = "b" } },
27
new
([new DataContent(new byte[] { 2 }, "audio/mpeg")]) { ModelId = "model123" },
28
new
([new DataContent(new byte[] { 3 }, "audio/mpeg")]) { ModelId = "model123", AdditionalProperties = new() { ["c"] = "d" } },
29
new
() { ResponseId = "someResponse", ModelId = "model123" },
57
new
() { Contents = [new DataContent(new byte[] { 1 }, "audio/mpeg")] },
58
new
() { Contents = [new UsageContent(new() { TotalTokenCount = 42 })] },
59
new
() { Contents = [new DataContent(new byte[] { 2 }, "audio/mpeg")] },
60
new
() { Contents = [new UsageContent(new() { InputTokenCount = 12, TotalTokenCount = 24 })] },
TextToSpeech\TextToSpeechResponseUpdateTests.cs (3)
15
TextToSpeechResponseUpdate update =
new
();
25
TextToSpeechResponseUpdate update =
new
()
47
TextToSpeechResponseUpdate original =
new
()
Microsoft.Extensions.AI.OpenAI (2)
OpenAITextToSpeechClient.cs (2)
118
yield return new
TextToSpeechResponseUpdate
128
var sessionClose = new
TextToSpeechResponseUpdate
Microsoft.Extensions.AI.Tests (5)
TextToSpeech\ConfigureOptionsTextToSpeechClientTests.cs (1)
38
var expectedUpdates = Enumerable.Range(0, 3).Select(i => new
TextToSpeechResponseUpdate
()).ToArray();
TextToSpeech\LoggingTextToSpeechClientTests.cs (2)
110
yield return
new
([new DataContent(new byte[] { 1 }, "audio/mpeg")]);
111
yield return
new
([new DataContent(new byte[] { 2 }, "audio/mpeg")]);
TextToSpeech\OpenTelemetryTextToSpeechClientTests.cs (2)
66
yield return
new
([new DataContent(new byte[] { 1 }, "audio/mpeg")]);
67
yield return
new
()
152 references to TextToSpeechResponseUpdate
Microsoft.Extensions.AI (9)
TextToSpeech\ConfigureOptionsTextToSpeechClient.cs (2)
47
public override async IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetStreamingAudioAsync(
50
await foreach (
var
update in base.GetStreamingAudioAsync(text, Configure(options), cancellationToken))
TextToSpeech\LoggingTextToSpeechClient.cs (3)
97
public override async IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetStreamingAudioAsync(
112
IAsyncEnumerator<
TextToSpeechResponseUpdate
> e;
130
TextToSpeechResponseUpdate
? update = null;
TextToSpeech\OpenTelemetryTextToSpeechClient.cs (4)
132
public override async IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetStreamingAudioAsync(
141
IAsyncEnumerable<
TextToSpeechResponseUpdate
> updates;
153
List<
TextToSpeechResponseUpdate
> trackedUpdates = [];
159
TextToSpeechResponseUpdate
update;
Microsoft.Extensions.AI.Abstractions (71)
Generated\361d1da7f942c932\JsonContext.IReadOnlyListTextToSpeechResponseUpdate.g.cs (12)
15
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>>? _IReadOnlyListTextToSpeechResponseUpdate;
21
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>> IReadOnlyListTextToSpeechResponseUpdate
24
get => _IReadOnlyListTextToSpeechResponseUpdate ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>));
27
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>> Create_IReadOnlyListTextToSpeechResponseUpdate(global::System.Text.Json.JsonSerializerOptions options)
29
if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>> jsonTypeInfo))
31
var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>>
37
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIEnumerableInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>, global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>(options, info);
47
private void IReadOnlyListTextToSpeechResponseUpdateSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>? value)
57
foreach (global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
element in value)
Generated\361d1da7f942c932\JsonContext.TextToSpeechResponseUpdate.g.cs (32)
15
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>? _TextToSpeechResponseUpdate;
21
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
> TextToSpeechResponseUpdate
24
get => _TextToSpeechResponseUpdate ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
));
27
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
> Create_TextToSpeechResponseUpdate(global::System.Text.Json.JsonSerializerOptions options)
29
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
> jsonTypeInfo))
31
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>
37
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
41
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>(options, objectInfo);
58
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
60
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).Kind,
61
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).Kind = value!,
68
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("Kind", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.TextToSpeechResponseUpdateKind), global::System.Array.Empty<global::System.Type>(), null),
78
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
80
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).ResponseId,
81
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).ResponseId = value!,
88
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
98
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
100
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).ModelId,
101
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).ModelId = value!,
108
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
118
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
128
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
138
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
140
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).AdditionalProperties,
141
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).AdditionalProperties = value!,
148
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null),
158
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
160
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).Contents,
161
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).Contents = value!,
168
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("Contents", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.AIContent>), global::System.Array.Empty<global::System.Type>(), null),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.GetJsonTypeInfo.g.cs (2)
336
if (type == typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
))
432
if (type == typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>))
TextToSpeech\DelegatingTextToSpeechClient.cs (1)
51
public virtual IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetStreamingAudioAsync(
TextToSpeech\ITextToSpeechClient.cs (1)
47
IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetStreamingAudioAsync(
TextToSpeech\TextToSpeechResponse.cs (4)
47
/// <summary>Creates an array of <see cref="
TextToSpeechResponseUpdate
" /> instances that represent this <see cref="TextToSpeechResponse" />.</summary>
48
/// <returns>An array of <see cref="
TextToSpeechResponseUpdate
" /> instances that may be used to represent this <see cref="TextToSpeechResponse" />.</returns>
49
public
TextToSpeechResponseUpdate
[] ToTextToSpeechResponseUpdates()
57
TextToSpeechResponseUpdate
update = new()
TextToSpeech\TextToSpeechResponseUpdate.cs (7)
16
/// <para><see cref="
TextToSpeechResponseUpdate
"/> is so named because it represents streaming updates
20
/// but all of those with a non-<see langword="null"/> value must have the same value (e.g. <see cref="
TextToSpeechResponseUpdate
.ResponseId"/>).
23
/// The relationship between <see cref="TextToSpeechResponse"/> and <see cref="
TextToSpeechResponseUpdate
"/> is
27
/// all have different <see cref="
TextToSpeechResponseUpdate
.RawRepresentation"/> objects whereas there's
34
/// <summary>Initializes a new instance of the <see cref="
TextToSpeechResponseUpdate
"/> class.</summary>
40
/// <summary>Initializes a new instance of the <see cref="
TextToSpeechResponseUpdate
"/> class.</summary>
58
/// If a <see cref="
TextToSpeechResponseUpdate
"/> is created to represent some underlying object from another object
TextToSpeech\TextToSpeechResponseUpdateExtensions.cs (10)
14
/// Provides extension methods for working with <see cref="
TextToSpeechResponseUpdate
"/> instances.
19
/// <summary>Combines <see cref="
TextToSpeechResponseUpdate
"/> instances into a single <see cref="TextToSpeechResponse"/>.</summary>
23
this IEnumerable<
TextToSpeechResponseUpdate
> updates)
29
foreach (
var
update in updates)
37
/// <summary>Combines <see cref="
TextToSpeechResponseUpdate
"/> instances into a single <see cref="TextToSpeechResponse"/>.</summary>
42
this IAsyncEnumerable<
TextToSpeechResponseUpdate
> updates, CancellationToken cancellationToken = default)
49
IAsyncEnumerable<
TextToSpeechResponseUpdate
> updates, CancellationToken cancellationToken)
53
await foreach (
var
update in updates.WithCancellation(cancellationToken).ConfigureAwait(false))
62
/// <summary>Processes the <see cref="
TextToSpeechResponseUpdate
"/>, incorporating its contents and properties.</summary>
66
TextToSpeechResponseUpdate
update,
Utilities\AIJsonUtilities.Defaults.cs (2)
135
[JsonSerializable(typeof(
TextToSpeechResponseUpdate
))]
136
[JsonSerializable(typeof(IReadOnlyList<
TextToSpeechResponseUpdate
>))]
Microsoft.Extensions.AI.Abstractions.Tests (54)
Generated\361d1da7f942c932\TestJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
338
if (type == typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
))
Generated\361d1da7f942c932\TestJsonSerializerContext.TextToSpeechResponseUpdate.g.cs (32)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>? _TextToSpeechResponseUpdate;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
> TextToSpeechResponseUpdate
22
get => _TextToSpeechResponseUpdate ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
> Create_TextToSpeechResponseUpdate(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
> jsonTypeInfo))
29
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>
35
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
39
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
>(options, objectInfo);
56
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
58
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).Kind,
59
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).Kind = value!,
66
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("Kind", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.TextToSpeechResponseUpdateKind), global::System.Array.Empty<global::System.Type>(), null),
76
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
78
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).ResponseId,
79
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).ResponseId = value!,
86
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
96
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
98
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).ModelId,
99
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).ModelId = value!,
106
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
116
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
126
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
136
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
138
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).AdditionalProperties,
139
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).AdditionalProperties = value!,
146
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null),
156
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
),
158
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).Contents,
159
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
)obj).Contents = value!,
166
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponseUpdate
).GetProperty("Contents", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.AIContent>), global::System.Array.Empty<global::System.Type>(), null),
TestJsonSerializerContext.cs (1)
24
[JsonSerializable(typeof(
TextToSpeechResponseUpdate
))]
TestTextToSpeechClient.cs (2)
31
IAsyncEnumerable<
TextToSpeechResponseUpdate
>>?
46
public IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetStreamingAudioAsync(
TextToSpeech\DelegatingTextToSpeechClientTests.cs (1)
59
TextToSpeechResponseUpdate
[] expectedResults =
TextToSpeech\TextToSpeechClientTests.cs (3)
53
List<
TextToSpeechResponseUpdate
> updates = [];
54
await foreach (
var
update in client.GetStreamingAudioAsync("Hello!", expectedOptions, cts.Token))
66
private static async IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetStreamingUpdatesAsync()
TextToSpeech\TextToSpeechResponseTests.cs (2)
152
TextToSpeechResponseUpdate
[] updates = response.ToTextToSpeechResponseUpdates();
157
TextToSpeechResponseUpdate
update = updates[0];
TextToSpeech\TextToSpeechResponseUpdateExtensionsTests.cs (6)
16
Assert.Throws<ArgumentNullException>("updates", () => ((List<
TextToSpeechResponseUpdate
>)null!).ToTextToSpeechResponse());
24
TextToSpeechResponseUpdate
[] updates =
55
TextToSpeechResponseUpdate
[] updates =
75
private static async IAsyncEnumerable<
TextToSpeechResponseUpdate
> YieldAsync(IEnumerable<
TextToSpeechResponseUpdate
> updates)
77
foreach (
TextToSpeechResponseUpdate
update in updates)
TextToSpeech\TextToSpeechResponseUpdateTests.cs (6)
15
TextToSpeechResponseUpdate
update = new();
25
TextToSpeechResponseUpdate
update = new()
47
TextToSpeechResponseUpdate
original = new()
58
TextToSpeechResponseUpdate
? result = JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.TextToSpeechResponseUpdate);
86
TextToSpeechResponseUpdate
? result = JsonSerializer.Deserialize<
TextToSpeechResponseUpdate
>(Json, AIJsonUtilities.DefaultOptions);
Microsoft.Extensions.AI.Integration.Tests (1)
TextToSpeechClientIntegrationTests.cs (1)
109
await foreach (
var
update in _client.GetStreamingAudioAsync("Hello, world!"))
Microsoft.Extensions.AI.OpenAI (3)
OpenAITextToSpeechClient.cs (3)
80
public async IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetStreamingAudioAsync(
105
foreach (
var
update in (await GetAudioAsync(text, options, cancellationToken).ConfigureAwait(false)).ToTextToSpeechResponseUpdates())
128
var
sessionClose = new TextToSpeechResponseUpdate
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAITextToSpeechClientIntegrationTests.cs (1)
33
await foreach (
var
update in client.GetStreamingAudioAsync("The quick brown fox jumps over the lazy dog."))
OpenAITextToSpeechClientTests.cs (3)
266
await foreach (
var
update in client.GetStreamingAudioAsync("Hello streaming"))
310
List<
TextToSpeechResponseUpdate
> updates = [];
311
await foreach (
var
update in client.GetStreamingAudioAsync("Hello streaming"))
Microsoft.Extensions.AI.Tests (10)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestTextToSpeechClient.cs (2)
31
IAsyncEnumerable<
TextToSpeechResponseUpdate
>>?
46
public IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetStreamingAudioAsync(
TextToSpeech\ConfigureOptionsTextToSpeechClientTests.cs (3)
89
static async IAsyncEnumerable<
TextToSpeechResponseUpdate
> YieldUpdates(
TextToSpeechResponseUpdate
[] updates)
91
foreach (
var
update in updates)
TextToSpeech\LoggingTextToSpeechClientTests.cs (2)
107
static async IAsyncEnumerable<
TextToSpeechResponseUpdate
> GetUpdatesAsync()
119
await foreach (
var
update in client.GetStreamingAudioAsync(
TextToSpeech\OpenTelemetryTextToSpeechClientTests.cs (3)
62
static async IAsyncEnumerable<
TextToSpeechResponseUpdate
> TestClientStreamAsync(
102
await foreach (
var
update in client.GetStreamingAudioAsync("Hello, world!", options))
168
await foreach (
var
update in client.GetStreamingAudioAsync("Hello"))