Hmmm. Your codes did not post.
\
How are you attempting to change the SpeechRate? From the above
SpeechRate- Sets the SpeechRate for TextToSpeech. The values should be between 0 and 2 where lower values slow down the pitch and greater values accelerate it.
The DEFAULT is a SpeechRate=1 . To slow the rate use = 0.8 perhaps or slower, to have the TTS speak more rapidly like perhaps =1.4
This works fine, without a block image no idea why your method to change the speed is not working for you. It might be where you place the block in relation to other blocks...remember, commands work asynchronously .
Pitch- Sets the Pitch for TextToSpeech. The values should be between 0 and 2 where lower values lower the tone of synthesized voice and greater values raise it.
The Default is Pitch= 1. try and use a value of 0.5 and the TTS will speak in a deeper tone. A value of 1.5 will make the voice high pitched.
The pitch works the same way as the rate.
Your question " Is there any way to create a button so that if I don't click on it, the text to speech will not say the translated sentence, but if I click on it, it will? " Well the answer is you can write code and use a boolean switch in the Click event handler and test for it in your mainline code If myBooleanDoNotSpeak = true then don't execute the TTS but if the boolean is False then talk all you want. A simple solution is to use a CheckBox instead. If checked is true then... if checked is false...
You really need to EXPERIMENT. The answers to all your questions could be determined with simple experimentation. Have you read Dr.Wolber's free book (
http://www.appinventor.org/book2 ) yet? Do you know you can get self help using the Help menu (to the right of the Build menu) on the AI2 Compiler. Try the Library, users will be amazed at the free hints and code available there.
Regards,
Steve