As a submenu in PBeditor 'autocomplete' option, add a suboption (and choose a language) in preferences to speech to PBeditor to add code.
Could be for 4.0 ?
I think it is not too difficult, because there are working speech-engines which work fine. The matter is whether there are some free-of-cost speech-engine or not, perhaps in sourceforge or gnu, dunno ...