ISpeechToTextClient Interface
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.
Represents a speech to text client.
public interface class ISpeechToTextClient : IDisposable
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001")]
public interface ISpeechToTextClient : IDisposable
public interface ISpeechToTextClient : IDisposable
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001")>]
type ISpeechToTextClient = interface
interface IDisposable
type ISpeechToTextClient = interface
interface IDisposable
Public Interface ISpeechToTextClient
Implements IDisposable
- Derived
- Attributes
- Implements
Remarks
Unless otherwise specified, all members of ISpeechToTextClient are thread-safe for concurrent use. It is expected that all implementations of ISpeechToTextClient support being used by multiple requests concurrently.
However, implementations of ISpeechToTextClient might mutate the arguments supplied to GetTextAsync(Stream, SpeechToTextOptions, CancellationToken) and GetStreamingTextAsync(Stream, SpeechToTextOptions, CancellationToken), such as by configuring the options instance. Thus, consumers of the interface either should avoid using shared instances of these arguments for concurrent invocations or should otherwise ensure by construction that no ISpeechToTextClient instances are used which might employ such mutation. For example, the ConfigureOptions method be provided with a callback that could mutate the supplied options argument, and that should be avoided if using a singleton options instance. The audio speech stream passed to these methods will not be closed or disposed by the implementation.
Methods
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable) |
GetService(Type, Object) |
Asks the ISpeechToTextClient for an object of the specified type |
GetStreamingTextAsync(Stream, SpeechToTextOptions, CancellationToken) |
Sends audio speech content to the model and streams back the generated text. |
GetTextAsync(Stream, SpeechToTextOptions, CancellationToken) |
Sends audio speech content to the model and returns the generated text. |
Extension Methods
AsBuilder(ISpeechToTextClient) |
Creates a new SpeechToTextClientBuilder using |
GetService<TService>(ISpeechToTextClient, Object) |
Asks the ISpeechToTextClient for an object of type |
GetStreamingTextAsync(ISpeechToTextClient, DataContent, SpeechToTextOptions, CancellationToken) |
Generates text from speech providing a single audio speech DataContent. |
GetTextAsync(ISpeechToTextClient, DataContent, SpeechToTextOptions, CancellationToken) |
Generates text from speech providing a single audio speech DataContent. |