Do an out-of-warranty replacement of your iPhone thru Apple.
Trade in your iPhone towards a new one.
Find a competent 3rd party repair site that can do the soldering repairs need, but no guarantees. Also, if you go this route Apple may refuse service on your iPhone in the future.
This thread has been closed by the system or the community team.
You may vote for any posts you find helpful, or search the Community for additional answers.
Iphone 7 speakers and microphone not working
Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.