Modify getVoices to be a synchronous method