powershell - .NET's Media.SoundPlayer stays silent while playing certain WAV files -


i need play wav file window's command line , i'm trying use .net's media.soundplayer in powershell play it. files play correctly, files generated using ibm watson text speech api cannot played.

according forums, wav returned api has values in header missing, rebuilding header should make them work.

if try play wav file straight comes api, code raises invalidoperationexception. if fix header (by adding 2 integers appropriate values of file size) there's no error , code runs, it's silent.

the wav files play correctly in vlc in every case. reproduce error, sample wav files (with , without corrected headers) can found here. can use following code powershell window:

(new-object media.soundplayer "c:\users\jose\desktop\sample.wav").playsync(); 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -