I am looking for a way of play an audio file and have it as input for the iOS simulator microphone. I am creating a bunch of UI tests for an iOS app that uses dictation (speech-to-text) and I didn't find a way of doing it using applications like SoundFlower, etc as I want to run in the CI and bypassing Apple's security Gatekeeper is not possible as I can't run the machine in recovery mode.

I want to launch the app as an UI test and send some audio to the "device microphone" as a way of triggering a wakeword. Mocking the code here is not an option, or better, not what we want, otherwise we won't test anything.

I was wondering if I can use AudioKit to do this.

I don't think AudioKit will help you with this. I would have thought Soundflower could do it, but you could also try Rogue Amoeba's Loopback if you haven't already.

The iOS simulator does inherit audio from the host Mac, so you could try an old school solution of physically attaching a cable to the microphone input from the output.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.