Post

Replies

Boosts

Views

Activity

Creating a Continuous Conversation with Siri Using App Intents
Hello, I am working on an app that uses App Intents to enable users to interact with Siri. Here is the code I'm using: struct SiriPassMeLuna: AppIntent { static var title: LocalizedStringResource = "Pass me Luna" static var description = IntentDescription("Lets you query Luna and receive a response.") @Parameter(title: "Phrase") var phrase: String? func perform() async throws -> some IntentResult { guard let providedPhrase = phrase else { throw $phrase.needsValueError("What do you need help with?") } let request = Request() let reply = request.sendRequest(transcription: providedPhrase) return .result(dialog: "\(reply)") } } struct SiriAppShortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: SiriPassMeLuna(), phrases: ["Pass me \(.applicationName)"] ) } } My goal is to create a continuous conversation with Siri, where the user can speak to the intent, and then the intent keeps listening and replying without the user having to invoke Siri and the intent each time. Is there a way to achieve this behavior, so that the conversation with Siri is more seamless, and the user doesn't have to repeatedly say "Hey Siri" followed by the intent name? Any guidance or suggestions would be greatly appreciated. Thank you!
1
0
1.6k
Mar ’23
Can I Combine System Actions with Custom Intents to Create a Shortcut in iOS App Development?
Is it possible to create a custom app shortcut using system actions and custom intents in iOS development? For instance, can my app generate a shortcut that combines dictation text, note creation, and speech output using Siri speakers? If not, is there a way to access dictation text or Siri speakers from within my custom app intent?
0
0
705
Feb ’23