LoggingTextToSpeechClient 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将文本委托给语音客户端,用于将文本记录到语音操作到某个 。ILogger
public ref class LoggingTextToSpeechClient : Microsoft::Extensions::AI::DelegatingTextToSpeechClient
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public class LoggingTextToSpeechClient : Microsoft.Extensions.AI.DelegatingTextToSpeechClient
public class LoggingTextToSpeechClient : Microsoft.Extensions.AI.DelegatingTextToSpeechClient
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type LoggingTextToSpeechClient = class
inherit DelegatingTextToSpeechClient
type LoggingTextToSpeechClient = class
inherit DelegatingTextToSpeechClient
Public Class LoggingTextToSpeechClient
Inherits DelegatingTextToSpeechClient
- 继承
- 属性
注解
提供的实现 ITextToSpeechClient 是线程安全的并发使用,只要 ILogger 采用的也是线程安全的并发使用。
当使用 ILogger 启用 Trace时,将记录消息和选项的内容。 这些消息和选项可能包含敏感的应用程序数据。 Trace 默认处于禁用状态,不应在生产环境中启用。 不会在其他日志记录级别记录消息和选项。
构造函数
| 名称 | 说明 |
|---|---|
| LoggingTextToSpeechClient(ITextToSpeechClient, ILogger) |
初始化 LoggingTextToSpeechClient 类的新实例。 |
属性
| 名称 | 说明 |
|---|---|
| InnerClient |
获取内部 ITextToSpeechClient。 (继承自 DelegatingTextToSpeechClient) |
| JsonSerializerOptions |
获取或设置序列化日志记录数据时要使用的 JSON 序列化选项。 |
方法
| 名称 | 说明 |
|---|---|
| Dispose() |
执行与释放、释放或重置非托管资源关联的应用程序定义任务。 (继承自 DelegatingTextToSpeechClient) |
| Dispose(Boolean) |
提供用于释放非托管资源的机制。 (继承自 DelegatingTextToSpeechClient) |
| GetAudioAsync(String, TextToSpeechOptions, CancellationToken) |
将文本内容发送到模型并返回生成的音频语音。 |
| GetService(Type, Object) |
ITextToSpeechClient请求指定类型的 |
| GetStreamingAudioAsync(String, TextToSpeechOptions, CancellationToken) |
将文本内容发送到模型并流式传输生成的音频语音。 |
扩展方法
| 名称 | 说明 |
|---|---|
| AsBuilder(ITextToSpeechClient) |
创建一个新的 TextToSpeechClientBuilder 使用 |
| GetService<TService>(ITextToSpeechClient, Object) |
ITextToSpeechClient请求类型的对象 |