20 instantiations of SpeechToTextResponse
Microsoft.Extensions.AI.Abstractions (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.SpeechToTextResponse.g.cs (1)
33ObjectCreator = () => new global::Microsoft.Extensions.AI.SpeechToTextResponse(),
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
27SpeechToTextResponse response = new(); 53SpeechToTextResponse response = new();
Microsoft.Extensions.AI.Abstractions.Tests (13)
Generated\361d1da7f942c932\TestJsonSerializerContext.SpeechToTextResponse.g.cs (1)
31ObjectCreator = () => new global::Microsoft.Extensions.AI.SpeechToTextResponse(),
SpeechToText\DelegatingSpeechToTextClientTests.cs (1)
29var expectedResponse = new SpeechToTextResponse([]);
SpeechToText\SpeechToTextClientTests.cs (2)
17var expectedResponse = new SpeechToTextResponse("hello"); 27return Task.FromResult(new SpeechToTextResponse("hello"));
SpeechToText\SpeechToTextResponseTests.cs (9)
17Assert.Throws<ArgumentNullException>("contents", () => new SpeechToTextResponse((IList<AIContent>)null!)); 23SpeechToTextResponse response = new(); 42SpeechToTextResponse response = new(text); 64Assert.Throws<ArgumentNullException>("contents", () => new SpeechToTextResponse((IList<AIContent>)null!)); 79SpeechToTextResponse response = new(content); 104SpeechToTextResponse response = new(); 146SpeechToTextResponse original = new() 196SpeechToTextResponse response = new("This is a test." + Environment.NewLine + "It's multiple lines."); 206SpeechToTextResponse response = new()
Microsoft.Extensions.AI.OpenAI (1)
OpenAISpeechToTextClient.cs (1)
61SpeechToTextResponse response = new();
Microsoft.Extensions.AI.Tests (3)
SpeechToText\ConfigureOptionsSpeechToTextClientTests.cs (1)
38SpeechToTextResponse expectedResponse = new([]);
SpeechToText\LoggingSpeechToTextClientTests.cs (1)
61return Task.FromResult(new SpeechToTextResponse("blue whale"));
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (1)
47return new("This is the recognized text.")
152 references to SpeechToTextResponse
Microsoft.Extensions.AI (8)
SpeechToText\ConfigureOptionsSpeechToTextClient.cs (1)
41public override async Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\LoggingSpeechToTextClient.cs (2)
58public override async Task<SpeechToTextResponse> GetTextAsync( 75var response = await base.GetTextAsync(audioSpeechStream, options, cancellationToken);
SpeechToText\OpenTelemetrySpeechToTextClient.cs (5)
106public override async Task<SpeechToTextResponse> GetTextAsync(Stream audioSpeechStream, SpeechToTextOptions? options = null, CancellationToken cancellationToken = default) 114SpeechToTextResponse? response = null; 244SpeechToTextResponse? response, 320void AddMetricTags(ref TagList tags, string? requestModelId, SpeechToTextResponse? response) 344private void AddOutputMessagesTags(SpeechToTextResponse response, Activity? activity)
Microsoft.Extensions.AI.Abstractions (67)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.GetJsonTypeInfo.g.cs (1)
296if (type == typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse))
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.SpeechToTextResponse.g.cs (42)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse>? _SpeechToTextResponse; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse> SpeechToTextResponse 24get => _SpeechToTextResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse> Create_SpeechToTextResponse(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.SpeechToTextResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse> jsonTypeInfo)) 31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.SpeechToTextResponse> 37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), 41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse>(options, objectInfo); 58DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 60Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).StartTime, 61Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).StartTime = value!, 68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("StartTime", InstanceMemberBindingFlags, null, typeof(global::System.TimeSpan?), global::System.Array.Empty<global::System.Type>(), null), 78DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 80Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).EndTime, 81Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).EndTime = value!, 88AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("EndTime", InstanceMemberBindingFlags, null, typeof(global::System.TimeSpan?), global::System.Array.Empty<global::System.Type>(), null), 98DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 100Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).ResponseId, 101Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).ResponseId = value!, 108AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 118DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 120Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).ModelId, 121Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).ModelId = value!, 128AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 138DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 148AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null), 158DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 160Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).AdditionalProperties, 161Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).AdditionalProperties = value!, 168AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null), 178DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 188AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("Text", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 199DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 201Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Contents, 202Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Contents = value!, 209AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("Contents", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.AIContent>), global::System.Array.Empty<global::System.Type>(), null), 220DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 222Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Usage, 223Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Usage = value!, 230AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("Usage", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.UsageDetails), global::System.Array.Empty<global::System.Type>(), null),
SpeechToText\DelegatingSpeechToTextClient.cs (1)
45public virtual Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\ISpeechToTextClient.cs (1)
37Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\SpeechToTextClientExtensions.cs (1)
41public static Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\SpeechToTextResponse.cs (6)
20/// <summary>Initializes a new instance of the <see cref="SpeechToTextResponse"/> class.</summary> 26/// <summary>Initializes a new instance of the <see cref="SpeechToTextResponse"/> class.</summary> 33/// <summary>Initializes a new instance of the <see cref="SpeechToTextResponse"/> class.</summary> 54/// If a <see cref="SpeechToTextResponse"/> is created to represent some underlying object from another object 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>
SpeechToText\SpeechToTextResponseUpdate.cs (3)
24/// The relationship between <see cref="SpeechToTextResponse"/> and <see cref="SpeechToTextResponseUpdate"/> is 26/// <see cref="SpeechToTextResponse.ToSpeechToTextResponseUpdates"/>, which enable bidirectional conversions 29/// only one slot for such an object available in <see cref="SpeechToTextResponse.RawRepresentation"/>.
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (11)
19/// <summary>Combines <see cref="SpeechToTextResponseUpdate"/> instances into a single <see cref="SpeechToTextResponse"/>.</summary> 21/// <returns>The combined <see cref="SpeechToTextResponse"/>.</returns> 22public static SpeechToTextResponse ToSpeechToTextResponse( 27SpeechToTextResponse response = new(); 39/// <summary>Combines <see cref="SpeechToTextResponseUpdate"/> instances into a single <see cref="SpeechToTextResponse"/>.</summary> 42/// <returns>The combined <see cref="SpeechToTextResponse"/>.</returns> 43public static Task<SpeechToTextResponse> ToSpeechToTextResponseAsync( 50static async Task<SpeechToTextResponse> ToResponseAsync( 53SpeechToTextResponse response = new(); 68/// <param name="response">The <see cref="SpeechToTextResponse"/> object that should be updated based on <paramref name="update"/>.</param> 71SpeechToTextResponse response)
Utilities\AIJsonUtilities.Defaults.cs (1)
127[JsonSerializable(typeof(SpeechToTextResponse))]
Microsoft.Extensions.AI.Abstractions.Tests (63)
Generated\361d1da7f942c932\TestJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
306if (type == typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse))
Generated\361d1da7f942c932\TestJsonSerializerContext.SpeechToTextResponse.g.cs (42)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse>? _SpeechToTextResponse; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse> SpeechToTextResponse 22get => _SpeechToTextResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse> Create_SpeechToTextResponse(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.SpeechToTextResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.SpeechToTextResponse> 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.SpeechToTextResponse>(options, objectInfo); 56DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 58Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).StartTime, 59Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).StartTime = value!, 66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("StartTime", InstanceMemberBindingFlags, null, typeof(global::System.TimeSpan?), global::System.Array.Empty<global::System.Type>(), null), 76DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 78Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).EndTime, 79Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).EndTime = value!, 86AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("EndTime", InstanceMemberBindingFlags, null, typeof(global::System.TimeSpan?), global::System.Array.Empty<global::System.Type>(), null), 96DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 98Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).ResponseId, 99Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).ResponseId = value!, 106AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 116DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 118Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).ModelId, 119Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).ModelId = value!, 126AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 136DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 146AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null), 156DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 158Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).AdditionalProperties, 159Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).AdditionalProperties = value!, 166AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null), 176DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 186AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("Text", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 197DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 199Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Contents, 200Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Contents = value!, 207AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("Contents", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.AIContent>), global::System.Array.Empty<global::System.Type>(), null), 219DeclaringType = typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse), 221Getter = static obj => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Usage, 222Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.SpeechToTextResponse)obj).Usage = value!, 229AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.SpeechToTextResponse).GetProperty("Usage", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.UsageDetails), global::System.Array.Empty<global::System.Type>(), null),
SpeechToText\DelegatingSpeechToTextClientTests.cs (2)
28var expectedResult = new TaskCompletionSource<SpeechToTextResponse>(); 29var expectedResponse = new SpeechToTextResponse([]);
SpeechToText\SpeechToTextClientTests.cs (2)
17var expectedResponse = new SpeechToTextResponse("hello"); 32SpeechToTextResponse response = await SpeechToTextClientExtensions.GetTextAsync(
SpeechToText\SpeechToTextResponseTests.cs (10)
23SpeechToTextResponse response = new(); 42SpeechToTextResponse response = new(text); 79SpeechToTextResponse response = new(content); 104SpeechToTextResponse response = new(); 146SpeechToTextResponse original = new() 166SpeechToTextResponse? result = JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.SpeechToTextResponse); 196SpeechToTextResponse response = new("This is a test." + Environment.NewLine + "It's multiple lines."); 206SpeechToTextResponse response = new() 278SpeechToTextResponse? result = JsonSerializer.Deserialize<SpeechToTextResponse>(Json, AIJsonUtilities.DefaultOptions);
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (3)
56SpeechToTextResponse response = useAsync ? 121SpeechToTextResponse response = useAsync ? await YieldAsync(updates).ToSpeechToTextResponseAsync() : updates.ToSpeechToTextResponse(); 145SpeechToTextResponse response = await YieldAsync(updates).ToSpeechToTextResponseAsync();
TestJsonSerializerContext.cs (1)
19[JsonSerializable(typeof(SpeechToTextResponse))]
TestSpeechToTextClient.cs (2)
25Task<SpeechToTextResponse>>? 41public Task<SpeechToTextResponse> GetTextAsync(
Microsoft.Extensions.AI.Integration.Tests (4)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
25Task<SpeechToTextResponse>>? 41public Task<SpeechToTextResponse> GetTextAsync(
SpeechToTextClientIntegrationTests.cs (2)
38var response = await _client.GetTextAsync(audioSpeechStream); 72var response = await _client.GetTextAsync(audioSpeechStream);
Microsoft.Extensions.AI.OpenAI (2)
OpenAISpeechToTextClient.cs (2)
56public async Task<SpeechToTextResponse> GetTextAsync( 61SpeechToTextResponse response = new();
Microsoft.Extensions.AI.OpenAI.Tests (3)
OpenAISpeechToTextClientTests.cs (3)
90var response = await client.GetTextAsync(audioSpeechStream, new SpeechToTextOptions 402var response = await client.GetTextAsync(audioSpeechStream); 466var response = await client.GetTextAsync(audioSpeechStream);
Microsoft.Extensions.AI.Tests (5)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
25Task<SpeechToTextResponse>>? 41public Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\ConfigureOptionsSpeechToTextClientTests.cs (2)
38SpeechToTextResponse expectedResponse = new([]); 78var response = await client.GetTextAsync(audioSpeechStream, providedOptions, cts.Token);
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (1)
104var response = streaming ?