Tools - Text to Speech

final android.speech.tts.TextToSpeech 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) { Toast.makeText(getApplicationContext(), "Error",Toast.LENGTH_SHORT).show();
}
}
});
button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View _v) {
String sentence = edittext1.getText().toString();   Toast.makeText(getApplicationContext(), sentence,Toast.LENGTH_SHORT).show();  t1.speak(sentence,android.speech.tts.TextToSpeech.QUEUE_FLUSH, null);   }  } );

Komentar

Cara pembuatan Apps paling Populer

TextInputLayout in Sketchware

Create Stopwatch App in Android using Sketchware

How to enable download in webview in Sketchware apps?

Create Stopwatch App in Android using Sketchware

Codes for modifying Action Bar in Sketchware

Code for implementing Notifications in Sketchware

A Flash Light App in Sketchware

How to find and​ highlight a word in a text field in Sketchware?

How to integrate Admob Ads in Sketchware project using AIDE?

Firebase Login/Register with email verification