From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help on Play Sound File.vi - file format

Hello,

 

My request is quiet simple but I don't understand why it doesn't work.

I want read a .wav sound file with the Play Sound File vi. But when I run the vi, an error message appears " Cannot recognize sound format"

I have tried with different .wav sound files but nothing works.

Do you know why this error happens ?

Thanks

0 Kudos
Message 1 of 9
(5,159 Views)

Hi Nico,

 

when running that function with some standard Windows7 wave files it works as intended.

So the problem should be with your wave files...

 

You should attach one of those mangled wav files (maybe packed in a zip file)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(5,141 Views)

Ok thanks.

Since the last time I posted I've tried many other wav sounds but nothing works I still had the same Labview error.

I join you few of my wav files and maybe you can try it.

Thanks

 

0 Kudos
Message 3 of 9
(5,118 Views)

Hi Nico,

 

no problem for me. Both files play nice on WinXP/LV2011SP1...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(5,113 Views)

Ok.

I'm using LV2012 on W7 and it still doen't work so I renounce and I will use another method.

Thank you for you help.

Bye

0 Kudos
Message 5 of 9
(5,063 Views)

I am having the same problem. I am running LabVIEW 2012 SP1 on Windows 7 with two .wav files generated by Winamp.

If I wire the .wav files to the Play Waveform Express VI they play fine.

If I wire them using the same method as you have above they do not.

Were you able to come up with another method?

0 Kudos
Message 6 of 9
(5,031 Views)

Sorry for reviving an old post, but for future troubleshooters, it seems that this is a rather obtuse error that can even mean 'The file does not exist.' In my case, I didn't correctly build the path. You can easily test your system and your sound file by using the Sound Player.vi in the example folder. Replace the sample.wav file with whatever you're trying to play, and if it works, you know that the problem exists with your path, and not your system or file.

0 Kudos
Message 7 of 9
(3,586 Views)

I had the same issue yesterday but can't figure out what to do.

0 Kudos
Message 8 of 9
(2,725 Views)

@animeshsaxena wrote:

I had the same issue yesterday but can't figure out what to do.


Since this is a very old thread, please provide more detail. LabVIEW version, 32 or 64 bit? OS version? Exact wording of the error message? Fails on all sound files or only on some?

0 Kudos
Message 9 of 9
(2,722 Views)