예제 #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);
 }
예제 #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);
 }
예제 #3
0
 private async Task OnStart()
 {
     if (ButtonText == "开始合成")
     {
         if (!string.IsNullOrEmpty(InputText))
         {
             await SynthesizerService.SynthesizerOnceAsync(InputText, Synthesizer);
         }
     }
     else
     {
         await SynthesizerService.CloseAsync(Synthesizer);
     }
 }
        public WashingMachineViewModel()

        {
            _washingProgramModel                = new WashingProgramModel();
            MainGridVisibility                  = Visibility.Visible;
            WashingProgramGridVisibility        = Visibility.Hidden;
            WashingTimeGridVisibility           = Visibility.Hidden;
            WashingTemperatureGridVisibility    = Visibility.Hidden;
            WashingSummaryGridVisibility        = Visibility.Hidden;
            OrderHistoryGridVisibility          = Visibility.Hidden;
            WashingMachineProgramInfoVisibility = Visibility.Hidden;
            _eventAggregator = new EventAggregator();
            _eventAggregator.Subscribe(this);
            _recognitionService      = new RecognitionService(_eventAggregator);
            _synthesizerService      = new SynthesizerService();
            _databaseService         = new DatabaseService();
            _recognitionFromSentence = new RecognitionFromSentenceService();
        }
예제 #5
0
 public SynthesizerController(MagmaDawDbContext magmaDbContext)
 {
     synthesizerService = new SynthesizerService(magmaDbContext);
     responseFactory    = new ResponseFactory();
 }