0 votes
by (170 points)

I am very new to Twine. I am using SugarCube 2.25 and Twine 2. I used the proper macro for caching audio and a simple play command in the start passage. But there is no sound, when I test the story, or publish to a file and execute it. I tried relative referencing for source URL, entire path for source URL, tried various other tricks from documentations and tutorials, I tried MP3 and OGG files, gave multiple sources for same sound. but just cant get sound to play. I am sure its just a noob mistake and some silly part I am missing, but Please Help !

Thank you in advance.

<<cacheaudio "audio1" "E:\Coding\Twine\Nine\Init_audio.mp3">>

<<audio "audio1" volume 1 loop play>>


2 Answers

0 votes
by (2.7k points)
selected by
Best answer
sound might be disabled by the used browser.

does the browser play other sound sources well?

There was a similar question a few days ago, do not have the time to look for it now.

But trying another branded browser and/or checking the sound settings of Operating system or device  might be a first hint.
by (170 points)
I am using Chrome and it plays other sounds. checked sound settings, but still it doesnt play. I will try on another browser and look for the similar post in the forum too,


by (2.7k points)

Now I found it:


In the comments of that question greyelf had a few questiins to narrow the reason.

by (2.7k points)
You see the list of 'related questions' on the rignt side, don't you?

It took me a few days in the beginning to discover them, therefore this hint :-)
by (170 points)
I think, chrome is the culprit here, but I also couldn't get sounds to play in Twine 2. I will try another browser
by (159k points)

The Desktop release of the Twine 2 application (which is built upon the same web-browser engine as Chrome) has issues with playing media (audio & video) whenever the Test or Play options are used, this is why you will need to use the Publish to File option whenever you want to test/play with those types of media.

note: (some?) Mobile based web-browsers generally won't auto-play media files, they will require some sort user interaction with the page to start them.

<<link "Click me to Start the sound!">>
	<<audio "audio1" volume 1 loop play>>


by (170 points)
Oh, I see.. Inserting the code for audio, in a different passage played the music as soon as the user landed on that passage. But the Start passage won't play my sound..


Thanks for the tip for mobile devices. It helps a lot !
0 votes
by (2.7k points)

Another approach to this question is the location of the soundfile on your local disk.

There is a hint on the Twine2 guide page, see here:


Additionally I can report that I could not play sounds without exporting the story to local file.

it did not work by starting play inside Twine2 itself


by (170 points)
I placed my audio file, right beside my exported file, For the source link, I used only the file name and also tried the entire path, but still couldn't get it to play.
by (170 points)

But the catch is that I cut the lines of code and placed them in a different passage. The same code worked in different passage but not in start passage. I have two links in my start passage which both lead to a single passage but with different values in some variables. Hence, when I clicked on a link, the user was directed to different passage, and this time Chrome played the music...


Is this a bug or something?