Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFButtonError error 3 #8

Open
wawilliams003 opened this issue Jul 15, 2019 · 9 comments
Open

SFButtonError error 3 #8

wawilliams003 opened this issue Jul 15, 2019 · 9 comments

Comments

@wawilliams003
Copy link

Thanks for this Libary, I am trying to get it to work by following your example. That doesn't give a very clear explanation of how to use this. I set up the waveform and button through storyboard, but I am getting this error: "The operation couldn’t be completed. (SpeechRecognizerButton.SFButton.SFButtonError error 3.)"

This is how I am setting it up, add in viewDidload:

  speechRecognizerBtn.authorizationErrorHandling = .custom(handler: { (error) in
            print("error Authorizing \(String(describing: error?.localizedDescription))")
        })
        speechRecognizerBtn.resultHandler = {
            recordUrl, result in
            self.speechRecognizerBtn.play()
            
            print("result \(String(describing: result?.bestTranscription.formattedString))")
        }
        speechRecognizerBtn.errorHandler = { error in
            print("error \(String(describing: error?.localizedDescription))")
            //self.label.text = $0?.localizedDescription
        }
@alexruperez
Copy link
Owner

What error are you getting? (From this enum)

@wawilliams003
Copy link
Author

@alexruperez Thanks for your fast response, this is the error I am getting:
The operation couldn’t be completed. (SpeechRecognizerButton.SFButton.SFButtonError error 3.)

I don't know why, do you know how I can resolve this?

@alexruperez
Copy link
Owner

I mean the value in the enum, when debugging. If it's error 3, maybe your are using a invalid(locale: Locale)?

@wawilliams003
Copy link
Author

I set the locale, but still getting the same error.

speechRecognizerBtn.locale = .current

@alexruperez
Copy link
Owner

Have you NSMicrophoneUsageDescription and NSSpeechRecognitionUsageDescription declared in your app Info.plist?

@wawilliams003
Copy link
Author

Yes, I added those and I think the app would've crashed if I didn't or give a more descriptive error.

@Gagan6696
Copy link

hi,
I am getting same error
do you have a solution for this?

@alexruperez
Copy link
Owner

I have improved the error feedback in the example app, try the new version 0.2.0 to see what's happening please. Thanks.

@ShKhan9
Copy link

ShKhan9 commented Feb 3, 2021

The problem still exists but error 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants