how to make text to speech android studio tutorial

Опубликовано: 07 Сентябрь 2019
на канале: Aqif Iqbal
249
6

in this video i will show to make text to speech n android studio , if you want press button and speech the text

main code
textToSpeech = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {
@Override
public void onInit(int i) {
if(i==TextToSpeech.SUCCESS)
{
Result_Text = textToSpeech.setLanguage(Locale.ENGLISH);
}
else
{
Toast.makeText(MainActivity.this, "Not suppoert in your mobile", Toast.LENGTH_SHORT).show();
}

}
});
pak_Button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view)
{
if(Result_Text==TextToSpeech.LANG_MISSING_DATA || Result_Text==TextToSpeech.LANG_NOT_SUPPORTED)
{
Toast.makeText(MainActivity.this, "Not support", Toast.LENGTH_SHORT).show();
}
else
{
textToSpeech.speak("Pakistan",TextToSpeech.QUEUE_FLUSH,null);
Toast.makeText(MainActivity.this, "Pakistan", Toast.LENGTH_SHORT).show();
}

}
});


YouTube

SweetAlert dlog android studio

   • How to make SweetAlert dilog for succ...  

Firebase Analytic connect with app

   • connect app with firebase analytics