Ensure that you have at least one voice pack installed, preferably one for every language you intend to use. This can be done from the system settings of the device.
The speak feature requires internet. Please ensure your internet connection is stable.
Generally, the speech module requires some time to activate the first time it’s asked to say something. If it takes longer than it takes your code to finish execution, you will not hear any speech.
If that happens, try running your code again, or try adding a wait instruction at the end of your program (e.g. “wait for 1 second” in Blockly or “api.wait(1)” in text programming).