I had this happen on a previous phone. For that situation, it was the headset jack. The sensor that tells the phone a plug is inserted and to turn off the regular speakers was stuck and the phone was thinking a headset was always plugged in. This was years ago, but I believe I jiggled a headset plug in the hole a few times and used some canned air to blow out any debris or moisture that had worked it's way in there. Worked after some finagling. I hope your's is something similarly benign.