If your intention is to guarantee that the audio files you serve only every play some part of the file, you have to do this serverside. The best way would be to cut out a part of the mp3 once and store it as a separate file, just like you do with thumbnails of larger pics (you don't resize the whole image every time its thumb is needed).
If on the other hand, you don't care if a user can play an entire audio file by accessing it outside of your javascript system (such as directly entering the URL to the audio file) and want the simples possible way of letting a user quickly go through parts of several audio files, then use javascript if you find it easier.
However, I have no idea how you actually cut out parts of an mp3 file, but as always there are 2 options.
1. Someone else has written an easy to use library which you can use for free. You just have to find it (web search as usual)
2. Find the spec for the mp3 file format (web search as usual), then do the coding yourself. If you make that available on the internet, 1. is an option for the next person who knows how to search the web"