How long have you had the tablet?
It seems as though you may either have a faulty main speaker, faulty motherboard or faulty earphones socket.
Here is a link to the warranty provisions for your tablet. If you have had the tablet for more than 90 days in the USA or 24/12 months in Europe then your tablet is no longer covered by the manufacturer's warranty.
If you have had it for less than this length of time, depending on your location, I suggest that you verify the purchase date and then consult the documentation in the link provided as to what you have to do to obtain a warranty repair or replacement.
If your tablet is no longer under warranty then here is a link to the Ifixit guide on how gain access to the inside of your tablet to investigate the possible cause of your problem.
It may be that the internal speaker is faulty or has a loose connection.
It may be that the earphone socket is faulty. When you plug earphones into the socket, depending on the type of socket (and I don't know which sort you have) the plug either breaks a set of contacts that are within the socket which disconnects the main speaker and transfers the audio to the earphones OR there is a single contact within the socket that when you plug in earphones 'tells' the audio controller to switch the audio away from the main speaker and onto the earphones. In either case this may be the problem.
The other possibility is that there is a problem with the motherboard not sending the audio to the main speakers in the case of the earphone socket being of the second type described above.
In any event regardless of the actual problem, the tablet will need to be opened for the fault to be diagnosed and repaired.
DigiLand DL701Q Speaker Replacement
Hopefully this is of some help.