How to record our Voice through Unity

Hi All

In My project i have to record our voice through game. I don’t want to use Micro phone or anything.

In My Project Record & Hear voice button is there. When i click the Record button.

Whatever i speak It should recorded.

and when i click the Hear Voice Button Whatever i speak i should listen.

I don’t want any Plugin.

So is there any default option is there in unity…

Thanks in Advance

1 Like

You said you don’t want to use the microphone… Then how will you record the voice?

This is what you need to use : Unity - Scripting API: Microphone

Using Start and End you can start and end the recording.

Hope this helps.

1 Like

Thanks Basen 1 For You Reply. Actually We are playing through Phone. There is a speaker option is there. Whatever i speak through the speaker… It should recorded and play in unity.

For Eg… Talking Tom…

Is there any built in option available in unity…

The phone has a Speaker and a Microphone. You can only record audio with the microphone. So you will have to use what I linked above. You can have a button that will do Microphone.Start() and one that will finish with Microphone.End()

You can then replay the AudioClip immediately after stopping the recording.
Good Luck!

1 Like

nice meme gg

Thanks Basen 1 For you reply. I have little bit Confused… Its works fine and Good. Actually I have another Question. How can i validate the Sound. For eg 1 I have a Button “How are You”. If the user also said " How are you" then the sound must save. or else it should not save.

How can i Validate the Sound.

Is there any option available the sound can be converted into the text…?

For that to work you would have to have something like a speech to text module/plugin. Not sure if there are any available for Unity.

Unity does not have a built in method of doing speech (audio) to text, which is probably how I’d approach validating someone said the words they are supposed to. There’s probably other ways of doing that validation, such as directly comparing wave forms, but this is getting into really advanced stuff that is also not built into Unity and outside of my skill set. I don’t see how you expect to do this without any kind of plugins.