This is not fool proof, but it should work and it is quite easy to pull of.
Once you see he invests in static defenses (especially when taking an expension). You keep unit production and static defenses to a bare minimum, this means one or two gate constant production. And chrono boost your probe production.
You take two expansions very fast, so you have three bases. Then create mass blink stalker with an observer out of 10 or more gates. Get all the upgrades etc. With blink stalker you are way faster than he is.
So try to see when he is moving out. If he does that blink into his base, kill workers or unit producing structures (fast damage). Then run the stalkers as fast as you can to your base and blink right under the voidrays. Focus one voidray at a time.
This works because:
- At the early stages he has not enough stuff to attack you.
- You are more mobile and he is forced to stay in his base to prevent you from attacking him.
- Once he is out you can blink right into his base with observer vision and avoid static defenses doing some free damage.
- When he attacks your base you can easily reinforce your army (10+ gates) and he usually produces only 2-3 voidrays at a time.
- Voidrays cannot escape as your stalkers are faster with blink.
Just try to prevent the voidrays from charging up.
This strategy works somewhat like any Zerg strategy. You throw money at the enemy until he crumbles under your pressure.
A variation would be to create mass voidrays/stalker to win the game. As you have more bases you can produce the same amount of voidrays and additional stalkers. But your timing is later than his.