# Voice Changer App

In this example we can look at how we can build a voice changer application from Switchboard SDK components.

We need to create an AudioGraph with an effect to change the voice. For a chipmunk or a deep voice effect, you can use Superpowered's PitchShift effect, which is available for you as a node, so you can easily put it in your process chain without having to do any low-level development.

Also lets have an echo effect in the chain to get a sound, like if you were standing inside a large cave.

You can use all the effects in a chain one after an other, enabling the ones you need at the time. Disabled effects acts as a passthrough node (no change between input and output).

import SwitchboardSDKimport SwitchboardSuperpoweredclass VoiceChangerExample {    let audioGraph = SBAudioGraph()    let pitchShiftNode = SBPitchShiftNode()    let echoNode = SBEchoNode()    let audioEngine = SBAudioEngine()    init() {        audioGraph.add(pitchShiftNode)        audioGraph.connect(audioGraph.inputNode, to: pitchShiftNode)        audioGraph.connect(pitchShiftNode, to: echoNode)        audioGraph.connect(echoNode, to: audioGraph.outputNode)        audioEngine.microphoneEnabled = true;        audioEngine.start(audioGraph)    }    func enableChipmunkVoice() {        disableVoiceChanger()        // Raise voice pitch by an octave        pitchShiftNode.isEnabled = true        pitchShiftNode.pitchShiftCents = 1200    }    func enableDeepVoice() {        disableVoiceChanger()        // Lower voice pitch by an octave        pitchShiftNode.isEnabled = true        pitchShiftNode.pitchShiftCents = -1200    }    func enableCaveEffect() {        disableVoiceChanger()        // Turn on echo node        echoNode.isEnabled = true    }    func disableVoiceChanger() {        // Turn of all effects        pitchShiftNode.isEnabled = false        echoNode.isEnabled = false    }}