Cara menggunakan text to speech dan speech to text di sketchware
Cara menggunakantext to speech dan speech to text di sketchware
1. Tambahkan Komponen TextToSpeech dan SpeechToText
2. Tambahkan EditText1 - Button1 dan EditText2 - Button2
3. Button1 onClick Event tambahkan blok TextToSpeech set speak
When Button1 Clicked
TextToSpeech : text2speech setSpeak TextView : EditText1 getText
4. Button2 onClick Event tambahkan blok SpeechToText start listening
When Button2 Clicked
SpeechToText : speech2text start listening
5. SpeechToText onSpeechResponse tambahkan blok TextView setText
When text2speech onSpeechResult result
TextView : EditText2 setText result
6. Untuk memunculkan pesan error pada SpeechToText, onSpeechError tambahkan blok toast
When text2speech onSpeechError errorMessage
Toast errorMessage
Label: sketchware, SpeechToText, TextToSpeech








0 Komentar:
Posting Komentar
Berlangganan Posting Komentar [Atom]
<< Beranda