# Play Sound Error

**URL:** <https://forum.inductiveautomation.com/t/play-sound-error/11236>\
**Category:** Ignition\
**Created:** [February 19, 2016, 1:27am UTC](https://forum.inductiveautomation.com/t/play-sound-error/11236 "2016-02-19T01:27:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jruben84](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@jruben84](https://forum.inductiveautomation.com/u/jruben84)\
**Post date:** [February 19, 2016, 1:27am UTC](https://forum.inductiveautomation.com/t/play-sound-error/11236/1 "2016-02-19T01:27:50Z")

</div>

Hi, I get an error when I try to play a sound…

I have a button, the scripting code is:

```auto
path = system.file.openFile("wav")
if path != None:
    bytes = system.file.readFileAsBytes(path)
    event.source.parent.getComponent("Sound Player").soundData = bytes
```

And when I click on it, select a wav file I got this:

[ul]  
UnsupportedAudioFileException: could not get audio input stream from input stream  
Ignition v7.7.6 (b2015120217)  
Java: Oracle Corporation 1.8.0\_73  
[/ul]

Any suggestion or comment will be appreciate!

Regards!

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [February 19, 2016, 6:26pm UTC](https://forum.inductiveautomation.com/t/play-sound-error/11236/2 "2016-02-19T18:26:44Z")

</div>

Checkout the answer at this link: [stackoverflow.com/questions/1494 … n-could-no](http://stackoverflow.com/questions/14943962/java-wav-file-error-javax-sound-sampled-unsupportedaudiofileexception-could-no)
