Create Text to speech converter app using Sketchware

Create Text to speech converter app using Sketchware




Open Sketchware. Create new project .Go to the logic section  . In on Create event add the following code on ads source directly block.



t1=new android.speech.tts.TextToSpeech(getApplicationContext(), new android.speech.tts.TextToSpeech.OnInitListener() {
@Override public void onInit(int status) {
if(status != android.speech.tts.TextToSpeech.ERROR) {
t1.setLanguage(Locale.UK); } } });
}android.speech.tts.TextToSpeech t1;
private void nothing(){




 Go to the logic section and tap on Button1 on Click event

Create a string variable named  "speak". Now set the value of that string variable using  blocks.
Please watch the above video for Reference.
Now use add source directly block and add the following code



t1.speak(speak, android.speech.tts.TextToSpeech.QUEUE_FLUSH, null);




 Run the app.

If you have any doubts comment below

Comments

Popular posts from this blog

PUBG Mobile Lua

Antiban Zip

Antiban Script And Bypass