Reputation: 47344
I want to create a sound board type of app using SiriKit. However, I don’t see if Siri can play back audio on demand.
Does SirKit allow play back of custom audio clips from my app?
For example : Siri, play “cow says moo” -> audio clip is played. Is this possible?
Upvotes: 2
Views: 314
Reputation: 2632
This is should definitely be possible but it needs your app to implement:
AVPlayer
e.g. as a background audio player)INPlayMediaIntentHandling
intent handler which tries to map the media item (whose text representation is given in INMediaSearch.mediaName
) to the correct snippet. Here you have to implement some laziness because the user could say "cow says moo" or "cow makes moo". After matching the item you can start the playback in your app.Apple has released documentation about media handling with Siri which might help you further: https://developer.apple.com/documentation/sirikit/media/improving_siri_media_interactions_and_app_selection
Upvotes: 1