解决方案 »

  1.   

    没看懂你是怎么转码的,MS只不过修改了扩展名??播放器播放,不是看扩展名,而是去识别文件头的编码
    所以即使将.tts改成.mp3,播放器依然能够按tts播放但是你换个只能播放mp3的播放器,当然就播放不了.
      

  2.   

    http://blog.163.com/china__xuhua/blog/static/199723169201111161478889/tss转mp3 不知道有没有这样的类库~
      

  3.   

    // <summary>
    /// 保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void btnSave_Click(object sender, EventArgs e)
    {
    if (IsVaild())
    {
    synth = GetSpeechSynthesizerInstance();
    VoiceClass voiceClass = GetVoiceClass();
    synth.SelectVoice(voiceClass.VoiceName);
    synth.Rate = voiceClass.Rate;
    synth.Volume = voiceClass.Volume;
     
    SaveFileDialog saveFileDialog = new SaveFileDialog();
    saveFileDialog.Title = "保存文档";
    saveFileDialog.Filter = "*.wav|*.wav|*.mp3|*.mp3";
    saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
    DialogResult saveDialog = saveFileDialog.ShowDialog();
    try
    {
     
    if (saveDialog == System.Windows.Forms.DialogResult.OK)
    {
    synth.SetOutputToWaveFile(saveFileDialog.FileName);
    synth.Speak(voiceClass.VoiceText);
    synth.SetOutputToNull(); 
    System.Diagnostics.Process.Start("Explorer.exe", string.Format(@"/select,{0}", saveFileDialog.FileName));//打开wav目录并选中文件
    }
     
    }
    catch (Exception er)
    {
    MessageBox.Show(er.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    网上的一个TTS保存成wav格式的,如果放在只能播放wav的播放器里,是不是会和我的情况一样呢???