I am writing a project about phonetics and would ask if there is a way to include sound files directly in the PDF to be played directly in this file, preferably without any additional files having to be distributed along with the PDF.

I already know that it is possible to include media files in a PDF, but I would like it to be implemented as a short loudspeaker-like button1 next to the word which, when clicked, plays the corresponding audio file (it needs to be this small, since I'm going to use many sound files in the same PDF).

I don't want any player or anything else to appear; the sound should just play quickly and smoothly, end of story, and clicking it again should give the same result. In fact, I would like it to function a bit like the sound file function on this website.

I do realize, of course, that maybe all of this is not even technically possible.

1 Source: ordnet.dk.

  • Have you looked at the attachfile package. Or is your question more focused on the actual technical playback functionality? ftp.sun.ac.za/ftp/CTAN/macros/latex/contrib/attachfile/… Jan 7 '13 at 12:07
  • Yes, I have tested it a bit and looked through the manual, but it only appears to simply open external media players instead of simply playing the sound file within the PDF.
    – Gaussler
    Jan 7 '13 at 13:23

Requires Adobe Reader 9+ on Win or OSX:


Sound sample: \includemedia[
  • I'm currently installing Media9 to test it... I'm returning as soon as I've tested it. :-)
    – Gaussler
    Jan 7 '13 at 16:02
  • Works almost PERFECTLY!!! The only issue is that a small grey box appears when I hover over the icon with the mouse. But that is probably a limitation we don't get around, and it still functions exactly according to what I needed. THANKS A LOT!! :-D
    – Gaussler
    Jan 7 '13 at 19:18
  • But it appears not to work when linking to something in a parent folder. Is this possible somehow?
    – Gaussler
    Jan 7 '13 at 19:47
  • @Gaussler: The grey box is a progress bar indicating the current playhead position of the sound sample. Maybe the speaker icon is too small to produce a clickable link/progress bar of sufficient width.
    – AlexG
    Jan 7 '13 at 22:08
  • @Gaussler: To include a media file in the parent folder, put \addmediapath{..} to the preamble.
    – AlexG
    Jan 8 '13 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.