16 instantiations of TextToSpeechResponse
Microsoft.Extensions.AI.Abstractions (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.TextToSpeechResponse.g.cs (1)
33ObjectCreator = () => new global::Microsoft.Extensions.AI.TextToSpeechResponse(),
TextToSpeech\TextToSpeechResponseUpdateExtensions.cs (2)
27TextToSpeechResponse response = new(); 51TextToSpeechResponse response = new();
Microsoft.Extensions.AI.Abstractions.Tests (9)
Generated\361d1da7f942c932\TestJsonSerializerContext.TextToSpeechResponse.g.cs (1)
31ObjectCreator = () => new global::Microsoft.Extensions.AI.TextToSpeechResponse(),
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")])
125 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 (55)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.GetJsonTypeInfo.g.cs (1)
332if (type == typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse))
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.TextToSpeechResponse.g.cs (32)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse>? _TextToSpeechResponse; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse> TextToSpeechResponse 24get => _TextToSpeechResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse> Create_TextToSpeechResponse(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.TextToSpeechResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse> jsonTypeInfo)) 31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.TextToSpeechResponse> 37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).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.TextToSpeechResponse>(options, objectInfo); 58DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 60Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).ResponseId, 61Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).ResponseId = value!, 68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 78DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 80Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).ModelId, 81Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).ModelId = value!, 88AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 98DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 108AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null), 118DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 120Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).AdditionalProperties, 121Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).AdditionalProperties = value!, 128AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null), 138DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 140Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).Contents, 141Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).Contents = value!, 148AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("Contents", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.AIContent>), global::System.Array.Empty<global::System.Type>(), null), 159DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 161Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).Usage, 162Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).Usage = value!, 169AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("Usage", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.UsageDetails), global::System.Array.Empty<global::System.Type>(), null),
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 (49)
Generated\361d1da7f942c932\TestJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
334if (type == typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse))
Generated\361d1da7f942c932\TestJsonSerializerContext.TextToSpeechResponse.g.cs (32)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse>? _TextToSpeechResponse; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse> TextToSpeechResponse 22get => _TextToSpeechResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse> Create_TextToSpeechResponse(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.TextToSpeechResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.TextToSpeechResponse> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.TextToSpeechResponse> 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).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.TextToSpeechResponse>(options, objectInfo); 56DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 58Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).ResponseId, 59Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).ResponseId = value!, 66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 76DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 78Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).ModelId, 79Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).ModelId = value!, 86AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 96DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 106AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null), 116DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 118Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).AdditionalProperties, 119Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).AdditionalProperties = value!, 126AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null), 136DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 138Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).Contents, 139Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).Contents = value!, 146AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("Contents", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.AIContent>), global::System.Array.Empty<global::System.Type>(), null), 158DeclaringType = typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse), 160Getter = static obj => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).Usage, 161Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.TextToSpeechResponse)obj).Usage = value!, 168AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.TextToSpeechResponse).GetProperty("Usage", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.UsageDetails), global::System.Array.Empty<global::System.Type>(), null),
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)
parent\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);