If my iPhone 4 dies I charge it and my sound stops working?

When I recharge the battery the sound works about half an hour later or it only works in headphones
Used a pin in the charger part and a lot of dust did come out
I think this problem started happening when I dropped it in the toilet haha other than this problem it works perfectly fine though
Any suggestions?

The speaker itself will be dead, if loud speaker works then its your ear piece speaker.
Sadly that will need replacing, no other way.