Microphone input wave like Siri using Swift

In recent weeks I’ve been developing an audio recording app in my spare time, just for fun.

I wanted to be able to implement a Siri like wave that animates in response to sound input via the microphone as below:

siri wave

Luckily I was able to find an Objective-C implementation on Github called SCSiriWaveformView which was very well documented – thanks to Stefan Ceriu for this.

Since I’m focussing mainly on Swift these days, I’ve put together a Swift version including the files downloaded from Github. The full source code is below.

If you’re unsure on how to import and use Objective-C files in Swift, check out my earlier post on how to do this here.



Leave a comment