SpeechToTextClientBuilderServiceCollectionExtensions.AddKeyedSpeechToTextClient Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddKeyedSpeechToTextClient(IServiceCollection, Object, ISpeechToTextClient, ServiceLifetime) |
Registers a keyed singleton ISpeechToTextClient in the IServiceCollection. |
AddKeyedSpeechToTextClient(IServiceCollection, Object, Func<IServiceProvider,ISpeechToTextClient>, ServiceLifetime) |
Registers a keyed singleton ISpeechToTextClient in the IServiceCollection. |
AddKeyedSpeechToTextClient(IServiceCollection, Object, ISpeechToTextClient, ServiceLifetime)
Registers a keyed singleton ISpeechToTextClient in the IServiceCollection.
public static Microsoft.Extensions.AI.SpeechToTextClientBuilder AddKeyedSpeechToTextClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection, object serviceKey, Microsoft.Extensions.AI.ISpeechToTextClient innerClient, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton);
static member AddKeyedSpeechToTextClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj * Microsoft.Extensions.AI.ISpeechToTextClient * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.AI.SpeechToTextClientBuilder
<Extension()>
Public Function AddKeyedSpeechToTextClient (serviceCollection As IServiceCollection, serviceKey As Object, innerClient As ISpeechToTextClient, Optional lifetime As ServiceLifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton) As SpeechToTextClientBuilder
Parameters
- serviceCollection
- IServiceCollection
The IServiceCollection to which the client should be added.
- serviceKey
- Object
The key with which to associate the client.
- innerClient
- ISpeechToTextClient
The inner ISpeechToTextClient that represents the underlying backend.
- lifetime
- ServiceLifetime
The service lifetime for the client. Defaults to Singleton.
Returns
A SpeechToTextClientBuilder that can be used to build a pipeline around the inner client.
Remarks
The client is registered as a scoped service.
Applies to
AddKeyedSpeechToTextClient(IServiceCollection, Object, Func<IServiceProvider,ISpeechToTextClient>, ServiceLifetime)
Registers a keyed singleton ISpeechToTextClient in the IServiceCollection.
public static Microsoft.Extensions.AI.SpeechToTextClientBuilder AddKeyedSpeechToTextClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection, object serviceKey, Func<IServiceProvider,Microsoft.Extensions.AI.ISpeechToTextClient> innerClientFactory, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton);
static member AddKeyedSpeechToTextClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj * Func<IServiceProvider, Microsoft.Extensions.AI.ISpeechToTextClient> * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.AI.SpeechToTextClientBuilder
<Extension()>
Public Function AddKeyedSpeechToTextClient (serviceCollection As IServiceCollection, serviceKey As Object, innerClientFactory As Func(Of IServiceProvider, ISpeechToTextClient), Optional lifetime As ServiceLifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton) As SpeechToTextClientBuilder
Parameters
- serviceCollection
- IServiceCollection
The IServiceCollection to which the client should be added.
- serviceKey
- Object
The key with which to associate the client.
- innerClientFactory
- Func<IServiceProvider,ISpeechToTextClient>
A callback that produces the inner ISpeechToTextClient that represents the underlying backend.
- lifetime
- ServiceLifetime
The service lifetime for the client. Defaults to Singleton.
Returns
A SpeechToTextClientBuilder that can be used to build a pipeline around the inner client.
Remarks
The client is registered as a scoped service.