By going for an economic advantage, you are on the right path. As you mention in the question however, you're no utilizing that advantage correctly.
First, a very basic piece of advice. Always build drones unless you have 30 per base. Never let your base sit idle, even for a few seconds, unless your minerals and gas are saturated. This alone can send a bronze player to the gold league, and without it there's no point to getting many bases.
Harassing is generally pointless against a turtle, especially with mutalisks - a player with a single base can just move their army to the mineral line, and harass depends on being faster than the enemy and forcing them to stretch themselves between two or more locations. There's also little point to it - it's done if you're behind and need to catch up economically, or if you're even and want to demolish the opponent. You already have the economic lead and thus, harassing is a waste of your APM.
Economic advantage lets you, obviously, have more resources. More resources mean more units, earlier. This is further exacerbated by the enemy's need to use a big part of his income for cannons, if we're talking about a protoss. There's no reason for someone to defeat you with massed void rays if they're turtling - you should either have reached the unit cap far earlier and steamrolled them, or you should have twice as many units as they have void rays, again eliminating their army. Especially if you are scouting them - which, since they are on the defense, should be easy to do - you should already know what unit they're massing and what unit to build to counter them. Now, newbies have trouble scouting, but in such a situation it is an afterthought - you should have a huge materiel advantage anyway. A good army can break the back of any turtle - a dozen cannons can't even slow a group of units whose population consumption is in the triple digits.
Your problem, then, is production. For some reason you end up with less units than the enemy despite your income. Master larva injections and don't let your queens build up energy - this is hard, but it is another ability that directly translates into better play. Make more hatcheries in your base, without them being next to minerals, just for the larvae. Never get above 1000 minerals, and if you do, make even more hatcheries (and try to get better at using up larva and injecting). Get an overwhelming materiel advantage and crush his base, but don't kill your progress early on by sacrificing units in pushes that inflict no meaningful damage. There's no reason to struggle against an enemy with less resources than you - Starcraft is almost always won by the player with more drones.
Having many hatcheries with a queen each should also help with void rays a little bit - queens are very powerful against air units. Try it - kiting on creep should be relatively easy, and mistakes (which you shouldn't be making) can be mended with transfuse anyway. Having 4 or 5 queens is a given and generally enough to fend off any early void aggression, and they can be mass-produced if needed later on - the hatchery queue is generally empty anyway.
Boxing your opponent in is the entire battle, really. An enemy who has to resort to turtling is a defeated one, and the entire game is about forcing the other side to limit their drone and base count. Someone who does that voluntarily is just a step short of pressing "resign" themselves :)