Exemple #1
0
 /// <summary>
 /// 关闭语音合成方法
 /// </summary>
 /// <param name="service"></param>
 /// <param name="callback"></param>
 /// <returns></returns>
 public static async Task CloseAsync(this SynthesizerService service, Func <SynthesizerStatus, Task>?callback = null)
 {
     var option = new SynthesizerOption()
     {
         MethodName = "bb_baidu_close_synthesizer",
         Callback   = callback
     };
     await service.InvokeAsync(option);
 }
Exemple #2
0
 /// <summary>
 /// 语音合成方法
 /// </summary>
 /// <param name="service"></param>
 /// <param name="text"></param>
 /// <param name="callback"></param>
 /// <returns></returns>
 public static async Task SynthesizerOnceAsync(this SynthesizerService service, string?text, Func <SynthesizerStatus, Task>?callback = null)
 {
     var option = new SynthesizerOption()
     {
         Text       = text,
         MethodName = "bb_baidu_speech_synthesizerOnce",
         Callback   = callback
     };
     await service.InvokeAsync(option);
 }