public SpeechLibStrategy(Options options, int speedRate, ConvertorFactory.SupportedType supportedType) { _options = options; _supportedType = supportedType; Voice = new SpVoice { Rate = speedRate, }; SetVoice(Properties.Settings.Default.VoiceName); }
private void Convert(string filename, Options options, ConvertorFactory.SupportedType supportedType) { var strategy = new SpeechLibStrategy(options, 4, supportedType); var voices = strategy.GetVoiceNames().ToList(); Assert.IsTrue(voices.Count() == 2, "voices: " + string.Join(", ", voices)); var model = new TextToVoiceModel { CurrentState = TextToVoiceModel.States.Run, OutFilePath = filename, FilePath = filename }; model.SetText(testText); strategy.Execute(model, voices.Last()); }