[Tex/LaTex] Audio examples in phonetics project

audiopdf

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.

Best Answer

Requires Adobe Reader 9+ on Win or OSX:

\documentclass{article}
\usepackage{media9,graphicx}

\begin{document}
Sound sample: \includemedia[
  addresource=sound_sample.mp3,
  transparent,
  flashvars={
    source=sound_sample.mp3
   &autoPlay=true
  },
]{\includegraphics[height=1.44ex]{speaker.png}}{APlayer.swf}
\end{document}