wit-ai/wit-ios

Canceling instead of Stop()

Opened this issue · 2 comments

How could one "cancel" the witSDK instead of using the Stop() function which looks for an intent and calls the rest of the api calls? Our app needs to be able to stop the witRecorder (i'm assuming) without sending a request to the wit api.
Does this make some sense? Anyone have any suggestions or perhaps a method could be added to the sdk if needed?

In case it helps, the dictation screen in our app is a modal view controller, so when it gets dismissed, we need to be able to stop the dictation without sending a response to wit

@thediary Canceling the request is not currently supported in the iOS SDK from what I can tell.

I do have a pull request (#56) that makes the recordingSession property publicly accessible from the main Wit shared instance. If that PR is approved, I believe something like this could be added to Wit.h/m:

- (void)cancel
{
    [[Wit sharedInstance].recordingSession.recorder stop];
}