Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4c04354
Realtime Client Proposal
Feb 10, 2026
d6d6671
Replace [Experimental("MEAI001")] with DiagnosticIds.Experiments.AIRe…
Feb 11, 2026
07947cc
Apply suggestions from code review
tarekgh Feb 11, 2026
f2fe352
Remove AsIRealtimeClient extension method
Feb 11, 2026
4f9f05d
Address PR review comments
Feb 11, 2026
ff14b19
Fix multiple issues found during code review
Feb 11, 2026
770fa28
Remove duplicate internal FunctionInvocationStatus enum
Feb 12, 2026
3cbb1d2
Remove stale CreateToolsMap calls before the loop
Feb 12, 2026
5511b8d
Remove FunctionInvocationResultInternal; use public FunctionInvocatio…
Feb 12, 2026
fbdc7cb
Add IAsyncDisposable to IRealtimeSession; store and await receive tas…
Feb 12, 2026
f33e790
Revert API baseline JSON changes
Feb 12, 2026
7dad147
Clarify audio/text token counts are subsets of Input/OutputTokenCount
Feb 12, 2026
d66e6fe
Replace ToolChoiceMode enum with ChatToolMode for cross-modality cons…
Feb 13, 2026
fc5341e
Unify TranscriptionOptions across Realtime and SpeechToText
Feb 13, 2026
77449ba
Use HasTopLevelMediaType instead of StartsWith for audio check
Feb 13, 2026
f7fe2ef
Add API compat suppressions for SpeechToTextOptions breaking changes
Feb 14, 2026
a6b4ccd
Replace string Eagerness with SemanticEagerness struct (ChatRole patt…
Feb 14, 2026
03d7648
Remove InternalsVisibleToTest from Microsoft.Extensions.AI.OpenAI
Feb 22, 2026
5845991
Add RawRepresentationFactory to RealtimeSessionOptions
Feb 22, 2026
63531b5
Remove OpenAI-specific tracing properties from RealtimeSessionOptions
Feb 22, 2026
f333eaa
Remove AIFunction/HostedMcpServerTool properties, use ChatToolMode
Feb 22, 2026
4a6947e
Improve XML docs for Usage on response and transcription messages
Feb 22, 2026
29bbdca
Remove leftover temp files
Feb 22, 2026
ab0e74d
Improve ConversationId XML docs on RealtimeServerResponseCreatedMessage
Feb 22, 2026
39a042d
Split Text/Audio properties on RealtimeServerOutputTextAudioMessage
Feb 22, 2026
46ae23d
Replace RealtimeServerMessageType enum with readonly struct
Feb 22, 2026
156b376
Move Parameter into ErrorContent.Details on error messages
Feb 22, 2026
f59afd6
Add RawRepresentation property to RealtimeContentItem
Feb 22, 2026
e8393c1
Rename Metadata to AdditionalProperties for consistency
Feb 22, 2026
6aae7d3
Improve MaxOutputTokens XML docs to clarify modality scope
Feb 22, 2026
c7f041b
Improve XML docs on RealtimeClientResponseCreateMessage properties
Feb 22, 2026
cde880a
Improve RealtimeClientResponseCreateMessage class-level XML doc
Feb 22, 2026
d2516c2
Rename EventId to MessageId for terminology consistency
Feb 22, 2026
1d15400
Remove blank line between using directives in audio buffer messages
Feb 22, 2026
0ca0a17
Rename RealtimeAudioFormat.Type to MediaType for consistency
Feb 23, 2026
03014ce
Refactor IRealtimeSession: rename InjectClientMessageAsync to SendCli…
Feb 23, 2026
02fd006
Make RealtimeSessionOptions and related types immutable with init-onl…
Feb 23, 2026
aa17989
Fix XML doc param order, add null validation to constructors
Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_ModelId</Target>
<Left>lib/net10.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net10.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_SpeechLanguage</Target>
<Left>lib/net10.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net10.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_ModelId(System.String)</Target>
<Left>lib/net10.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net10.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_SpeechLanguage(System.String)</Target>
<Left>lib/net10.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net10.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_ModelId</Target>
<Left>lib/net462/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net462/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_SpeechLanguage</Target>
<Left>lib/net462/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net462/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_ModelId(System.String)</Target>
<Left>lib/net462/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net462/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_SpeechLanguage(System.String)</Target>
<Left>lib/net462/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net462/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_ModelId</Target>
<Left>lib/net8.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net8.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_SpeechLanguage</Target>
<Left>lib/net8.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net8.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_ModelId(System.String)</Target>
<Left>lib/net8.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net8.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_SpeechLanguage(System.String)</Target>
<Left>lib/net8.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net8.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_ModelId</Target>
<Left>lib/net9.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net9.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_SpeechLanguage</Target>
<Left>lib/net9.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net9.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_ModelId(System.String)</Target>
<Left>lib/net9.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net9.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_SpeechLanguage(System.String)</Target>
<Left>lib/net9.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/net9.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_ModelId</Target>
<Left>lib/netstandard2.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/netstandard2.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.get_SpeechLanguage</Target>
<Left>lib/netstandard2.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/netstandard2.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_ModelId(System.String)</Target>
<Left>lib/netstandard2.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/netstandard2.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Microsoft.Extensions.AI.SpeechToTextOptions.set_SpeechLanguage(System.String)</Target>
<Left>lib/netstandard2.0/Microsoft.Extensions.AI.Abstractions.dll</Left>
<Right>lib/netstandard2.0/Microsoft.Extensions.AI.Abstractions.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
</Suppressions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Provides an optional base class for an <see cref="IRealtimeSession"/> that passes through calls to another instance.
/// </summary>
/// <remarks>
/// This is recommended as a base type when building sessions that can be chained around an underlying <see cref="IRealtimeSession"/>.
/// The default implementation simply passes each call to the inner session instance.
/// </remarks>
[Experimental(DiagnosticIds.Experiments.AIRealTime, UrlFormat = DiagnosticIds.UrlFormat)]
public class DelegatingRealtimeSession : IRealtimeSession
{
/// <summary>
/// Initializes a new instance of the <see cref="DelegatingRealtimeSession"/> class.
/// </summary>
/// <param name="innerSession">The wrapped session instance.</param>
/// <exception cref="ArgumentNullException"><paramref name="innerSession"/> is <see langword="null"/>.</exception>
protected DelegatingRealtimeSession(IRealtimeSession innerSession)
{
InnerSession = Throw.IfNull(innerSession);
}

/// <inheritdoc />
public void Dispose()
{
Dispose(disposing: true);
GC.SuppressFinalize(this);
}

/// <inheritdoc />
public async ValueTask DisposeAsync()
{
await DisposeAsyncCore().ConfigureAwait(false);
GC.SuppressFinalize(this);
}

/// <summary>Performs async cleanup of managed resources.</summary>
/// <returns>A task representing the asynchronous dispose operation.</returns>
#pragma warning disable EA0014 // The async method doesn't support cancellation
protected virtual async ValueTask DisposeAsyncCore()
#pragma warning restore EA0014
{
if (InnerSession is IAsyncDisposable asyncDisposable)
{
await asyncDisposable.DisposeAsync().ConfigureAwait(false);
}
else
{
InnerSession.Dispose();
}
}

/// <summary>Gets the inner <see cref="IRealtimeSession" />.</summary>
protected IRealtimeSession InnerSession { get; }

/// <inheritdoc />
public virtual RealtimeSessionOptions? Options => InnerSession.Options;

/// <inheritdoc />
public virtual Task SendClientMessageAsync(RealtimeClientMessage message, CancellationToken cancellationToken = default) =>
InnerSession.SendClientMessageAsync(message, cancellationToken);

/// <inheritdoc />
public virtual Task UpdateAsync(RealtimeSessionOptions options, CancellationToken cancellationToken = default) =>
InnerSession.UpdateAsync(options, cancellationToken);

/// <inheritdoc />
public virtual IAsyncEnumerable<RealtimeServerMessage> GetStreamingResponseAsync(
CancellationToken cancellationToken = default) =>
InnerSession.GetStreamingResponseAsync(cancellationToken);

/// <inheritdoc />
public virtual object? GetService(Type serviceType, object? serviceKey = null)
{
_ = Throw.IfNull(serviceType);

// If the key is non-null, we don't know what it means so pass through to the inner service.
return
serviceKey is null && serviceType.IsInstanceOfType(this) ? this :
InnerSession.GetService(serviceType, serviceKey);
}

/// <summary>Provides a mechanism for releasing unmanaged resources.</summary>
/// <param name="disposing"><see langword="true"/> if being called from <see cref="Dispose()"/>; otherwise, <see langword="false"/>.</param>
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
InnerSession.Dispose();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

/// <summary>Represents a real-time client.</summary>
/// <remarks>This interface provides methods to create and manage real-time sessions.</remarks>
[Experimental(DiagnosticIds.Experiments.AIRealTime, UrlFormat = DiagnosticIds.UrlFormat)]
public interface IRealtimeClient : IDisposable
{
/// <summary>Creates a new real-time session with the specified options.</summary>
/// <param name="options">The session options.</param>
/// <param name="cancellationToken">A token to cancel the operation.</param>
/// <returns>The created real-time session.</returns>
Task<IRealtimeSession?> CreateSessionAsync(RealtimeSessionOptions? options = null, CancellationToken cancellationToken = default);

/// <summary>Asks the <see cref="IRealtimeClient"/> for an object of the specified type <paramref name="serviceType"/>.</summary>
/// <param name="serviceType">The type of object being requested.</param>
/// <param name="serviceKey">An optional key that can be used to help identify the target service.</param>
/// <returns>The found object, otherwise <see langword="null"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="serviceType"/> is <see langword="null"/>.</exception>
/// <remarks>
/// The purpose of this method is to allow for the retrieval of strongly typed services that might be provided by the <see cref="IRealtimeClient"/>,
/// including itself or any services it might be wrapping.
/// </remarks>
object? GetService(Type serviceType, object? serviceKey = null);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

/// <summary>Represents a real-time session.</summary>
/// <remarks>This interface provides methods to manage a real-time session and to interact with the real-time model.</remarks>
[Experimental(DiagnosticIds.Experiments.AIRealTime, UrlFormat = DiagnosticIds.UrlFormat)]
public interface IRealtimeSession : IDisposable, IAsyncDisposable
{
/// <summary>Updates the session with new options.</summary>
/// <param name="options">The new session options.</param>
/// <param name="cancellationToken">A token to cancel the operation.</param>
/// <returns>A task that represents the asynchronous update operation.</returns>
Task UpdateAsync(RealtimeSessionOptions options, CancellationToken cancellationToken = default);

/// <summary>
/// Gets the current session options.
/// </summary>
RealtimeSessionOptions? Options { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear as to the semantic of this. RealtimeSessionOptions is a mutable class. If I start setting properties on that while the session is active, is that going to result in immediate changes in behavior?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the abstraction includes an Update Session operation that must be called to update the session. I need a type to use when updating the session (it must be a writable object), and I also want to expose the same information to anyone requesting it at any time, in that case, it can be read-only.
The reason is that, in the middleware layer, I need access to the session properties. OpenAI models allow updating the session after it has been created, but I believe not all providers allow that. Therefore, in most scenarios, I expect that once the session is created with the desired configuration, it will not change much afterward.

I am trying to avoid having two types for that. Do you have a better idea handling that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can make the session options using init instead of setters. This will make the object immutable. I believe this will solve the confusion and will be a clearer design. I'll try that and see how it goes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve made the RealtimeSessionOptions properties non-settable so the object is immutable after creation. This makes the design clearer — the only way to modify session settings now is through UpdateAsync.


/// <summary>
/// Sends a client message to the session.
/// </summary>
/// <param name="message">The client message to send.</param>
/// <param name="cancellationToken">A token to cancel the operation.</param>
/// <returns>A task that represents the asynchronous send operation.</returns>
/// <remarks>
/// This method allows for sending client messages to the session at any time, which can be used to influence the session's behavior or state.
/// </remarks>
Task SendClientMessageAsync(RealtimeClientMessage message, CancellationToken cancellationToken = default);

/// <summary>Streams the response from the real-time session.</summary>
/// <param name="cancellationToken">A token to cancel the operation.</param>
/// <returns>The response messages generated by the session.</returns>
/// <remarks>
/// This method cannot be called multiple times concurrently on the same session instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the session itself be enumerable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did consider that, but I believe keeping GetStreamingResponseAsync is preferable to making the session itself IAsyncEnumerable, for a few reasons:

  • Middleware delegation becomes awkward with IAsyncEnumerable.
    DelegatingRealtimeSession would need to implement GetAsyncEnumerator() and delegate to the inner session’s enumerator. Overriding a virtual method like GetStreamingResponseAsync follows the established pattern in this repo (e.g., IChatClient.GetStreamingResponseAsync) and keeps things consistent.

  • Re-enumeration semantics are unclear.
    With IAsyncEnumerable, what happens if GetAsyncEnumerator() is called twice? With an explicit method, we can clearly document that it “cannot be called concurrently,” which feels more natural and predictable. With IAsyncEnumerable, the behavior is less obvious.

  • CancellationToken handling is less discoverable.
    While IAsyncEnumerable<T>.GetAsyncEnumerator(CancellationToken) does support cancellation, it’s not as explicit as a CancellationToken parameter on a method. The [EnumeratorCancellation] pattern is also less intuitive and easier to overlook.

Overall, keeping GetStreamingResponseAsync makes the design clearer, more consistent with the existing abstractions, and easier to reason about.

/// </remarks>
IAsyncEnumerable<RealtimeServerMessage> GetStreamingResponseAsync(
CancellationToken cancellationToken = default);

/// <summary>Asks the <see cref="IRealtimeSession"/> for an object of the specified type <paramref name="serviceType"/>.</summary>
/// <param name="serviceType">The type of object being requested.</param>
/// <param name="serviceKey">An optional key that can be used to help identify the target service.</param>
/// <returns>The found object, otherwise <see langword="null"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="serviceType"/> is <see langword="null"/>.</exception>
/// <remarks>
/// The purpose of this method is to allow for the retrieval of strongly typed services that might be provided by the <see cref="IRealtimeSession"/>,
/// including itself or any services it might be wrapping.
/// </remarks>
object? GetService(Type serviceType, object? serviceKey = null);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using Microsoft.Shared.DiagnosticIds;

namespace Microsoft.Extensions.AI;

/// <summary>
/// Represents options for configuring a real-time session.
/// </summary>
[Experimental(DiagnosticIds.Experiments.AIRealTime, UrlFormat = DiagnosticIds.UrlFormat)]
public enum NoiseReductionOptions
{
/// <summary>
/// No noise reduction applied.
/// </summary>
None,

/// <summary>
/// for close-talking microphones.
/// </summary>
NearField,

/// <summary>
/// For far-field microphones.
/// </summary>
FarField
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do any providers have the notion of "Auto"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some research and not seeing auto is used at all with noise reduction. Gemeini for example has no configuration exposed to spcify it. Mistral’s Voxtral handles this via transcription_delay_ms and model selection, Near-field Strategy: Use a lower delay (e.g., 240ms) and Far-field Strategy: Use a higher delay (e.g., 480ms to 1200ms).

}
Loading
Loading