Problem: MP3 File has a gap
This is a known, acknowledged issue since at least 2000:
1 Why is a decoded MP3 longer than the original .wav file?
Because LAME (and all other MDCT based encoders) add padding to the
beginning and end of each song. For an explination of why,
see the questions below.
800 word long technical explanation pertaining to both decoder and encoder issues snipped.
LAME-enabled players should apparently automatically jump this gap:
LAME embeds the amount of padding in the ancillary data of the
first frame of the MP3 file. (LAME INFO tag). The LAME decoder
will use this information to remove the leading padding of an MP3 file.
however:
Modifications to the decoder so that it will also remove the
trailing padding have not yet been made.
Alternatives
You could try another encoder as mentioned, if you have access to the Fraunhofer version (IIRC it is available in iTunes and Windows Media Player). Alternatively, you may be able to compile/acquire a version of sox
with libmad
enabled. I think these will have similar issues, however.
The question is, do you definitely need an MP3 as mentioned in the comments? Are you using a player that only handles MP3s?
If it absolutely, definitely, positively has to be an MP3, no ifs ands or buts; and the Fraunhofer encoder also gives the same issue, you could have a look at a previous thread here on SU:
Best program to trim silence beginning and end of mp3 files?
I'd try export as WAV & see what happens. Will maybe eliminate whether it's the app itself or the export/conversion process. – Tetsujin – 2015-07-10T08:19:35.783
@Tetsujin there is no problem with WAV export but I need the file as mp3. Apparently, I tried converting wav to mp3 using another tool but the gap is still there. The issue is probably with LAME converter. – IMB – 2015-07-10T08:25:34.823
if you convert the mp3 back to wav is the gap still there? What happens if you use a different converter? – Tetsujin – 2015-07-10T08:32:52.593