An advanced audio library, written in C#. Provides tons of features. From playing/recording audio to decoding/encoding audio streams/files to processing audio data in realtime (e.g. applying custom effects during playback, create visualizations,...). The possibilities are nearly unlimited.
Other
2.14k
stars
450
forks
source link
[MediaFoundationException] Decode Stream using MediaFoundationDecoder #447
I can't figure out what i did wrong. Here is my code:
SpeechSynthesisStream synthesisStream = await synthesizer.SynthesizeTextToStreamAsync(text);
Stream stream = synthesisStream.AsStream();
var waveSource = new MediaFoundationDecoder(stream);
At line 3 i get Exception thrown: 'CSCore.MediaFoundation.MediaFoundationException' in CSCore.dll but program still works i can then send waveSource to media player and it will play.
I tried to catch
try{
var waveSource = new MediaFoundationDecoder(stream);
}
catch{
***
}
but obviously it never happens
Maybe is there way to get more more detailed error?
I can't figure out what i did wrong. Here is my code:
At line 3 i get
Exception thrown: 'CSCore.MediaFoundation.MediaFoundationException' in CSCore.dll
but program still works i can then sendwaveSource
to media player and it will play.I tried to catch
but obviously it never happens
Maybe is there way to get more more detailed error?