Cambiar formato de wav a mp3 en flujo de memoria en NAudio
Hola, estoy tratando de convertir texto a voz (wav) en el flujo de memoria, conviértalo a mp3 y luego reprodúzcalo en la página de usuarios. ¿Entonces necesito ayuda sobre qué hacer a continuación?
Aquí está mi código ASMX:
[WebMethod]
public byte[] StartSpeak(string Word)
{
MemoryStream ms = new MemoryStream();
using (System.Speech.Synthesis.SpeechSynthesizer synhesizer = new System.Speech.Synthesis.SpeechSynthesizer())
{
synhesizer.SelectVoiceByHints(System.Speech.Synthesis.VoiceGender.NotSet, System.Speech.Synthesis.VoiceAge.NotSet, 0, new System.Globalization.CultureInfo("en-US"));
synhesizer.SetOutputToWaveStream(ms);
synhesizer.Speak(Word);
}
return ms.ToArray();
}
Gracias.