We will begin by creating a model around our interaction with AudioKit's recording APIs. You could just start writing directly against these APIs right from your Angular component or service, but since we want to provide a consistent API across iOS and Android, there's a smarter way to architect this. Instead, we will abstract a simple API, usable across both platforms, which will tap into the correct native implementations under the hood.
There will be a lot of interesting details related to AudioKit going on here, but create app/modules/recorder/models/record.model.ts with the following and we will explain some of the bits in a moment: