14 instantiations of TextToSpeechResponse
Microsoft.Extensions.AI.Abstractions (2)
TextToSpeech\TextToSpeechResponseUpdateExtensions.cs (2)
27TextToSpeechResponse response = new(); 51TextToSpeechResponse response = new();
Microsoft.Extensions.AI.Abstractions.Tests (8)
TextToSpeech\DelegatingTextToSpeechClientTests.cs (1)
28var expectedResponse = new TextToSpeechResponse([]);
TextToSpeech\TextToSpeechClientTests.cs (1)
24return Task.FromResult(new TextToSpeechResponse([new DataContent(new byte[] { 1, 2, 3 }, "audio/mpeg")]));
TextToSpeech\TextToSpeechResponseTests.cs (6)
16Assert.Throws<ArgumentNullException>("contents", () => new TextToSpeechResponse(null!)); 22TextToSpeechResponse response = new(); 44TextToSpeechResponse response = new(content); 65TextToSpeechResponse response = new(); 97TextToSpeechResponse original = new() 138TextToSpeechResponse response = new()
Microsoft.Extensions.AI.OpenAI (1)
OpenAITextToSpeechClient.cs (1)
72return new TextToSpeechResponse([new DataContent(result.Value.ToMemory(), mediaType)])
Microsoft.Extensions.AI.Tests (3)
TextToSpeech\ConfigureOptionsTextToSpeechClientTests.cs (1)
37TextToSpeechResponse expectedResponse = new([]);
TextToSpeech\LoggingTextToSpeechClientTests.cs (1)
59return Task.FromResult(new TextToSpeechResponse([new DataContent(new byte[] { 1, 2, 3 }, "audio/mpeg")]));
TextToSpeech\OpenTelemetryTextToSpeechClientTests.cs (1)
44return new([new DataContent(new byte[] { 1, 2, 3 }, "audio/mpeg")])
59 references to TextToSpeechResponse
Microsoft.Extensions.AI (7)
TextToSpeech\ConfigureOptionsTextToSpeechClient.cs (1)
40public override async Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\LoggingTextToSpeechClient.cs (2)
57public override async Task<TextToSpeechResponse> GetAudioAsync( 74var response = await base.GetAudioAsync(text, options, cancellationToken);
TextToSpeech\OpenTelemetryTextToSpeechClient.cs (4)
105public override async Task<TextToSpeechResponse> GetAudioAsync(string text, TextToSpeechOptions? options = null, CancellationToken cancellationToken = default) 113TextToSpeechResponse? response = null; 243TextToSpeechResponse? response, 314void AddMetricTags(ref TagList tags, string? requestModelId, TextToSpeechResponse? response)
Microsoft.Extensions.AI.Abstractions (22)
TextToSpeech\DelegatingTextToSpeechClient.cs (1)
44public virtual Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\ITextToSpeechClient.cs (1)
36Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\TextToSpeechResponse.cs (5)
16/// <summary>Initializes a new instance of the <see cref="TextToSpeechResponse"/> class.</summary> 22/// <summary>Initializes a new instance of the <see cref="TextToSpeechResponse"/> class.</summary> 37/// If a <see cref="TextToSpeechResponse"/> is created to represent some underlying object from another object 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>
TextToSpeech\TextToSpeechResponseUpdate.cs (3)
23/// The relationship between <see cref="TextToSpeechResponse"/> and <see cref="TextToSpeechResponseUpdate"/> is 25/// <see cref="TextToSpeechResponse.ToTextToSpeechResponseUpdates"/>, which enable bidirectional conversions 28/// only one slot for such an object available in <see cref="TextToSpeechResponse.RawRepresentation"/>.
TextToSpeech\TextToSpeechResponseUpdateExtensions.cs (11)
19/// <summary>Combines <see cref="TextToSpeechResponseUpdate"/> instances into a single <see cref="TextToSpeechResponse"/>.</summary> 21/// <returns>The combined <see cref="TextToSpeechResponse"/>.</returns> 22public static TextToSpeechResponse ToTextToSpeechResponse( 27TextToSpeechResponse response = new(); 37/// <summary>Combines <see cref="TextToSpeechResponseUpdate"/> instances into a single <see cref="TextToSpeechResponse"/>.</summary> 40/// <returns>The combined <see cref="TextToSpeechResponse"/>.</returns> 41public static Task<TextToSpeechResponse> ToTextToSpeechResponseAsync( 48static async Task<TextToSpeechResponse> ToResponseAsync( 51TextToSpeechResponse response = new(); 64/// <param name="response">The <see cref="TextToSpeechResponse"/> object that should be updated based on <paramref name="update"/>.</param> 67TextToSpeechResponse response)
Utilities\AIJsonUtilities.Defaults.cs (1)
134[JsonSerializable(typeof(TextToSpeechResponse))]
Microsoft.Extensions.AI.Abstractions.Tests (16)
TestJsonSerializerContext.cs (1)
23[JsonSerializable(typeof(TextToSpeechResponse))]
TestTextToSpeechClient.cs (2)
24Task<TextToSpeechResponse>>? 40public Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\DelegatingTextToSpeechClientTests.cs (2)
27var expectedResult = new TaskCompletionSource<TextToSpeechResponse>(); 28var expectedResponse = new TextToSpeechResponse([]);
TextToSpeech\TextToSpeechClientTests.cs (1)
29TextToSpeechResponse response = await client.GetAudioAsync("Hello, world!", expectedOptions, cts.Token);
TextToSpeech\TextToSpeechResponseTests.cs (8)
22TextToSpeechResponse response = new(); 44TextToSpeechResponse response = new(content); 65TextToSpeechResponse response = new(); 97TextToSpeechResponse original = new() 112TextToSpeechResponse? result = JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.TextToSpeechResponse); 138TextToSpeechResponse response = new() 202TextToSpeechResponse? result = JsonSerializer.Deserialize<TextToSpeechResponse>(Json, AIJsonUtilities.DefaultOptions);
TextToSpeech\TextToSpeechResponseUpdateExtensionsTests.cs (2)
32TextToSpeechResponse response = useAsync ? 63TextToSpeechResponse response = await YieldAsync(updates).ToTextToSpeechResponseAsync();
Microsoft.Extensions.AI.Integration.Tests (4)
TextToSpeechClientIntegrationTests.cs (4)
36var response = await _client.GetAudioAsync("Hello, world!"); 52var response = await _client.GetAudioAsync("The quick brown fox jumps over the lazy dog.", new TextToSpeechOptions 71var response = await _client.GetAudioAsync("Testing audio format selection.", new TextToSpeechOptions 90var response = await _client.GetAudioAsync("This should be spoken quickly.", new TextToSpeechOptions
Microsoft.Extensions.AI.OpenAI (1)
OpenAITextToSpeechClient.cs (1)
57public async Task<TextToSpeechResponse> GetAudioAsync(
Microsoft.Extensions.AI.OpenAI.Tests (5)
OpenAITextToSpeechClientTests.cs (5)
81var response = await client.GetAudioAsync("Hello world"); 109var response = await client.GetAudioAsync("Hello world", new TextToSpeechOptions 138var response = await client.GetAudioAsync("Hello world", new TextToSpeechOptions 171var response = await client.GetAudioAsync("Hello world", new TextToSpeechOptions 201var response = await client.GetAudioAsync("Hello world", new()
Microsoft.Extensions.AI.Tests (4)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestTextToSpeechClient.cs (2)
24Task<TextToSpeechResponse>>? 40public Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\ConfigureOptionsTextToSpeechClientTests.cs (2)
37TextToSpeechResponse expectedResponse = new([]); 76var response = await client.GetAudioAsync("Hello, world!", providedOptions, cts.Token);