How to Use Your Microphone in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys welcome to New real Engine 5 tutorial today I am going to show you how to get your microphone input and displayed on a bar you can use this for multiple things for example making a horror game where if you talk the AIS and creatures can hear you and so on it's going to be a very easy video to follow so let's get started but first check out my new on real Engine 5 course with game Def TV on how to make a full stealth Assassin game with blueprints you will learn how to make a whole bunch of different mechanics that will turn you into a Pro on real game developer this course will supply you with all the resources and assets that you will need so you can check it out right now through the link in the description all right so the first thing I to do is open up my third person C blueprint let's go to third person Blueprints and open this up and of course you might not be using the third person Capt blueprint so you would just open your player blueprint and basically what you need to do is add a new component that will basically get our microphone in this case it will be the audio capture under synth and we can just add it leave the name how it is as you can see we have a whole bunch of different details and properties that we can use now if we go down you can see that we have this event which is the on audio envelope value and if we just add this into our event graph you can see that this will return a float this is our microphone input value and basically we can control this float to do things so first of all let's make sure that we'll basically print this to the screen so we can see what is going out so let me go ahead and just print a string and let's connect the envelope audio here so we will be able to see it on the screen the values now the thing is that if I now just press play you can see that um you should be able to hear me um and that's if you if you cannot hear yourself okay that is basically because um it is um not getting your microphone okay this is very important so if it it is not getting your microphone well that is because it has not been activated so very important we have to go ahead and click out to activate which might be by default or not so make sure to enable this and now it will be activated so now yes if I press play you can see we have values but I am hearing myself so first of all to stop hearing myself uh if you want hear yourself okay but I'm not going to go insane so let's go and use disable under effects enable Buzz uh sub miix just disable that and now you will not hear yourself okay that's a bit better and so this will automatically get your default microphone so make sure that your default microphone is the one that you want in Windows and then we have all this prints as you can see it is the value if I don't speak it is pretty much silent can of0 G 0 and if I speak we have larger values but let's just go ahead and round these numbers up and it will be ideal to have them in a range between zero and one so we can use them more appr properly in our uh widget bar and whatever because right now of course this values is very hard to work with so what we can do is simply just move this into the right and we can use this log note okay and basically what we can do is put a base of 10 and now if I connect this you will see that indeed this will make the numbers and now they're more clear but they're negative right uh so now it is a better value that we can use but still it is kind of we want to kind of invert it right so what we can do is basically make a clamp uh range so just drag it and say map range H clamp there we go and now basically we can overwrite the values so the ones that are in the range and as you can see right now if I uh press play okay um let me just uh put this here of course press play you can see they have different values and mainly it is from uh minus 2.5 sl3 um to basically kind of uh like minus one right so let's put this to be around minus 2.7 kind of it was and then the other value which in this case was around what did I say one and we can SP this to be FR 0 to one and now the values will be in that specific range as you can see if I don't speak zero but if I speak it goes up into 3.4 and if I go ahead and go like sorry about that uh louder it will go more to one maybe if I basically change a bit the range to around 7 that will help it Go a bit more into higher numbers as you can see so it really is about um playing around with the values but if we go to negative it will actually be a bit better so I think like minus 7 is a better range there we go that that is more than what I want is more between 7 and so on so you can just play around with a legit range to get what you want but now we got more of a range between zero and one which is what we want so let's go ahead and right click and promote this to variable so we have the value to variable and this will be mik um value all right and let's go ahead and set it over here so now we are going to be displaying it on a um slider okay on a basically a bar in our widget so first of all let's quickly just create a user interface widget user widget wbore mik for example doesn't really matter and then let's go here add a canvas panel into our widget so we can just add stuff and let's add this progress bar um and just add it maybe like I don't know what let me just add it big in the middle of the screen okay and let me change the anchor at the center okay so now as you can see this percent goes from exactly 0 to one so there we go so imagine that uh we have this at you know 7 that will be kind of there so what we need to do is update this percent to be that value so we can use click here into bind create binding and now we can just access our character blueprint so we can say um um get player character and it will find our character in the level and then cast to the third person character blueprint and now we have access to our blueprint and we can get that mic value that we created earlier and now we can just plug that in Connect that and now we just need to go back to the third person character and in the begin play When the game starts I just want to add that new widget that we just created in this case it is the mic and just add this to the viewport and with that said now if we compile and press play we have our microphone in the middle of the screen and it works as you can see while I talk we have the microphone working which is what we want so that's it for this tutorial if you found helpful appreciate you can like the video and subscribe to my channel I have lots of unview engine five videos on tutor so check them out check out my unreal course game TV Link in the description join my Discord server follow me on my socials and now yes with all that said [Music] bye-bye
Info
Channel: Gorka Games
Views: 6,175
Rating: undefined out of 5
Keywords: games, videojuegos, unreal engine, unreal engine 5, ue5 microphone, tutorial, quixel, megascans, unreal engine use microphone, microphone in unreal engine 5, ue5 mic, get mic tutorial, use microphone, unreal engine 5 how to get microphone data, unreal engine 5 get volume of mic, unreal engine 5 use mic in bar
Id: wIbZ31deMbA
Channel Id: undefined
Length: 7min 42sec (462 seconds)
Published: Mon Nov 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.