text to speech in GameMaker studio (auto audio dialog)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi i'm naida ansari and in this video i'm going to show you how you can have extra speech in your game so so you see whenever this say my name it's saying the whatever we put in there so whatever text you have it can say it in your game so without any further ado let's begin so for that let's just create a new project of game maker language let's call it tts for text to a speech let's save and in here first thing to do you should go to my h.i.o h that is navidarcy.each.io that i will put the link to description down below you can search text to speech for game maker and you can download it free so if you had download you can of course donate i will be much appreciated but if you don't want to do that just click on this no thanks just just take me to the downloads and in here you can download it now when it's downloaded just go to game maker go to tools go to import packages and in here just go to your download folders and open the text to speech wi-mps hit open in here and what you need is just this text to a switch extension hit import the text to speech extension is here now for testing that let's just create an object here let's call it obg test and in here first thing to do you should add a create event in here and say takes to a speech in it it get two parameters for input first one is pitch and the normal you can see it here the normal is 10 so let's put 10 in here and speed up as pitching you can set it as well and the normal is 10 so let's just put 10 for the sort and after that you should create a room end event and in here say text to a speech a stop so it will release all the resources that he's using so after you've done that you can add an event and something like most global press so wherever they click the text to speech extension will say whatever we want so for that we can say text to speech play and in here i want to say say my name and wherever you put this line of code and whatever you put in there to say it will say it so let's just run it to see if it's fork before we run it we should go to game option go to android and in here go to architecture and select all of them so it will be able to install on all the devices after that just select android in here and select your emulator or your phone to test it out after that we can hit run but before running we should open our room and add this object test to our room so after that we can run it so know that our game is running wherever and whenever we click on this empty game say my name it will say say my name and you can do this in whatever game you have wherever and whenever you want so let me give you an example you remember from my widows that i did show you how you can create dialogue with animation with timelines and all of that jazz so let's just open that project and test test or text to a speech on there i did open the project that i did show you on my videos that how you can create dialogue with cool animation and timelines and all of that jazz and now let's just run it to show you what it is and after that let's add a text to a speech to it so you can see our empty game is running and there will be there will be dialogue with cool animation in here and it will disappear after five seconds i did explain to you how you can do that you can watch my videos or there is a playlist at you that is all about gui and ui and you can watch all of them and learn a lot of things but know that we have this dialogue with cool animation and timelines um we can do text to speech in it so for that we can go to tools import local packages open this text to a speech in here and add this extension to this project at import and now we have this in here so what we should do in here let's just open this obg dialog in here in create event i want to say takes to a speech in it give it 10 and 10 for s for pitch and a speed that's it for our initialization and after that let's just create a room and in here and in a room and let's just say text to a speech stop so it will release all the resources and after that we can play whatever takes we want in wherever and whenever we want so so for that let's just open this timeline and you can see after two seconds if you open it after two seconds it will show a dialogue and it's say say my name we want to hear that right so let's just hit the middle most on this and it will create the function that we create in a script and in here i want to say text to a speech play and in here instead of just putting whatever we want just let's put this my text in here and no let's just run it if you didn't see my video about show dialogue you can watch it but if you don't want to watch it you can use this text to the speech in any game that you have you should just initialize it and after that play whatever text you want in whenever and wherever you want now the game is running and after two seconds say my name yeah they're really dialogue and it will speak all the texts in there so that's how you can do it i want to show you another thing for takes to speech you can see in here if we say textus text to a speech there is a function for changing the speech and changing a speed in run time wherever we wherever we want and there is a is playing a function in here as well that you can use to know if we are playing something or not so before saying text to speech play my text you should check if this takes to a speech is playing something or not and if it's not playing you do it like this if it's not playing just play my text in here so it won't overlap anything so always you should check if the text speech is playing and if it's not just play whatever text you want and you know that you can change the pitch in here and change the speed as well so i want to put 3 in here so let's see the result of course you can put value between 1 and one thousand but the important one is between one and twenty so you don't need to put higher than that and for the s bit as well you can put from one to one thousand but you can't understand what it says so it's better to stick with 1 to 20 for the speed so know that we put it at 3 for the s for the pitch let's just run it again and you can see where game is running and after two seconds say my name yeah there is dialogue and it will speak whatever text we put in there and you can see with it was with lower pitch you can change the speed as well so let's just change that takes to speech change in speed to something like 15 okay so no let's i change this to 10 as well so no let's just run it to see what effect it has and now where the game is running say my name one second and you can see that it say it faster so that's how easy you can have text to speech in your game you can use it wherever and wherever you want i hope you enjoyed this video please if you want to help me just hit that subscribe button and like button thank you very much for watching bye
Info
Channel: navidrct
Views: 152
Rating: undefined out of 5
Keywords: text to audio, text to audio in GameMaker, gamemaker, gamemaker studio, auto audio, audio dialog
Id: GT-t5NLPuBs
Channel Id: undefined
Length: 9min 32sec (572 seconds)
Published: Fri Nov 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.