NuanceDev / speechkit-ios-sample-swift

2 stars 1 forks source link

nil skSession #1

Open jkgneu12 opened 7 years ago

jkgneu12 commented 7 years ago

Reported by: @Catharsis68

There is an issue with ASR in the sample app. After viewDidLoad in SKSASRViewController there's an error. skSession = SKSession(url: URL(string: SKSServerUrl), appToken: SKSAppKey) and skSession is still nil.

Saravana181187 commented 7 years ago

@jkgneu12 Yes before my app was worked but it doesn't work for past few days only.

jkgneu12 commented 7 years ago

@Saravana181187 - Your credentials probably expired. Login to https://developer.nuance.com. Navigate to My Account. And make sure it says you have "Sandbox Access" and it is not expired. If it is expired, click "Extend Sandbox Access".

portguas commented 7 years ago

Hi, I got the same issue. I create my app today,I use the "Sandbox Access " parameters in "SKSConfiguration.mm". It still shows the error below: failed with error = Error Domain=SpeechKitErrorDomain Code=4 "Cloud transaction reported an error." UserInfo={NSUnderlyingError=0x1655b740 {Error Domain=NMTErrorDomain Code=0 "(null)"}, NSLocalizedDescription=Cloud transaction reported an error.} Any help? Thank you.

jkgneu12 commented 7 years ago

@portguas Are you still seeing this issue? It does take up to 10 minutes for sandbox credentials to be activated after activating your account.

portguas commented 7 years ago

@jkgneu12 I still got the issue on ios 10.2.1, but it works well on ios 9.3.5 So any suggestions? Thank you.

jkgneu12 commented 7 years ago

@portguas Make sure you:

  1. Add NSMicrophoneUsageDescription to your Info.plist:
    <key>NSMicrophoneUsageDescription</key>
    <string>Microphone access is required for speech recognition.</string>
  1. Enable "Keychain Sharing"
portguas commented 7 years ago

@jkgneu12 I have double checked the settings and ensure they are right. Only in the new os(10.2.1) has a problem. Thank you.

jkgneu12 commented 7 years ago

Hey @portguas I'm not sure what the issue is. You can email your project and I can take a look, or you can just email me your credentials and I can try them on my end. Thanks.

AabanTariq commented 7 years ago

Brother Can I use these sandbox credentials on real devices (not simulator) for testing purpose

jkgneu12 commented 7 years ago

@AabanTariq Absolutely. Just don't put your app in the app store with them.

AabanTariq commented 7 years ago

Brother @jkgneu12 , viewDidload of my viewController hits a call for speaking a sentence.

skSession!.speak("Welcome to abc xyz", withLanguage: "eng-USA", options: nil, delegate: self)

now 40 percent of times, application speaks this sentence correctly and timely. But mostly it won't speaks out. And similar behaviour for other calls. Your assistence would really be thankfull.

jkgneu12 commented 7 years ago

@AabanTariq Do you have any logs for when this fails? Do you have a strong Internet connection?

AabanTariq commented 7 years ago

Brother @jkgneu12 , Suppose I have slow internet connection. Won't it speaks or would it take some time to speak? As concerned with logs, Speak Request completed successfully, i mean logs are not reporting any problem.

jkgneu12 commented 7 years ago

@AabanTariq It should eventually speak even with a slow connection. I could help you dig further but will need logs or you could email me your application.

denismurphy commented 6 years ago

@jkgneu12 can not get the sample application to work when i try init SKSession it returns nil there no logging from speechkit i've updated app key, app id and server url, added permission for microphone and keychain sharing "com.nuance.SpeechKitSample"

jkgneu12 commented 6 years ago

@denismurphy Please check that your credentials have not expired. In the Nuance Developer's Portal, you should be able to see if your Sandbox Credentials have expired, and if they have you can Extend Access. Then you may have to wait up to 10 minutes for the credentials to start working again.

rohit-althea commented 6 years ago

@jkgneu12 Is there any API to check account is expired or not ? NUSASession.shared().isNHIDEnabled() is this works for the same ? when to use isNHIDEnabled ?

RuchiraMore15 commented 5 years ago

Hi @jkgneu12 ,

I am facing one issue in "SpeechKitSample" from Nuance Developer SDK sample.

Error : didReceiveAudio didFailWithError: Error Domain=SpeechKitErrorDomain Code=1 "Cloud transaction reported an error." UserInfo={NSLocalizedDescription=Cloud transaction reported an error., NSUnderlyingError=0x1c0844710 {Error Domain=NMTErrorDomain Code=268369920 "(null)"}}. (null) willBeginPlaying didFinishPlaying

As I have seen previous problems and solutions above. But didn't worked for me. Today only I have created account on "Nuance Developer".

RuchiraMore15 commented 5 years ago

Where to find the NLU Context Tag for Nuance Speech kit configuration

// Only needed if using Mix.nlu NSString* SKSNLUContextTag = @"!NLU_CONTEXT_TAG!";

I am not able to login by using Nuance credentials --> https://developer.nuance.com/mix