Skip to main content

How to create your own app that converts text to speech

If you've ever wanted to create apps but felt you could not because you had no coding skills, then this one's for you. This tutorial covers how to create your own app that will convert whatever you type into audio when you click a button. This app will be created using Sketchware. If you're not familiar with Sketchware you might want to check out this article.

This can be particularly useful for people with a speech disability or when making learning apps. You can easily create an app that reads notes, gives instructions whilst the user completes an activity. Feel free to ask if you get lost or need help.

Duration:

5 - 10 Minutes


Preparation

• You will need to have Sketchware installed and running on your phone. If you haven't installed it yet, you can download Sketchware here.

• You will also need to create and set up a new project. If you're not sure how to do that, please check out an article I wrote on how to Create a new Sketchware project


Step 1. Build your layout

Let's create our layout. Our app will only require an edittext field and a button. The user will type something in the edittext then click the button to speak. Simple right? Drag your items onto the screen as shown below. 

In the image below, step one is building the layout and step 2 is opening the button's onClick event. This is where we will place our logic.

texttospeech app layout


Step 2: Create a TextToSpeech component


In our button onClick logic we will create a TextToSpeech component. This is what will convert our written text to speech. 

By default, most android devices come with a text to speech engine pre-installed. You can go to your settings and install additional languages.

Simply follow the steps below to create the component.
Add new component


In our components menu, choose TextToSpeech as shown below.


Choose TextToSpeech component


Name your component. I have given mine the name 'read' as shown below.


Name TextToSpeech component


Step 3: Set up your logic


Drag the TextToSpeech setSpeak block to your logic as shown in the following image.


Drag setSpeak block


Go to the view blocks and choose a textView getText block as shown below. This block will get our text after we type it.

Add getText block


Click on the blank space right next to the word TextView on your getText block. This will open up the menu below. Choose your edittext.

Select edittext


after choosing your edittext also choose your text to speech component by clicking on it. Your blocks should now look as shown below.


TextToSpeech logic
Our app is almost done. At this point you can click the back button. 


Step 4: Run your app

After clicking the back button, you will notice the blue button at the bottom of your screen with the word 'Run'

Click 'Run' and your application will be installed on your phone.

Run your app

After your app has been installed on your phone, you can start typing in whatever you want it to read. You can copy a passage from your favourite book and paste it into the edittext and it will read that for you.



Text to speech demo


Conclusion

Using Sketchware you can easily create an app that converts text to speech. More importantly, this can be combined with other concepts to create even more powerful apps. You can also use this if you're creating:

• a book or magazine app
• an app for people with a speech impediment
• to send warnings in an app
• so much more...


I hope you found this very helpful and you're enjoying the process of creating your own apps. If you would like to create more apps, please check out the tutorials section.

Comments

Cicero alex said…
Tem como fazer um tutorial explicando de como criar uma aplicação contendo uma caixa de entrada para digitar o texto um botão para falar o texto digitado e um botão para fazer o download do arquivo de áudio em MP3

Popular posts from this blog

How to easily create background notifications in Sketchware(original)

How to easily create background notifications in Sketchware(original) One of the keys to building a successful app is to find mechanisms that will keep your users engaged. You can do this by using background notifications. This tutorial will show you how to do that in Sketchware. We will cover: 1. How to create notifications in Sketchware 2. How to show these notifications even when the app is closed.

Happy Birthday Memes: Laugh Your Way to Someone's Heart

Happy Birthday Memes: Laugh Your Way to Someone's Heart Introduction Birthdays are a special occasion to celebrate another year of life, and what better way to do it than with a good laugh? That's where happy birthday memes come in! These hilarious images are the perfect way to put a smile on someone's face and let them know you're thinking of them on their special day. Why Memes Are the Best Birthday Greetings * Relatable:  Memes often tap into universal experiences and emotions, making them instantly relatable to a wide audience. * Quick and Easy:  Sharing a meme is a hassle-free way to send birthday wishes, perfect for those last-minute greetings. * Memorable:  A funny meme is more likely to stick in someone's mind, making your birthday wishes unforgettable. * Versatile:  There's a meme for every type of person and occasion, from silly and goofy to heartfelt and sentimental. How to Use Happy Birthday Memes * Share on Social Media:  Spread ...

Cybersecurity Essentials: How To Stay Safe On The Internet

  Hi there, my name's Likhwa and welcome to Building Africa's Next Tech Unicorn. on this platform I give a behind the scenes look at what it takes to build a startup within the African context. In today's video, I'll be doing something different- I'll be talking about how you can stay safe online. This isn't meant to scare you or get you all paranoid, but to help you be more vigilant in protecting yourself and your loved ones from cyber threats.  Most people underestimate the dangers of the internet, but the more I am exposed to it, the more I wish I didn't need it. At times I wish I could just disconnect, get rid of all my devices and not have to worry about the constant threats that come with being online. I believe some of us are fortunate by default- especially those who live in countries like my Zimbabwe- because we hardly use credit cards to transact online and even when we do, its not like we have a lot of money- otherwise we would be a hacker's g...