Live Processing

After the SDK has been initializated you have access to all of this functions:

Start the engine

This method initialize an audio session in AVAudioSessionCategoryPlayAndRecord category, not allowing other audio sessions to mix with it, get the microphone input and starts modulation, if user has not been asked for microphone access permission will be asked and if access is not granted this method will return an error.

If you want to check if access its allowed of forbidden you can check using AVAudioSession requestRecordPermission

Load a voice

You can load a voice using this method, the engine can be started or not, you can get a full list of the voices name using getPresetsNames method. Since version 1.1.0 you can pass nil in voice parameter to process the voice without applying any effect:

Stop the engine

Call this method to stop microphone input and set current audio category to AVAudioSessionCategoryAmbient

Start recording audio

This method starts recording, if you dont wan't any previous audio recording call clearRecording to clean memory or the audio recorded will be added to previous one

Stop recording audio

This method stops recording

Save recording audio

Call this method to save the audio recorded to an audio wav file, this method internally call

stopRecording to stop recording prior to save recording

Clear any previous recordings

With Voicemod you can concatenate recordings in a single file if you start and stop recording more than once, call this method to clear any previous recordings

Other functions and properties

isRunning

Use this method to retrieve the status of audio engine

 

currentVoice

Access this property to retrieve the current voice loaded

 

talkingEnabled

Access this property to retrieve the talking status, by default talking its enabled when headphones are not plugged in.

 

echoCancelationEnabled

Access this property to retrieve if echo cancelation its active, by default echo cancelation its enabled when headphones are not plugged in.

 

getPresetsNames

Use this method to retrieve a NSArray list of the current voices names

 

isHeadphonesPluggedIn

Use this method to check if headphones are plugged in