Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.95k stars 1.86k forks source link

Support for watchOS #1968

Closed bobbyrehm closed 1 year ago

bobbyrehm commented 1 year ago

Hello,

We are enjoying the Speech SDK in our iOS app, but we also have an Apple Watch app that we would love to be able to use the Speech SDK in. Is this something that you could add support for?

Here is the relevant documentation under the man page for xcodebuild. I believe you would need to update your existing scheme or add a new scheme with a WatchKit app so that the watchOS architectures (both device and simulator) are included. Then they can be integrated into the xcframework along with the other architectures/destinations you are already using.

Destinations The -destination option takes as its argument a destination specifier describing the device (or devices) to use as a destination. A destination specifier is a single argument consisting of a set of comma-separated key=value pairs. The -destination option may be specified multiple times to cause xcodebuild to perform the specified action on multiple destinations.

 watchOS            A watchOS app is always built and deployed nested inside of an iOS app. To use a watchOS device as your destination, specify a scheme which is configured to run a WatchKit app, and specify the iOS platform destination that is
                    paired with the watchOS device you want to use.

 watchOS Simulator  A watchOS Simulator app is always built and deployed nested inside of an iOS Simulator app. To use a watchOS Simulator device as your destination, specify a scheme which is configured to run a WatchKit app, and specify the iOS
                    Simulator platform destination that is paired with the watchOS Simulator device you want to use. 

Thank you!

jhakulin commented 1 year ago

@bobbyrehm Thanks for the request, We will evaluate this and let you know. Internal workitem ref: 5282747

pankopon commented 1 year ago

Closed as there is now a work item on the backlog and we are tracking the feature request there, no ETA for the time being. Please open a new issue if more support is needed.

jhakulin commented 1 year ago

@bobbyrehm Which WatchOS versions you would need to support? I wonder if ARM32 targets are still required.

bobbyrehm commented 1 year ago

@jhakulin we would need support for watchOS 8.0 and later. Thanks!

bobbyrehm commented 1 year ago

With that said, if adding support for the arm32 architecture would significantly delay this being implemented, then we would also be okay to support only watchOS 9 and later.

jhakulin commented 1 year ago

@bobbyrehm Thanks, I learnt that WatchOS does not support AudioToolbox, which would provide audio APIs (access to microphone) and seems audio input options would be stream audio bytes/file input. Is that what you expect also?

bobbyrehm commented 1 year ago

@jhakulin yes that looks to be correct, it doesn't look like AudioToolbox is available for watchOS. You should still be able to access the microphone on the watch using the AVFAudio APIs (AVAudioRecorder for basic recording and AVAudioEngine for more control).