16 instantiations of TextToSpeechResponse
Microsoft.Extensions.AI.Abstractions (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.TextToSpeechResponse.g.cs (1)
33
ObjectCreator = () => new global::Microsoft.Extensions.AI.
TextToSpeechResponse
(),
TextToSpeech\TextToSpeechResponseUpdateExtensions.cs (2)
27
TextToSpeechResponse response =
new
();
51
TextToSpeechResponse response =
new
();
Microsoft.Extensions.AI.Abstractions.Tests (9)
Generated\361d1da7f942c932\TestJsonSerializerContext.TextToSpeechResponse.g.cs (1)
31
ObjectCreator = () => new global::Microsoft.Extensions.AI.
TextToSpeechResponse
(),
TextToSpeech\DelegatingTextToSpeechClientTests.cs (1)
28
var expectedResponse = new
TextToSpeechResponse
([]);
TextToSpeech\TextToSpeechClientTests.cs (1)
24
return Task.FromResult(new
TextToSpeechResponse
([new DataContent(new byte[] { 1, 2, 3 }, "audio/mpeg")]));
TextToSpeech\TextToSpeechResponseTests.cs (6)
16
Assert.Throws<ArgumentNullException>("contents", () => new
TextToSpeechResponse
(null!));
22
TextToSpeechResponse response =
new
();
44
TextToSpeechResponse response =
new
(content);
65
TextToSpeechResponse response =
new
();
97
TextToSpeechResponse original =
new
()
138
TextToSpeechResponse response =
new
()
Microsoft.Extensions.AI.OpenAI (1)
OpenAITextToSpeechClient.cs (1)
72
return new
TextToSpeechResponse
([new DataContent(result.Value.ToMemory(), mediaType)])
Microsoft.Extensions.AI.Tests (3)
TextToSpeech\ConfigureOptionsTextToSpeechClientTests.cs (1)
37
TextToSpeechResponse expectedResponse =
new
([]);
TextToSpeech\LoggingTextToSpeechClientTests.cs (1)
59
return Task.FromResult(new
TextToSpeechResponse
([new DataContent(new byte[] { 1, 2, 3 }, "audio/mpeg")]));
TextToSpeech\OpenTelemetryTextToSpeechClientTests.cs (1)
44
return
new
([new DataContent(new byte[] { 1, 2, 3 }, "audio/mpeg")])
125 references to TextToSpeechResponse
Microsoft.Extensions.AI (7)
TextToSpeech\ConfigureOptionsTextToSpeechClient.cs (1)
40
public override async Task<
TextToSpeechResponse
> GetAudioAsync(
TextToSpeech\LoggingTextToSpeechClient.cs (2)
57
public override async Task<
TextToSpeechResponse
> GetAudioAsync(
74
var
response = await base.GetAudioAsync(text, options, cancellationToken);
TextToSpeech\OpenTelemetryTextToSpeechClient.cs (4)
105
public override async Task<
TextToSpeechResponse
> GetAudioAsync(string text, TextToSpeechOptions? options = null, CancellationToken cancellationToken = default)
113
TextToSpeechResponse
? response = null;
243
TextToSpeechResponse
? response,
314
void 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)
332
if (type == typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
))
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.TextToSpeechResponse.g.cs (32)
15
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
>? _TextToSpeechResponse;
21
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
> TextToSpeechResponse
24
get => _TextToSpeechResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
));
27
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
> Create_TextToSpeechResponse(global::System.Text.Json.JsonSerializerOptions options)
29
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.
TextToSpeechResponse
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
> jsonTypeInfo))
31
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.
TextToSpeechResponse
>
37
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
).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.
TextToSpeechResponse
>(options, objectInfo);
58
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
60
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).ResponseId,
61
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).ResponseId = value!,
68
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
78
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
80
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).ModelId,
81
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).ModelId = value!,
88
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
98
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
108
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
118
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
120
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).AdditionalProperties,
121
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).AdditionalProperties = value!,
128
AttributeProviderFactory = 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),
138
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
140
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).Contents,
141
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).Contents = value!,
148
AttributeProviderFactory = 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),
159
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
161
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).Usage,
162
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).Usage = value!,
169
AttributeProviderFactory = 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)
44
public virtual Task<
TextToSpeechResponse
> GetAudioAsync(
TextToSpeech\ITextToSpeechClient.cs (1)
36
Task<
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>
22
public static
TextToSpeechResponse
ToTextToSpeechResponse(
27
TextToSpeechResponse
response = new();
37
/// <summary>Combines <see cref="TextToSpeechResponseUpdate"/> instances into a single <see cref="
TextToSpeechResponse
"/>.</summary>
40
/// <returns>The combined <see cref="
TextToSpeechResponse
"/>.</returns>
41
public static Task<
TextToSpeechResponse
> ToTextToSpeechResponseAsync(
48
static async Task<
TextToSpeechResponse
> ToResponseAsync(
51
TextToSpeechResponse
response = new();
64
/// <param name="response">The <see cref="
TextToSpeechResponse
"/> object that should be updated based on <paramref name="update"/>.</param>
67
TextToSpeechResponse
response)
Utilities\AIJsonUtilities.Defaults.cs (1)
134
[JsonSerializable(typeof(
TextToSpeechResponse
))]
Microsoft.Extensions.AI.Abstractions.Tests (49)
Generated\361d1da7f942c932\TestJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
334
if (type == typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
))
Generated\361d1da7f942c932\TestJsonSerializerContext.TextToSpeechResponse.g.cs (32)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
>? _TextToSpeechResponse;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
> TextToSpeechResponse
22
get => _TextToSpeechResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
> Create_TextToSpeechResponse(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.
TextToSpeechResponse
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.
TextToSpeechResponse
> jsonTypeInfo))
29
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.
TextToSpeechResponse
>
35
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
).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.
TextToSpeechResponse
>(options, objectInfo);
56
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
58
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).ResponseId,
59
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).ResponseId = value!,
66
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
76
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
78
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).ModelId,
79
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).ModelId = value!,
86
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
96
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
106
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
116
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
118
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).AdditionalProperties,
119
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).AdditionalProperties = value!,
126
AttributeProviderFactory = 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),
136
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
138
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).Contents,
139
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).Contents = value!,
146
AttributeProviderFactory = 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),
158
DeclaringType = typeof(global::Microsoft.Extensions.AI.
TextToSpeechResponse
),
160
Getter = static obj => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).Usage,
161
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.
TextToSpeechResponse
)obj).Usage = value!,
168
AttributeProviderFactory = 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)
24
Task<
TextToSpeechResponse
>>?
40
public Task<
TextToSpeechResponse
> GetAudioAsync(
TextToSpeech\DelegatingTextToSpeechClientTests.cs (2)
27
var expectedResult = new TaskCompletionSource<
TextToSpeechResponse
>();
28
var
expectedResponse = new TextToSpeechResponse([]);
TextToSpeech\TextToSpeechClientTests.cs (1)
29
TextToSpeechResponse
response = await client.GetAudioAsync("Hello, world!", expectedOptions, cts.Token);
TextToSpeech\TextToSpeechResponseTests.cs (8)
22
TextToSpeechResponse
response = new();
44
TextToSpeechResponse
response = new(content);
65
TextToSpeechResponse
response = new();
97
TextToSpeechResponse
original = new()
112
TextToSpeechResponse
? result = JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.TextToSpeechResponse);
138
TextToSpeechResponse
response = new()
202
TextToSpeechResponse
? result = JsonSerializer.Deserialize<
TextToSpeechResponse
>(Json, AIJsonUtilities.DefaultOptions);
TextToSpeech\TextToSpeechResponseUpdateExtensionsTests.cs (2)
32
TextToSpeechResponse
response = useAsync ?
63
TextToSpeechResponse
response = await YieldAsync(updates).ToTextToSpeechResponseAsync();
Microsoft.Extensions.AI.Integration.Tests (4)
TextToSpeechClientIntegrationTests.cs (4)
36
var
response = await _client.GetAudioAsync("Hello, world!");
52
var
response = await _client.GetAudioAsync("The quick brown fox jumps over the lazy dog.", new TextToSpeechOptions
71
var
response = await _client.GetAudioAsync("Testing audio format selection.", new TextToSpeechOptions
90
var
response = await _client.GetAudioAsync("This should be spoken quickly.", new TextToSpeechOptions
Microsoft.Extensions.AI.OpenAI (1)
OpenAITextToSpeechClient.cs (1)
57
public async Task<
TextToSpeechResponse
> GetAudioAsync(
Microsoft.Extensions.AI.OpenAI.Tests (5)
OpenAITextToSpeechClientTests.cs (5)
81
var
response = await client.GetAudioAsync("Hello world");
109
var
response = await client.GetAudioAsync("Hello world", new TextToSpeechOptions
138
var
response = await client.GetAudioAsync("Hello world", new TextToSpeechOptions
171
var
response = await client.GetAudioAsync("Hello world", new TextToSpeechOptions
201
var
response = await client.GetAudioAsync("Hello world", new()
Microsoft.Extensions.AI.Tests (4)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestTextToSpeechClient.cs (2)
24
Task<
TextToSpeechResponse
>>?
40
public Task<
TextToSpeechResponse
> GetAudioAsync(
TextToSpeech\ConfigureOptionsTextToSpeechClientTests.cs (2)
37
TextToSpeechResponse
expectedResponse = new([]);
76
var
response = await client.GetAudioAsync("Hello, world!", providedOptions, cts.Token);