32 instantiations of SpeechToTextResponseUpdate
Microsoft.Extensions.AI.Abstractions (2)
Generated\361d1da7f942c932\JsonContext.SpeechToTextResponseUpdate.g.cs (1)
33
ObjectCreator = () => new global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
(),
SpeechToText\SpeechToTextResponse.cs (1)
84
SpeechToTextResponseUpdate update =
new
()
Microsoft.Extensions.AI.Abstractions.Tests (23)
Generated\361d1da7f942c932\TestJsonSerializerContext.SpeechToTextResponseUpdate.g.cs (1)
31
ObjectCreator = () => new global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
(),
SpeechToText\DelegatingSpeechToTextClientTests.cs (2)
62
new
("Text update 1"),
63
new
("Text update 2")
SpeechToText\SpeechToTextClientExtensionsTests.cs (1)
64
var update = new
SpeechToTextResponseUpdate
();
SpeechToText\SpeechToTextClientTests.cs (3)
79
yield return
new
("hello ");
80
yield return
new
("world ");
81
yield return
new
("!");
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (12)
48
new
("Hello ") { ModelId = "model123", StartTime = null, AdditionalProperties = new() { ["a"] = "b" } },
49
new
("human, ") { ModelId = "model123", StartTime = TimeSpan.FromSeconds(10), EndTime = TimeSpan.FromSeconds(20) },
50
new
("How ") { ModelId = "model123", StartTime = TimeSpan.FromSeconds(22), EndTime = TimeSpan.FromSeconds(23) },
51
new
("are ") { ModelId = "model123", StartTime = TimeSpan.FromSeconds(23), EndTime = TimeSpan.FromSeconds(24) },
52
new
([new TextContent("You?")]) { ModelId = "model123", StartTime = TimeSpan.FromSeconds(24), EndTime = TimeSpan.FromSeconds(25), AdditionalProperties = new() { ["c"] = "d" } },
53
new
() { ResponseId = "someResponse", ModelId = "model123", StartTime = TimeSpan.FromSeconds(25), EndTime = TimeSpan.FromSeconds(35) },
96
updates.Add(
new
(text));
117
updates.Add(
new
() { Contents = [new DataContent("data:image/png;base64,aGVsbG8=")] });
139
new
() { Contents = [new TextContent("Hello, ")] },
140
new
() { Contents = [new UsageContent(new() { TotalTokenCount = 42 })] },
141
new
() { Contents = [new TextContent("world!")] },
142
new
() { Contents = [new UsageContent(new() { InputTokenCount = 12, TotalTokenCount = 24 })] },
SpeechToText\SpeechToTextResponseUpdateTests.cs (4)
16
SpeechToTextResponseUpdate update =
new
();
30
SpeechToTextResponseUpdate update =
new
()
60
SpeechToTextResponseUpdate update =
new
(
85
SpeechToTextResponseUpdate original =
new
()
Microsoft.Extensions.AI.OpenAI (1)
OpenAISpeechToTextClient.cs (1)
134
SpeechToTextResponseUpdate result =
new
()
Microsoft.Extensions.AI.Tests (6)
SpeechToText\ConfigureOptionsSpeechToTextClientTests.cs (1)
39
var expectedUpdates = Enumerable.Range(0, 3).Select(i => new
SpeechToTextResponseUpdate
()).ToArray();
SpeechToText\LoggingSpeechToTextClientTests.cs (2)
111
yield return new
SpeechToTextResponseUpdate
("blue ");
112
yield return new
SpeechToTextResponseUpdate
("whale");
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (3)
69
yield return
new
("This is");
70
yield return
new
(" the recognized");
71
yield return
new
()
184 references to SpeechToTextResponseUpdate
Microsoft.Extensions.AI (9)
SpeechToText\ConfigureOptionsSpeechToTextClient.cs (2)
48
public override async IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
51
await foreach (
var
update in base.GetStreamingTextAsync(audioSpeechStream, Configure(options), cancellationToken))
SpeechToText\LoggingSpeechToTextClient.cs (3)
104
public override async IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
119
IAsyncEnumerator<
SpeechToTextResponseUpdate
> e;
137
SpeechToTextResponseUpdate
? update = null;
SpeechToText\OpenTelemetrySpeechToTextClient.cs (4)
133
public override async IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
142
IAsyncEnumerable<
SpeechToTextResponseUpdate
> updates;
154
List<
SpeechToTextResponseUpdate
> trackedUpdates = [];
160
SpeechToTextResponseUpdate
update;
Microsoft.Extensions.AI.Abstractions (83)
Generated\361d1da7f942c932\JsonContext.IReadOnlyListSpeechToTextResponseUpdate.g.cs (12)
15
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>>? _IReadOnlyListSpeechToTextResponseUpdate;
21
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>> IReadOnlyListSpeechToTextResponseUpdate
24
get => _IReadOnlyListSpeechToTextResponseUpdate ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>));
27
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>> Create_IReadOnlyListSpeechToTextResponseUpdate(global::System.Text.Json.JsonSerializerOptions options)
29
if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>> jsonTypeInfo))
31
var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>>
37
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIEnumerableInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>, global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>(options, info);
47
private void IReadOnlyListSpeechToTextResponseUpdateSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>? value)
57
foreach (global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
element in value)
Generated\361d1da7f942c932\JsonContext.SpeechToTextResponseUpdate.g.cs (42)
15
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>? _SpeechToTextResponseUpdate;
21
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
> SpeechToTextResponseUpdate
24
get => _SpeechToTextResponseUpdate ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
));
27
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
> Create_SpeechToTextResponseUpdate(global::System.Text.Json.JsonSerializerOptions options)
29
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
> jsonTypeInfo))
31
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>
37
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).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.
SpeechToTextResponseUpdate
>(options, objectInfo);
58
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
60
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).Kind,
61
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).Kind = value!,
68
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("Kind", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.SpeechToTextResponseUpdateKind), global::System.Array.Empty<global::System.Type>(), null),
78
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
80
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).ResponseId,
81
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).ResponseId = value!,
88
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
98
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
100
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).StartTime,
101
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).StartTime = value!,
108
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("StartTime", InstanceMemberBindingFlags, null, typeof(global::System.TimeSpan?), global::System.Array.Empty<global::System.Type>(), null),
118
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
120
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).EndTime,
121
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).EndTime = value!,
128
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("EndTime", InstanceMemberBindingFlags, null, typeof(global::System.TimeSpan?), global::System.Array.Empty<global::System.Type>(), null),
138
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
140
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).ModelId,
141
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).ModelId = value!,
148
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
158
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
168
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
178
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
180
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).AdditionalProperties,
181
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).AdditionalProperties = value!,
188
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null),
198
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
208
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("Text", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
219
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
221
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).Contents,
222
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).Contents = value!,
229
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).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)
304
if (type == typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
))
428
if (type == typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>))
SpeechToText\DelegatingSpeechToTextClient.cs (1)
52
public virtual IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
SpeechToText\ISpeechToTextClient.cs (1)
47
IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
SpeechToText\SpeechToTextClientExtensions.cs (1)
63
public static IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
SpeechToText\SpeechToTextResponse.cs (4)
74
/// <summary>Creates an array of <see cref="
SpeechToTextResponseUpdate
" /> instances that represent this <see cref="SpeechToTextResponse" />.</summary>
75
/// <returns>An array of <see cref="
SpeechToTextResponseUpdate
" /> instances that may be used to represent this <see cref="SpeechToTextResponse" />.</returns>
76
public
SpeechToTextResponseUpdate
[] ToSpeechToTextResponseUpdates()
84
SpeechToTextResponseUpdate
update = new()
SpeechToText\SpeechToTextResponseUpdate.cs (8)
17
/// <para><see cref="
SpeechToTextResponseUpdate
"/> is so named because it represents streaming updates
21
/// but all of those with a non-<see langword="null"/> value must have the same value (e.g. <see cref="
SpeechToTextResponseUpdate
.ResponseId"/>).
24
/// The relationship between <see cref="SpeechToTextResponse"/> and <see cref="
SpeechToTextResponseUpdate
"/> is
28
/// all have different <see cref="
SpeechToTextResponseUpdate
.RawRepresentation"/> objects whereas there's
37
/// <summary>Initializes a new instance of the <see cref="
SpeechToTextResponseUpdate
"/> class.</summary>
43
/// <summary>Initializes a new instance of the <see cref="
SpeechToTextResponseUpdate
"/> class.</summary>
50
/// <summary>Initializes a new instance of the <see cref="
SpeechToTextResponseUpdate
"/> class.</summary>
74
/// If a <see cref="
SpeechToTextResponseUpdate
"/> is created to represent some underlying object from another object
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (10)
14
/// Provides extension methods for working with <see cref="
SpeechToTextResponseUpdate
"/> instances.
19
/// <summary>Combines <see cref="
SpeechToTextResponseUpdate
"/> instances into a single <see cref="SpeechToTextResponse"/>.</summary>
23
this IEnumerable<
SpeechToTextResponseUpdate
> updates)
29
foreach (
var
update in updates)
39
/// <summary>Combines <see cref="
SpeechToTextResponseUpdate
"/> instances into a single <see cref="SpeechToTextResponse"/>.</summary>
44
this IAsyncEnumerable<
SpeechToTextResponseUpdate
> updates, CancellationToken cancellationToken = default)
51
IAsyncEnumerable<
SpeechToTextResponseUpdate
> updates, CancellationToken cancellationToken)
55
await foreach (
var
update in updates.WithCancellation(cancellationToken).ConfigureAwait(false))
66
/// <summary>Processes the <see cref="
SpeechToTextResponseUpdate
"/>, incorporating its contents and properties.</summary>
70
SpeechToTextResponseUpdate
update,
Utilities\AIJsonUtilities.Defaults.cs (2)
128
[JsonSerializable(typeof(
SpeechToTextResponseUpdate
))]
129
[JsonSerializable(typeof(IReadOnlyList<
SpeechToTextResponseUpdate
>))]
Microsoft.Extensions.AI.Abstractions.Tests (71)
Generated\361d1da7f942c932\TestJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
310
if (type == typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
))
Generated\361d1da7f942c932\TestJsonSerializerContext.SpeechToTextResponseUpdate.g.cs (42)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>? _SpeechToTextResponseUpdate;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
> SpeechToTextResponseUpdate
22
get => _SpeechToTextResponseUpdate ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
> Create_SpeechToTextResponseUpdate(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
> jsonTypeInfo))
29
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
>
35
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).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.
SpeechToTextResponseUpdate
>(options, objectInfo);
56
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
58
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).Kind,
59
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).Kind = value!,
66
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("Kind", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.SpeechToTextResponseUpdateKind), global::System.Array.Empty<global::System.Type>(), null),
76
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
78
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).ResponseId,
79
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).ResponseId = value!,
86
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
96
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
98
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).StartTime,
99
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).StartTime = value!,
106
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("StartTime", InstanceMemberBindingFlags, null, typeof(global::System.TimeSpan?), global::System.Array.Empty<global::System.Type>(), null),
116
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
118
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).EndTime,
119
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).EndTime = value!,
126
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("EndTime", InstanceMemberBindingFlags, null, typeof(global::System.TimeSpan?), global::System.Array.Empty<global::System.Type>(), null),
136
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
138
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).ModelId,
139
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).ModelId = value!,
146
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
156
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
166
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
176
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
178
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).AdditionalProperties,
179
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).AdditionalProperties = value!,
186
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null),
196
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
206
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("Text", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
217
DeclaringType = typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
),
219
Getter = static obj => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).Contents,
220
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
)obj).Contents = value!,
227
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
SpeechToTextResponseUpdate
).GetProperty("Contents", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.AIContent>), global::System.Array.Empty<global::System.Type>(), null),
SpeechToText\DelegatingSpeechToTextClientTests.cs (1)
60
SpeechToTextResponseUpdate
[] expectedResults =
SpeechToText\SpeechToTextClientExtensionsTests.cs (5)
64
var
update = new SpeechToTextResponseUpdate();
71
await foreach (
var
update in SpeechToTextClientExtensions.GetStreamingTextAsync(
85
private static async IAsyncEnumerable<
SpeechToTextResponseUpdate
> YieldAsync(params
SpeechToTextResponseUpdate
[] updates)
88
foreach (
var
update in updates)
SpeechToText\SpeechToTextClientTests.cs (3)
59
List<
SpeechToTextResponseUpdate
> updates = [];
60
await foreach (
var
update in SpeechToTextClientExtensions.GetStreamingTextAsync(
77
private static async IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingUpdatesAsync()
SpeechToText\SpeechToTextResponseTests.cs (2)
223
SpeechToTextResponseUpdate
[] updates = response.ToSpeechToTextResponseUpdates();
228
SpeechToTextResponseUpdate
update = updates[0];
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (7)
38
Assert.Throws<ArgumentNullException>("updates", () => ((List<
SpeechToTextResponseUpdate
>)null!).ToSpeechToTextResponse());
46
SpeechToTextResponseUpdate
[] updates =
81
List<
SpeechToTextResponseUpdate
> updates = [];
137
SpeechToTextResponseUpdate
[] updates =
156
private static async IAsyncEnumerable<
SpeechToTextResponseUpdate
> YieldAsync(IEnumerable<
SpeechToTextResponseUpdate
> updates)
158
foreach (
SpeechToTextResponseUpdate
update in updates)
SpeechToText\SpeechToTextResponseUpdateTests.cs (7)
16
SpeechToTextResponseUpdate
update = new();
30
SpeechToTextResponseUpdate
update = new()
60
SpeechToTextResponseUpdate
update = new(
85
SpeechToTextResponseUpdate
original = new()
99
SpeechToTextResponseUpdate
? result = JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.SpeechToTextResponseUpdate);
136
SpeechToTextResponseUpdate
? result = JsonSerializer.Deserialize<
SpeechToTextResponseUpdate
>(Json, AIJsonUtilities.DefaultOptions);
TestJsonSerializerContext.cs (1)
20
[JsonSerializable(typeof(
SpeechToTextResponseUpdate
))]
TestSpeechToTextClient.cs (2)
32
IAsyncEnumerable<
SpeechToTextResponseUpdate
>>?
47
public IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
Microsoft.Extensions.AI.Integration.Tests (3)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
32
IAsyncEnumerable<
SpeechToTextResponseUpdate
>>?
47
public IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
SpeechToTextClientIntegrationTests.cs (1)
51
await foreach (
var
chunk in _client.GetStreamingTextAsync(audioSpeechStream))
Microsoft.Extensions.AI.OpenAI (3)
OpenAISpeechToTextClient.cs (3)
112
public async IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
121
foreach (
var
update in (await GetTextAsync(audioSpeechStream, options, cancellationToken).ConfigureAwait(false)).ToSpeechToTextResponseUpdates())
134
SpeechToTextResponseUpdate
result = new()
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAISpeechToTextClientTests.cs (6)
165
await foreach (
var
update in client.GetStreamingTextAsync(audioSpeechStream, new SpeechToTextOptions
200
await foreach (
var
update in client.GetStreamingTextAsync(audioSpeechStream, new SpeechToTextOptions
316
var updates = new System.Collections.Generic.List<
SpeechToTextResponseUpdate
>();
317
await foreach (
var
update in client.GetStreamingTextAsync(audioSpeechStream))
433
await foreach (
var
update in client.GetStreamingTextAsync(audioSpeechStream))
499
await foreach (
var
update in client.GetStreamingTextAsync(audioSpeechStream))
Microsoft.Extensions.AI.Tests (9)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
32
IAsyncEnumerable<
SpeechToTextResponseUpdate
>>?
47
public IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetStreamingTextAsync(
SpeechToText\ConfigureOptionsSpeechToTextClientTests.cs (3)
92
static async IAsyncEnumerable<
SpeechToTextResponseUpdate
> YieldUpdates(
SpeechToTextResponseUpdate
[] updates)
94
foreach (
var
update in updates)
SpeechToText\LoggingSpeechToTextClientTests.cs (2)
108
static async IAsyncEnumerable<
SpeechToTextResponseUpdate
> GetUpdatesAsync()
121
await foreach (
var
update in client.GetStreamingTextAsync(
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (2)
65
static async IAsyncEnumerable<
SpeechToTextResponseUpdate
> TestClientStreamAsync(
188
await foreach (
var
update in client.GetStreamingTextAsync(Stream.Null))