Voice Processor
Unity API
API Reference for the Voice Processor Unity SDK.
VoiceProcessorFrameListener
Listener type that can be added to VoiceProcessor with .addFrameListener(). Captures audio
frames that are generated by the recording thread.
VoiceProcessor
Class for capturing audio and delivering audio data.
VoiceProcessor.Instance
Gets the singleton instance of VoiceProcessor.
VoiceProcessor.CurrentDeviceIndex
The index of the currently selected audio recording device.
VoiceProcessor.CurrentDeviceName
The name of the currently selected audio recording device.
VoiceProcessor.Devices
A list of available audio recording devices on the current system.
VoiceProcessor.FrameLength
Gets the number of samples per frame that the VoiceProcessor will deliver.
VoiceProcessor.SampleRate
Gets the audio sample rate that the VoiceProcessor will
record with.
VoiceProcessor.IsRecording
Gets whether the VoiceProcessor is capturing audio or not.
VoiceProcessor.NumFrameListeners
Gets number of registered VoiceProcessorFrameListeners.
VoiceProcessor.AddFrameListener()
Add a frame listener that will receive audio frames generated by the VoiceProcessor.
Parameters
listenerVoiceProcessorFrameListener: Listener for processing frames of audio.
VoiceProcessor.AddFrameListeners()
Add multiple frame listeners that will receive audio frames generated by the VoiceProcessor.
Parameters
listenersVoiceProcessorFrameListener[]: Listeners for processing frames of audio.
VoiceProcessor.RemoveFrameListener()
Remove a frame listener from the VoiceProcessor. It will no longer receive audio frames.
Parameters
listenerVoiceProcessorFrameListener: Listener to remove.
VoiceProcessor.RemoveFrameListeners()
Remove frame listeners from the VoiceProcessor. They will no longer receive audio frames.
Parameters
listenersVoiceProcessorFrameListener[]: Listeners to remove.
VoiceProcessor.ClearFrameListeners()
Clears all registered frame listeners.
VoiceProcessor.StartRecording()
Starts audio recording with the specified audio properties.
Parameters
frameLengthint : The length of each audio frame, in number of samples.sampleRateint : The sample rate to record audio at, in Hz.
Throws
VoiceProcessorException: if an error is encountered while trying to start the recorder.
VoiceProcessor.StopRecording()
Stops audio recording and releases audio resources.
VoiceProcessor.UpdateDevices()
Updates list of available audio devices.
Throws
VoiceProcessorException: if an error is encountered while trying to update devices.
VoiceProcessor.ChangeDevice()
Change the active audio recording device.
Parameters
deviceIndexint : Index of the new audio capture device.
Throws
VoiceProcessorException: if an error is encountered while trying to change device.
VoiceProcessorException
Exception thrown if an error occurs within the VoiceProcessor.
Exceptions: