2 types derived from TextToSpeechOptions
Microsoft.Extensions.AI.Abstractions.Tests (2)
TextToSpeech\TextToSpeechOptionsTests.cs (2)
136private class OptionsA : TextToSpeechOptions 177private class PassedNullToBaseOptions : TextToSpeechOptions
20 instantiations of TextToSpeechOptions
Microsoft.Extensions.AI (1)
TextToSpeech\ConfigureOptionsTextToSpeechClient.cs (1)
59options = options?.Clone() ?? new();
Microsoft.Extensions.AI.Abstractions (1)
TextToSpeech\TextToSpeechOptions.cs (1)
102public virtual TextToSpeechOptions Clone() => new(this);
Microsoft.Extensions.AI.Abstractions.Tests (7)
TextToSpeech\DelegatingTextToSpeechClientTests.cs (2)
25var expectedOptions = new TextToSpeechOptions(); 57var expectedOptions = new TextToSpeechOptions();
TextToSpeech\TextToSpeechClientTests.cs (2)
17var expectedOptions = new TextToSpeechOptions(); 41var expectedOptions = new TextToSpeechOptions();
TextToSpeech\TextToSpeechOptionsTests.cs (3)
15TextToSpeechOptions options = new(); 39TextToSpeechOptions options = new(); 83TextToSpeechOptions options = new();
Microsoft.Extensions.AI.Integration.Tests (3)
TextToSpeechClientIntegrationTests.cs (3)
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.Tests (4)
OpenAITextToSpeechClientTests.cs (4)
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)
TextToSpeech\ConfigureOptionsTextToSpeechClientTests.cs (1)
35TextToSpeechOptions? providedOptions = nullProvidedOptions ? null : new() { ModelId = "test" };
TextToSpeech\LoggingTextToSpeechClientTests.cs (2)
70new TextToSpeechOptions { VoiceId = "alloy" }); 121new TextToSpeechOptions { VoiceId = "alloy" }))
TextToSpeech\OpenTelemetryTextToSpeechClientTests.cs (1)
90TextToSpeechOptions options = new()
71 references to TextToSpeechOptions
Microsoft.Extensions.AI (25)
TextToSpeech\ConfigureOptionsTextToSpeechClient.cs (13)
15/// <summary>Represents a delegating text to speech client that configures a <see cref="TextToSpeechOptions"/> instance used by the remainder of the pipeline.</summary> 20private readonly Action<TextToSpeechOptions> _configureOptions; 25/// The delegate to invoke to configure the <see cref="TextToSpeechOptions"/> instance. It is passed a clone of the caller-supplied <see cref="TextToSpeechOptions"/> instance 29/// The <paramref name="configure"/> delegate is passed either a new instance of <see cref="TextToSpeechOptions"/> if 30/// the caller didn't supply a <see cref="TextToSpeechOptions"/> instance, or a clone (via <see cref="TextToSpeechOptions.Clone"/> of the caller-supplied 33public ConfigureOptionsTextToSpeechClient(ITextToSpeechClient innerClient, Action<TextToSpeechOptions> configure) 41string text, TextToSpeechOptions? options = null, CancellationToken cancellationToken = default) 48string text, TextToSpeechOptions? options = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) 56/// <summary>Creates and configures the <see cref="TextToSpeechOptions"/> to pass along to the inner client.</summary> 57private TextToSpeechOptions Configure(TextToSpeechOptions? options)
TextToSpeech\ConfigureOptionsTextToSpeechClientBuilderExtensions.cs (7)
16/// Adds a callback that configures a <see cref="TextToSpeechOptions"/> to be passed to the next client in the pipeline. 20/// The delegate to invoke to configure the <see cref="TextToSpeechOptions"/> instance. 21/// It is passed a clone of the caller-supplied <see cref="TextToSpeechOptions"/> instance (or a newly constructed instance if the caller-supplied instance is <see langword="null"/>). 25/// <see cref="TextToSpeechOptions"/> if the caller didn't supply a <see cref="TextToSpeechOptions"/> instance, or a clone (via <see cref="TextToSpeechOptions.Clone"/>) 30this TextToSpeechClientBuilder builder, Action<TextToSpeechOptions> configure)
TextToSpeech\LoggingTextToSpeechClient.cs (2)
58string text, TextToSpeechOptions? options = null, CancellationToken cancellationToken = default) 98string text, TextToSpeechOptions? options = null, [EnumeratorCancellation] CancellationToken cancellationToken = default)
TextToSpeech\OpenTelemetryTextToSpeechClient.cs (3)
105public override async Task<TextToSpeechResponse> GetAudioAsync(string text, TextToSpeechOptions? options = null, CancellationToken cancellationToken = default) 133string text, TextToSpeechOptions? options = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) 192private Activity? CreateAndConfigureActivity(TextToSpeechOptions? options)
Microsoft.Extensions.AI.Abstractions (15)
TextToSpeech\DelegatingTextToSpeechClient.cs (2)
45string text, TextToSpeechOptions? options = null, CancellationToken cancellationToken = default) 52string text, TextToSpeechOptions? options = null, CancellationToken cancellationToken = default)
TextToSpeech\ITextToSpeechClient.cs (2)
38TextToSpeechOptions? options = null, 49TextToSpeechOptions? options = null,
TextToSpeech\TextToSpeechClientMetadata.cs (1)
41/// An individual request may override this value via <see cref="TextToSpeechOptions.ModelId"/>.
TextToSpeech\TextToSpeechOptions.cs (9)
15/// <summary>Initializes a new instance of the <see cref="TextToSpeechOptions"/> class.</summary> 20/// <summary>Initializes a new instance of the <see cref="TextToSpeechOptions"/> class, performing a shallow copy of all properties from <paramref name="other"/>.</summary> 21protected TextToSpeechOptions(TextToSpeechOptions? other) 87/// is invoked with a <see cref="TextToSpeechOptions" />, that implementation may convert the provided options into 92/// instance further based on other settings supplied on this <see cref="TextToSpeechOptions" /> instance or from other inputs, 95/// properties on <see cref="TextToSpeechOptions" />. 100/// <summary>Produces a clone of the current <see cref="TextToSpeechOptions"/> instance.</summary> 101/// <returns>A clone of the current <see cref="TextToSpeechOptions"/> instance.</returns> 102public virtual TextToSpeechOptions Clone() => new(this);
Utilities\AIJsonUtilities.Defaults.cs (1)
132[JsonSerializable(typeof(TextToSpeechOptions))]
Microsoft.Extensions.AI.Abstractions.Tests (20)
TestJsonSerializerContext.cs (1)
26[JsonSerializable(typeof(TextToSpeechOptions))]
TestTextToSpeechClient.cs (4)
22TextToSpeechOptions?, 29TextToSpeechOptions?, 42TextToSpeechOptions? options = null, 48TextToSpeechOptions? options = null,
TextToSpeech\DelegatingTextToSpeechClientTests.cs (2)
25var expectedOptions = new TextToSpeechOptions(); 57var expectedOptions = new TextToSpeechOptions();
TextToSpeech\TextToSpeechClientTests.cs (2)
17var expectedOptions = new TextToSpeechOptions(); 41var expectedOptions = new TextToSpeechOptions();
TextToSpeech\TextToSpeechOptionsTests.cs (11)
15TextToSpeechOptions options = new(); 25TextToSpeechOptions clone = options.Clone(); 39TextToSpeechOptions options = new(); 68TextToSpeechOptions clone = options.Clone(); 83TextToSpeechOptions options = new(); 101TextToSpeechOptions? deserialized = JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.TextToSpeechOptions); 129TextToSpeechOptions clone = b.Clone(); 150public override TextToSpeechOptions Clone() => new OptionsA(this); 167public override TextToSpeechOptions Clone() => new OptionsB(this); 203TextToSpeechOptions? result = JsonSerializer.Deserialize<TextToSpeechOptions>(Json, AIJsonUtilities.DefaultOptions);
Microsoft.Extensions.AI.OpenAI (3)
OpenAITextToSpeechClient.cs (3)
58string text, TextToSpeechOptions? options = null, CancellationToken cancellationToken = default) 81string text, TextToSpeechOptions? options = null, [EnumeratorCancellation] CancellationToken cancellationToken = default) 158private SpeechGenerationOptions ToOpenAISpeechOptions(TextToSpeechOptions? options)
Microsoft.Extensions.AI.Tests (8)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestTextToSpeechClient.cs (4)
22TextToSpeechOptions?, 29TextToSpeechOptions?, 42TextToSpeechOptions? options = null, 48TextToSpeechOptions? options = null,
TextToSpeech\ConfigureOptionsTextToSpeechClientTests.cs (2)
35TextToSpeechOptions? providedOptions = nullProvidedOptions ? null : new() { ModelId = "test" }; 36TextToSpeechOptions? returnedOptions = null;
TextToSpeech\OpenTelemetryTextToSpeechClientTests.cs (2)
63string text, TextToSpeechOptions? options, [EnumeratorCancellation] CancellationToken cancellationToken) 90TextToSpeechOptions options = new()