示例#1
0
        public Talker()
        {
            TextBase         = new TextBase();
            TextBase.Loaded += () => TextBaseLoaded?.Invoke();

            _synthesizer.Volume = 100;
            _volume             = _player.Volume;

            _playerRateInternal = _player.SpeedRatio;

            _player.MediaOpened += delegate
            {
                // требуется переустановка настроек после открытия
                _player.Volume     = _volume;
                _player.SpeedRatio = _playerRateInternal;
                _player.Balance    = 0;
            };

            _player.MediaEnded += delegate { SpeakCompleted(); };
        }
示例#2
0
 public bool LoadFile(string file)
 {
     return(TextBase.LoadFile(file));
 }