Exemplo n.º 1
0
        public FrmMain()
        {
            InitializeComponent();

            int iErr = Jtts.jTTS_Init(null, null);

            if (Jtts.ERR_NONE == iErr || Jtts.ERR_ALREADYINIT == iErr)
            {
                bInitialed = true;
                MessageBox.Show("初始化成功");
            }
            else
            {
                JttsErrMsg(iErr);
            }
            Jtts.JTTS_CONFIG config = new InfoQuick.SinoVoice.Tts.Jtts.JTTS_CONFIG();
            iErr             = Jtts.jTTS_Get(out config);
            config.nCodePage = (ushort)Encoding.Default.CodePage;
            Jtts.jTTS_Set(ref config);
        }
Exemplo n.º 2
0
        private void ButtonSetting_Click(object sender, EventArgs e)
        {
            int iErr = 0;

            Jtts.JTTS_CONFIG config = new InfoQuick.SinoVoice.Tts.Jtts.JTTS_CONFIG();
            iErr = Jtts.jTTS_Get(out config);
            DlgSetup dlg = new DlgSetup();

            //Set data
            dlg.SetJttsConfig(config);
            dlg.FileFormat = iFileFormat;
            dlg.FileHead   = iFileHead;
            if (DialogResult.OK == dlg.ShowDialog(this))
            {
                dlg.GetJttsConfig(ref config);
                Jtts.jTTS_Set(ref config);
                iFileFormat = dlg.FileFormat;
                iFileHead   = dlg.FileHead;
            }
            dlg.Dispose();
        }