16 instantiations of SpeechToTextResponse
Microsoft.Extensions.AI.Abstractions (2)
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
27SpeechToTextResponse response = new(); 72SpeechToTextResponse response = new();
Microsoft.Extensions.AI.Abstractions.Tests (12)
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(); 41SpeechToTextResponse response = new(text); 63Assert.Throws<ArgumentNullException>("contents", () => new SpeechToTextResponse((IList<AIContent>)null!)); 78SpeechToTextResponse response = new(content); 103SpeechToTextResponse response = new(); 140SpeechToTextResponse original = new() 184SpeechToTextResponse response = new("This is a test." + Environment.NewLine + "It's multiple lines."); 192SpeechToTextResponse response = new()
Microsoft.Extensions.AI.OpenAI (1)
OpenAISpeechToTextClient.cs (1)
87SpeechToTextResponse response = new();
Microsoft.Extensions.AI.Tests (1)
SpeechToText\LoggingSpeechToTextClientTests.cs (1)
61return Task.FromResult(new SpeechToTextResponse("blue whale"));
56 references to SpeechToTextResponse
Microsoft.Extensions.AI (3)
SpeechToText\ConfigureOptionsSpeechToTextClient.cs (1)
40public override async Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\LoggingSpeechToTextClient.cs (2)
49public override async Task<SpeechToTextResponse> GetTextAsync( 66var response = await base.GetTextAsync(audioSpeechStream, options, cancellationToken);
Microsoft.Extensions.AI.Abstractions (22)
SpeechToText\DelegatingSpeechToTextClient.cs (1)
44public virtual Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\ISpeechToTextClient.cs (1)
36Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\SpeechToTextClientExtensions.cs (1)
40public static Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\SpeechToTextResponse.cs (6)
21/// <summary>Initializes a new instance of the <see cref="SpeechToTextResponse"/> class.</summary> 27/// <summary>Initializes a new instance of the <see cref="SpeechToTextResponse"/> class.</summary> 34/// <summary>Initializes a new instance of the <see cref="SpeechToTextResponse"/> class.</summary> 55/// If a <see cref="SpeechToTextResponse"/> is created to represent some underlying object from another object 75/// <summary>Creates an array of <see cref="SpeechToTextResponseUpdate" /> instances that represent this <see cref="SpeechToTextResponse" />.</summary> 76/// <returns>An array of <see cref="SpeechToTextResponseUpdate" /> instances that may be used to represent this <see cref="SpeechToTextResponse" />.</returns>
SpeechToText\SpeechToTextResponseUpdate.cs (3)
25/// The relationship between <see cref="SpeechToTextResponse"/> and <see cref="SpeechToTextResponseUpdate"/> is 27/// <see cref="SpeechToTextResponse.ToSpeechToTextResponseUpdates"/>, which enable bidirectional conversions 30/// only one slot for such an object available in <see cref="SpeechToTextResponse.RawRepresentation"/>.
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (9)
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(); 58/// <summary>Combines <see cref="SpeechToTextResponseUpdate"/> instances into a single <see cref="SpeechToTextResponse"/>.</summary> 61/// <returns>The combined <see cref="SpeechToTextResponse"/>.</returns> 62public static Task<SpeechToTextResponse> ToSpeechToTextResponseAsync( 69static async Task<SpeechToTextResponse> ToResponseAsync( 72SpeechToTextResponse response = new();
Utilities\AIJsonUtilities.Defaults.cs (1)
70[JsonSerializable(typeof(SpeechToTextResponse))]
Microsoft.Extensions.AI.Abstractions.Tests (16)
SpeechToText\DelegatingSpeechToTextClientTests.cs (1)
28var expectedResult = new TaskCompletionSource<SpeechToTextResponse>();
SpeechToText\SpeechToTextClientTests.cs (2)
17var expectedResponse = new SpeechToTextResponse("hello"); 32SpeechToTextResponse response = await SpeechToTextClientExtensions.GetTextAsync(
SpeechToText\SpeechToTextResponseTests.cs (8)
23SpeechToTextResponse response = new(); 41SpeechToTextResponse response = new(text); 78SpeechToTextResponse response = new(content); 103SpeechToTextResponse response = new(); 140SpeechToTextResponse original = new() 159SpeechToTextResponse? result = JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.SpeechToTextResponse); 184SpeechToTextResponse response = new("This is a test." + Environment.NewLine + "It's multiple lines."); 192SpeechToTextResponse response = new()
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (2)
56SpeechToTextResponse response = useAsync ? 119SpeechToTextResponse response = useAsync ? await YieldAsync(updates).ToSpeechToTextResponseAsync() : updates.ToSpeechToTextResponse();
TestJsonSerializerContext.cs (1)
19[JsonSerializable(typeof(SpeechToTextResponse))]
TestSpeechToTextClient.cs (2)
25Task<SpeechToTextResponse>>? 41public Task<SpeechToTextResponse> GetTextAsync(
Microsoft.Extensions.AI.Integration.Tests (3)
SpeechToTextClientIntegrationTests.cs (1)
39var response = await _client.GetTextAsync(audioSpeechStream);
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
25Task<SpeechToTextResponse>>? 41public Task<SpeechToTextResponse> GetTextAsync(
Microsoft.Extensions.AI.OpenAI (7)
OpenAISpeechToTextClient.cs (7)
73var speechResponse = await GetTextAsync(audioSpeechStream, options, cancellationToken).ConfigureAwait(false); 82public async Task<SpeechToTextResponse> GetTextAsync( 87SpeechToTextResponse response = new(); 146/// <summary>Updates a <see cref="SpeechToTextResponse"/> from an OpenAI <see cref="AudioTranscription"/>.</summary> 149private static void UpdateResponseFromOpenAIAudioTranscription(SpeechToTextResponse response, AudioTranscription audioTranscription) 220/// <summary>Updates a <see cref="SpeechToTextResponse"/> from an OpenAI <see cref="AudioTranslation"/>.</summary> 223private static void UpdateResponseFromOpenAIAudioTranslation(SpeechToTextResponse response, AudioTranslation audioTranslation)
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAISpeechToTextClientTests.cs (1)
92var response = await client.GetTextAsync(audioSpeechStream, new SpeechToTextOptions
Microsoft.Extensions.AI.Tests (4)
SpeechToText\ConfigureOptionsSpeechToTextClientTests.cs (2)
38SpeechToTextResponse expectedResponse = new([]); 78var response = await client.GetTextAsync(audioSpeechStream, providedOptions, cts.Token);
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
25Task<SpeechToTextResponse>>? 41public Task<SpeechToTextResponse> GetTextAsync(