Failure to connect to server in Dragon Dictation API - ios

I am using a demo app from the dragon dictation api. I have made no modifications to the demo app, so I don't think there is anything wrong with it. When I open the app and run it on my phone it opens and runs. I click the record button and talk to it. Then it tries to connect to the server, but it gives me the error saying it can't connect to the speech server.
The output says:
2013-08-10 13:54:11.582 Recognizer[655:907] set session Active 0
2013-08-10 13:54:11.803 Recognizer[655:907] sample rate = 44100.000000
2013-08-10 13:54:11.823 Recognizer[655:907] audio input route(iOS5 or above): MicrophoneBuiltIn
2013-08-10 13:54:11.828 Recognizer[655:907] audiosource = MicrophoneBuiltIn
2013-08-10 13:54:11.889 Recognizer[655:907] [NMSP_ERROR] check status Error: 696e6974 init -> line: 485
2013-08-10 13:54:11.979 Recognizer[655:907] Application windows are expected to have a root view controller at the end of application launch
2013-08-10 13:54:13.513 Recognizer[655:907] Recognizing type:'websearch' Language Code: 'en_US' using end-of-speech detection:2.
2013-08-10 13:54:14.517 Recognizer[655:907] Recording started.
2013-08-10 13:54:16.490 Recognizer[655:907] Recording finished.
2013-08-10 13:54:26.903 Recognizer[655:4103] [NMSP_ERROR] Connection timed out!
2013-08-10 13:54:27.167 Recognizer[655:907] Got error.
2013-08-10 13:54:27.170 Recognizer[655:907] Session id [(null)].
I have no clue what's going on here, and any help would be greatly appreciated.

If when you try to record it immediately says “Cancelled” and shows an error like “recorder is null” or “[NMSP_ERROR] check status Error: 696e6974 init -> line: 485″, this probably means either something is wrong with your SpeechKit keys, or the SpeechKit servers are down. Double check your keys, and/or try again later.
Reference: http://www.raywenderlich.com/60870/building-ios-app-like-siri

in my case the error was that i called the cancel: method on a nil SKRecognizer object.

Related

Apple iOS ARKit: "A sensor failed to deliver the required input" error and stops working

I am developing an application that uses both ARKit and hardware video decoder. As soon as the decoder start to decode, the following error message appears in console and prevent tracking from working properly.
Occasionally, this error do not show up and the app works normally. After some debugging, I found out this error only happens at the "beginning" (shortly after launching the app). Once it passes that point, it works fine for the rest of the time.
Does anyone know what the problem is or how to go around it?
2017-08-11 20:48:02.550228-0700 PortalMetal[4037:893878] [] <<<<
AVCaptureSession >>>> -[AVCaptureSession
_handleServerConnectionDiedNotification]: (0x1c0007eb0)(pthread:0x170387000) ServerConnectionDied 2017-08-11
20:48:02.564053-0700 PortalMetal[4037:893747] [Session] Session did
fail with error: Error Domain=com.apple.arkit.error Code=102 "Required
sensor failed." UserInfo={NSLocalizedFailureReason=A sensor failed to
deliver the required input., NSUnderlyingError=0x1c4c51280 {Error
Domain=AVFoundationErrorDomain Code=-11819 "Cannot Complete Action"
UserInfo={NSLocalizedDescription=Cannot Complete Action,
NSLocalizedRecoverySuggestion=Try again later.}},
NSLocalizedRecoverySuggestion=Make sure that the application has the
required privacy settings., NSLocalizedDescription=Required sensor
failed.}
Update
The solution is to do with compass calibration being set in the phone settings. Credit to this answer.
Go to Settings > Privacy > Location Services > System Services, and set Compass Calibration to ON.
How to prevent Crashing
Declare your config at the top of your class e.g:
var configuration = ARWorldTrackingConfiguration() and make sure you setup and add your config in the viewWillAppear method.
Then add this method to handle the error.
func session(_ session: ARSession, didFailWithError error: Error) {
// Present an error message to the user
print("Session failed. Changing worldAlignment property.")
print(error.localizedDescription)
if let arError = error as? ARError {
switch arError.errorCode {
case 102:
configuration.worldAlignment = .gravity
restartSessionWithoutDelete()
default:
restartSessionWithoutDelete()
}
}
}
It just handles the error that you've noticed.
Next, add this function to reset the session with a new config worldAlignment:
func restartSessionWithoutDelete() {
// Restart session with a different worldAlignment - prevents bug from crashing app
self.sceneView.session.pause()
self.sceneView.session.run(configuration, options: [
.resetTracking,
.removeExistingAnchors])
}
Hope it helps, and I also hope to find an actual fix to this apparent bug.
Setting worldAlignment to gravityAndHeading needs the location service to be enabled:
check if your device has location service turned on.
Check if Info.plist has set Privacy - Photo Library Additions Usage Description
If the compass orientation is crucial for your app, you should consider to guide the user to do turn the location service on and implement a fallback.

Scrubbing does not work on playing a network stream video vlcj

We are having the same issue that is descibed here https://trac.videolan.org/vlc/ticket/4888
When we try to scrubbing the video, it does not work, vlcj is buffering every time we scrubbing and we are getting the errors logs below
[163bdd44] core input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 101 ms)
[163bdd44] core input error: ES_OUT_RESET_PCR called
[2403dc04] core vout display error: Failed to set on top
[164a8284] http access error: error: HTTP/1.1 500 Object not found
[5:56]
[15c5f1d4] core input error: input control fifo overflow, trashing type=3
Does anyone know if using a convention of VLC Configuration we can fix it ?
Thanks
Francisco

AVAudioEngine with Today Extension

Hello I want to add the Speech framework to an iOS 10 Today Extension.
I try to use SpeakToMe sample https://developer.apple.com/library/content/samplecode/SpeakToMe/Introduction/Intro.html to record audio with AVAudioEngine.
But I get an exception when I try to start the audio engine
try audioEngine.start()
2016-10-04 22:21:24.658964 VoiceReco[4225:1230467] [aurioc] 1316: AUIOClient_StartIO failed (561145187)
2016-10-04 22:21:24.663743 VoiceReco[4225:1230467] [central] 54: ERROR: [0x1af158c40] >avae> AVAudioEngineGraph.mm:1175: Start: error 561145187
The sample code from apple works fine if I use the normal view controller without my extension. Does anyone know a workaround for this?
You can't record audio in an extension.
Check here

AudioQueueStart return -66681

When I use <AudioToolbox/AudioServices.h> to implement a recording function, sometimes there will be unsuccessful recording. The reason is AudioQueueStart returned value -66681. The document says:
The audio queue has encountered a problem and cannot start
I found documents but I have no idea about that.

iOS - AudioOutputUnitStop results in app freeze and warning

sometimes the execution of
AudioOutputUnitStop(inputUnit)
results in the app to be freezed for about 10/15 seconds and the following console message:
WARNING: [0x3b58918c] AURemoteIO.cpp:1225: Stop: AURemoteIO::Stop: error 0x10004003 calling TerminateOwnIOThread
Such code is handled by the Novocaine library and in particular it occurs in the [Novocaine pause] method which I invoke to stop the execution of the playback of an audio file (https://github.com/alexbw/novocaine/blob/master/Novocaine/Novocaine.m).
Any hint is really appreciated!
Thanks,
DAN

Resources