Hi romungi,
Thanks for your response. The issue is now resolved. I am not quite sure what the cause of the problem actually was, but after I upgraded the operating system from Windows 10 to Windows 11, and applied the latest updates, the problem seems to have fixed itself. I cannot say yet whether this will work once compiled and run on another computer, though, as I haven't quite got that far.
Also, before I could get a voice to work, I needed to try the entire list of voices under the 'australiaeast' region. In fact, I could only get two of the region's voices to work (Natasha and William). All other voices caused Error code 1107: unsupported voice.