Siri and Voice

RSS for tag

Help users quickly accomplish tasks related to your app using just their voice.

Posts under Siri and Voice tag

42 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Supporting In-App SiriKit Media Intents in watchOS
I was trying out SiriKit Media Intents and found that with iOS 14, Media Intents can be handled in-app instead of using an extension. Given my current project structure, in-app intent handling suits my purpose better than handling it in an extension. But my question is about how this intent will be handled in a watchOS app? Is in-app Intent Handling supported on watchOS as well (if yes, are there any examples that I can refer to)? If not, can I create an extension for Media Intents and trigger it for watchOS while triggering the in-app handling for iOS alone? Please share if I have missed to read through some documentation / reference that solves this problem.
1
0
1k
Nov ’23
App Intents with OpensIntent does not work correctly
We are developing an app for iOS 16 using App Intents and Siri. We have been testing the behavior of opening another App Intent by passing the opensIntent argument to the result function in the App Intent with iOS 16.4 devices. As a result, we found that the dialog text specified in the result argument of the Intent to which it transitions is not displayed and therefore does not work. And also found that when invoked from Siri, the Intent passed to the opensIntent argument is invoked "twice". Are these behaviors bugs? Any ideas? The following is a sample code and logs. import AppIntents struct PrimaryIntent: AppIntent { static var title: LocalizedStringResource = "Primary" func perform() async throws -> some OpensIntent { print("\(String(describing: Self.self)).\(#function): invoked") return .result(opensIntent: SecondaryIntent()) } } struct SecondaryIntent: AppIntent { static var title: LocalizedStringResource = "Secondary" func perform() async throws -> some ProvidesDialog { print("\(String(describing: Self.self)).\(#function): invoked") return .result(dialog: .init(stringLiteral: "test")) } } struct ShortcutsProvider: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut(intent: PrimaryIntent(), phrases: ["\(.applicationName)"]) } } logs from Shortcut App PrimaryIntent.perform(): invoked SecondaryIntent.perform(): invoked # is not displayed dialog... logs from Siri PrimaryIntent.perform(): invoked SecondaryIntent.perform(): invoked SecondaryIntent.perform(): invoked # is not displayed dialog... # SecondaryIntent invoked twice...
1
1
1.5k
Aug ’23
Code Examples for starting background audio from an AppIntent
Hi all, I'm trying to update my app to use the AppIntent framework to play an audio file (loaded from the main bundle). I tried implementing an a PlayMusicIntent using the AudioStartingIntent protocol, but have had no luck. The intent does run, and provides the dialog response, but the music doesn't start. struct PlayMusicIntent: AudioStartingIntent { static let title:LocalizedStringResource = "Play Music" @MainActor func perform() async throws -> some IntentResult & ProvidesDialog { guard let musicPath = Bundle.main.url(forResource: "moonglow", withExtension: "mp3") else { fatalError("Could not load music file") } do { let musicPlayer = try AVAudioPlayer(contentsOf: musicPath) musicPlayer.numberOfLoops = -1 musicPlayer.play() return .result(dialog: "Now Playing Moonglow") }catch { print(error) return .result(dialog: "There was an error playing the music: \(error.localizedDescription)") } return .result(dialog: "Cannot play music") } } And then add this in my App Shortcuts Provider: AppShortcut(intent: PlayMusicIntent(), phrases: [ "Play music with \(.applicationName)" ]) I do have Audio background mode enabled. I'm thinking I need to do something with the intent's return type, but there is not a lot of documentation or online examples to implement AudioStartingIntent Any suggestions would be appreciated. Thanks, Scott
3
1
1.4k
Aug ’23
Siri enters loop of requesting parameter when running AppIntent
I want to add shortcut and Siri support using the new AppIntents framework. Running my intent using shortcuts or from spotlight works fine, as the touch based UI for the disambiguation is shown. However, when I ask Siri to perform this action, she gets into a loop of asking me the question to set the parameter. My AppIntent is implemented as following: struct StartSessionIntent: AppIntent { static var title: LocalizedStringResource = "start_recording" @Parameter(title: "activity", requestValueDialog: IntentDialog("which_activity")) var activity: ActivityEntity @MainActor func perform() async throws -> some IntentResult & ProvidesDialog { let activityToSelect: ActivityEntity = self.activity guard let selectedActivity = Activity[activityToSelect.name] else { return .result(dialog: "activity_not_found") } ... return .result(dialog: "recording_started \(selectedActivity.name.localized())") } } The ActivityEntity is implemented like this: struct ActivityEntity: AppEntity { static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "activity") typealias DefaultQuery = MobilityActivityQuery static var defaultQuery: MobilityActivityQuery = MobilityActivityQuery() var id: String var name: String var icon: String var displayRepresentation: DisplayRepresentation { DisplayRepresentation(title: "\(self.name.localized())", image: .init(systemName: self.icon)) } } struct MobilityActivityQuery: EntityQuery { func entities(for identifiers: [String]) async throws -> [ActivityEntity] { Activity.all()?.compactMap({ activity in identifiers.contains(where: { $0 == activity.name }) ? ActivityEntity(id: activity.name, name: activity.name, icon: activity.icon) : nil }) ?? [] } func suggestedEntities() async throws -> [ActivityEntity] { Activity.all()?.compactMap({ activity in ActivityEntity(id: activity.name, name: activity.name, icon: activity.icon) }) ?? [] } } Has anyone an idea what might be causing this and how I can fix this behavior? Thanks in advance
3
3
1k
Jun ’24
Siri INStartCallIntent works on iOS but not with CarPlay
Hey there, I implemented Siri and CarPlay. The INStartCallIntent works on iOS but not when initiating a voice command via CarPlay. Error from INIntentDeliverer: Unable to find implementation of resolution method for facade slot name (null) From what I see, I implemented all methods declared on INStartCallIntentHandling but none is called. Does someone know whats missing? 2023-08-29 11:34:52.551834+0200 MyApp[64559:4844776] [Intents] -[INIntentDeliverer _resolveIntentParameter:forIntent:intentHandler:updateIntent:withCompletion:]_block_invoke Unable to find implementation of resolution method for facade slot name (null) on intent <INStartCallIntent: 0x282a71830> {
1
0
682
Oct ’23
Detect if user is running Voice Control
Our users are using Apple's native Voice Control feature: https://support.apple.com/en-us/HT210417 We want to enhance our accessibility experience by adding some additional voice controlled dialogs that show up specifically when Voice Control is enabled. It can be determined if other Apple accessibility features are turned on via a check like UIAccessibility.isVoiceOverRunning, however there is no option for Voice Control (note, different than Voice Over). How can I detect if a user is running Voice Control or not?
1
2
766
Mar ’24
Can't start Live Activity from App Intent if another LA already started
A have a few App intents that conforms to LiveActivityStartingIntent. If there are no active LA, then any of my intents can start live activity. But if there is at least one active LA then requesting LA returns an error: "The operation couldn’t be completed. Target is not foreground" Is there a limit to only 1 LA or I do something wrong?
1
0
632
Sep ’23
iPhone iPad and HomePod ios17 ipados17 Siri not working
I have updated all devices (iPhone 14 Pro Max, iPad Pro 12” 3th gen, HomePod 1st gen) to the latest version. Since I have updated to 17, when I say “Hey Siri“ all of them turns on to listen but immediately all of them stops thinking the other devices listens. with the previous versions when I say “hey siri” all the devices listen but when they detect a HomePod was active listening the iPhone and the iPad stops listening letting the HomePod take the control. sorry for my English, but I think it’s understandable 🤔😊 im just the only one who happens this?
1
0
492
Sep ’23
Programatically check if siri feature is enabled or not in Ipad OS - SiriKit
Hi, I am working on enhancing iPad Application where in I would like to understand if there is a API available for below : Any API provided by Apple to know Siri Settings. (Is Siri Enabled or Disabled) Any API provided by Apple to Enable or Disable Siri from application. I have gone through all the developer documentation available for Sirikit and I don't see any API for my requirement. Technology I prefer : Xamarin.IOS. (I would like to know if API is available in any other language as well) Reason why I am looking for Siri APIS : My application is medical application and there is a chance Siri assistant is invoked accidentally and interferes app functionality. If I am able to access these APIs during app launch, I would notify user to disable Siri for better experience with application. Note : I would like to use these APIS only when my App is up and running. Let me know if you need more details. Thanks
0
0
527
Oct ’23
iOS 17.1 Carplay Issue with Siri Feature
With the latest release of iOS17.1, the "Hey Siri" or "Siri" feature does not work with Apple Car Play. Even with taking multiple mitigation steps to try and alleviate the issue (turning on and off the phone, turning off the phone Wi-Fi and Bluetooth, disconnecting the phone from the vehicle, turning the vehicle on and off, etc.), nothing seems to work. There will need to be an updated release to patch that current bug which worked in iOS 17.
2
0
1.7k
Nov ’23
INSendMessageIntent has no recipients when replying to a message provided by INSearchForMessagesIntentHandling
INSendMessageIntent has no recipient when replying to a message provided by INSearchForMessagesIntentHandling provider. A user would expect that if Siri just read them a message from an app implementing INSearchForMessagesIntentHandling that they would be able to reply directly without having to look up the recipient. When handling INSearchForMessagesIntentHandling I find the messages in my local DB and create INMessage objects that have INPerson objects embedded in them. We have our own internal contacts, so I fill out the INPerson object as follows: INPerson( personHandle: INPersonHandle(value: "Name", type: .unknown), nameComponents: nil, displayName: "Name", image: nil, contactIdentifier: nil, customIdentifier: "localContactIdentifier" ) After reading every conversation Siri asks "Would you like to reply?", and if the user answers in the affirmative, Siri always answers "To who?" because my INSendMessageIntentHandling.resolveRecipients never gets any recipients. I have attempted to donate all of my contacts using INVocabulary.shared().setVocabulary but that didn't help.
1
0
539
Nov ’23
Merge my application with a scientific data portal.
Hello, let me introduce myself to you, my name is Maxime and I would like to create artificial intelligence for my research and development needs. I want to use Siri applications with data from a scientific portal established by my university. The APIs are public, however, access to the portal and the network is reserved for university researchers. How can you help me?
0
0
508
Nov ’23
Purple Siri Dot Wont' Disappear
Hi all Since updating to the most recent Sonoma Beta on my MacBook Air M2, I have a purple "Siri & Dictation" dot permanently in the top right corner on videos and streaming sites. I have turned every imaginable thing off for Siri and Dictation, but it's still there. I'm using Chrome. Has anyone else had this problem and have they found a solution for it?
2
1
689
Nov ’23
Siri shortcuts in Italian
HI! I'm using shortcuts commands to send http commands to my home automation system. unfortunately from IOS16 onwards they only work when the button is pressed because if I ask Siri to execute a command I get a paragraph telling me that I don't have any devices configured in the "apple home" app. I noticed this problem with Siri in Italian. what can I do? thank you
0
0
413
Dec ’23
HomePod chaos
Hi, Recently I bought 2 HomePod minis and placed them in my kitchen and bathroom. I have noticed that they keep their alarms/reminders device-local and take priority over any other device. For example I can hold up my phone, say something like "hey siri set alarm for 7am" and the kitchen echo will respond something like "none of your devices can do that" (obviously sound quality suffered from distance) or worse, it sets an alarm on the device not my phone, waking everyone in the household not just me. Another annoying habit it has is to set a reminder on one device, then later I say something like "cancel my reminders", accidentally the other HomePod picks it up, says something like "I cancelled all your reminders" then a few minutes later the first HomePod will still remind me - so it's not even shared across HomePods. Setting wake-up alarms gotten so bad and complicated (walk out of a room, whisper to the phone directly) I had to disable both HomePods from listening to "siri". Now all they are is expensive decoration (except when once a week we listen to some music on it). Is there no way to make HomePods not to be the highest priority devices and use alarms/reminders from the phone (like it does with shopping lists)? This annoying experience I would expect from MS and Alexa maybe, but not Apple.
0
0
526
Dec ’23