Barking is a common problem that we see in dogs especially smaller dogs. I have a dog currently that I got from the pound that did this when we first got him, so I understand you are being driven crazy. Ours even barked if the wind blowed.
Here is what worked for us. We left his leash on in the house attached to a chain collar. Each time our dog barked inappropriately we gave a short tug correction to distract him, said "no bark" and had him sit. After a few corrections right in a row, he would finally stop barking for a second. When he didn't bark I'd give him a treat. By the end of a couple of weeks, he had reduced his barking significantly. We did go through a lot of treats. We used paper thin slivers of hot dog.
We did this over the course of a month all together, giving treats for non barking and eventually phasing out the treats and using praise instead with a treat only once in a while. Now he rarely ever barks.
As crazy as this sounds you may wish to teach the dog the speak command and then the quiet command. It seems easier to teach the quiet command after the dog has learned the speak command. The following site explains teaching speak and quiet commands.
You also have the option of getting a bark collar such as citronella spray collar or shock bark collars. I know you tried a sonic collar but dogs get used to the sonic sound and ignore it. It is harder for them to ignore the citronella spray or the static shock. Some people are against shock collars but I hope you will at least let the collar shock y ou and see it is not that bad of a shock. It works because the dog is not expecting the shock so that is part of the deterrent part of it. From personal experience with shock bark collars, they are very effective. Most dogs that I have seen with bark collars quickly learn not to bark. The collars emit a warning tone before shocking or spraying, so the dog learns that the tone means shock of spray if they don't stop barking, so the tone alone stops the barking. At that point, the collars can be switched to tone only and are still effective.
In addition, it sounds like he has not been socialized much so you might want to put him in a formal training class so he can be socialized.
I hope this information is helpful to you. If you would like any additional information or have more questions please don’t hesitate to press the reply to expert or continue conversation button so I can address any issues you still have . If you do find this helpful, please take this opportunity to rate my answer positively so I am compensated for my time.