Voice Recording in Unity

Voice Recording in Unity3d

In this tutorial, I will explain the usage of the Unity component I created for recording Mic Input in Unity and saving the file as .wav in the Streaming Assets Directory

How it works

Download Unity Recorder Package, you will find the unity package at https://github.com/ah1053/UnityRecorder

Add the Unity Recorder Package to your Project

Recording Mic Voice Input in Unity and saving the Audio File in WAV format
Record Mic Input in Unity using the Unity Recorder Plugin

Add The Recorder Component to any GameObject

Recording Mic Voice Input in Unity and saving the Audio File in WAV format
Add Recorder Plugin to the GameObject

Select a Keyboard Key or a UI Button and add to the Recorder Component

Recording Mic Voice Input in Unity and saving the Audio File in WAV format
Set the file name, the KeyCode or UI Button that will trigger the saving of the Recorded Voice

Play the Scene

Say something then press the selected KeyCode or the Button

In Console, it will print the saved file path

You will find the Audio WAV file saved in StreamingAssets Folder

Recording Mic Voice Input in Unity and saving the Audio File in WAV format
Sometimes you have to refresh the Assets folder to find the file

I have used Microsoft wave sound file format to understand the anatomy of the WAV files.

http://soundfile.sapp.org/doc/WaveFormat/ Wav file format Recording Mic Voice Input in Unity and saving the Audio File in WAV

Image source : http://soundfile.sapp.org/doc/WaveFormat/

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store