Audio Recording
Unity Quick Start
Platforms
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (x86_64)
- Android (5.0+, API 21+) (ARM only)
- iOS (11.0+)
Requirements
- Unity 2017.4+ (Unity 2021.2+ for macOS arm64)
- Unity Build Support modules for desired platforms
Quick Start
Setup
Download and install Unity.
Clone the unity-voice-processor GitHub repo:
- Add
Unity Voice Processor
package to the project by clicking onAssets > Import Package
.
Usage
Access the singleton instance of VoiceProcessor
:
Create and add listeners for audio frames:
Start audio capture with the desired frame length and audio sample rate:
Stop audio capture:
Once audio capture has started successfully, any frame listeners assigned to the VoiceProcessor
will start receiving audio frames with the given frameLength
and sampleRate
.
Capturing with Multiple Listeners
Any number of listeners can be added to and removed from the VoiceProcessor
instance. However,
the instance can only record audio with a single audio configuration (frameLength
and sampleRate
),
which all listeners will receive once a call to StartRecording()
has been made. To add multiple listeners:
Demo
For the Voice Processor Unity SDK we have an example app that demonstrates how to use VoiceProcessor
in an Unity app.
Setup
Clone the unity-voice-processor repository from GitHub:
Usage
Open the
Unity Voice Processor
project via Unity.Open the
VoiceProcessorDemo.unity
scene located inAssets/UnityVoiceProcessor/Demo
.Run the scene in the editor or build and run it on one of the supported platforms.
Start and stop recording with the space bar. The shape on the screen will grow proportional to how loud the input audio is.
For more information on our Voice Processor demo for Unity, head over to our GitHub repository.