{"id":18839780,"url":"https://github.com/maximbilan/ios-dragon-mobile-sdk-example","last_synced_at":"2025-07-25T08:07:02.001Z","repository":{"id":27275549,"uuid":"30748756","full_name":"maximbilan/iOS-Dragon-Mobile-SDK-Example","owner":"maximbilan","description":"Nuance Dragon Mobile SDK and ObjectAL","archived":false,"fork":false,"pushed_at":"2018-09-22T07:28:53.000Z","size":2037,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T20:44:28.750Z","etag":null,"topics":["avaudioplayer","dragon","ios","nuance-sdk","objectal","objective-c","recognition","sdk"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maximbilan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.pdf","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-13T09:09:05.000Z","updated_at":"2023-02-18T20:18:16.000Z","dependencies_parsed_at":"2022-08-31T19:41:11.887Z","dependency_job_id":null,"html_url":"https://github.com/maximbilan/iOS-Dragon-Mobile-SDK-Example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximbilan%2FiOS-Dragon-Mobile-SDK-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximbilan%2FiOS-Dragon-Mobile-SDK-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximbilan%2FiOS-Dragon-Mobile-SDK-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximbilan%2FiOS-Dragon-Mobile-SDK-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximbilan","download_url":"https://codeload.github.com/maximbilan/iOS-Dragon-Mobile-SDK-Example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837285,"owners_count":21169374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avaudioplayer","dragon","ios","nuance-sdk","objectal","objective-c","recognition","sdk"],"created_at":"2024-11-08T02:44:02.809Z","updated_at":"2025-04-14T07:03:36.683Z","avatar_url":"https://github.com/maximbilan.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nuance Dragon Mobile SDK and ObjectAL\n\nIn \u003ci\u003eiOS 8\u003c/i\u003e I’m faced with a problem with working \u003ca href=\"http://dragonmobile.nuancemobiledeveloper.com/public/index.php?task=prodDev#download\"\u003eNuance Dragon Mobile SDK\u003c/a\u003e and \u003ca href=\"https://github.com/kstenerud/ObjectAL-for-iPhone\"\u003eObjectAL\u003c/a\u003e together. When I set up \u003ca href=\"http://dragonmobile.nuancemobiledeveloper.com/public/index.php?task=prodDev#download\"\u003eNuance SDK\u003c/a\u003e, and if I already have used the \u003ca href=\"https://github.com/kstenerud/ObjectAL-for-iPhone\"\u003eObjectAL\u003c/a\u003e before, I have got the error in the log:\n\n\u003cpre\u003e\nERROR:     [0x3c1779dc] AVAudioSession.mm:646: -[AVAudioSession setActive:withOptions:error:]: \nDeactivating an audio session that has running I/O. All I/O should be stopped or paused prior\nto deactivating the audio session.\n\u003c/pre\u003e\n\nAnd I can’t play or record an audio, because session was deactivated in the application.\n\nWhat does it mean? It means that \u003ca href=\"http://dragonmobile.nuancemobiledeveloper.com/public/index.php?task=prodDev#download\"\u003eNuance SDK\u003c/a\u003e tries to set up the active session, and you have some sessions in the \u003ca href=\"https://github.com/kstenerud/ObjectAL-for-iPhone\"\u003eObjectAL\u003c/a\u003e.\n\n\u003ci\u003eiOS 8\u003c/i\u003e provides some information about this. In \u003ci\u003eAVAudioSession\u003c/i\u003e header:\n\n\u003cpre\u003e\n/* Set the session active or inactive. Note that activating an audio session is a synchronous\n(blocking) operation. Therefore, we recommend that applications not activate their session from\na thread where a long blocking operation will be problematic.\nNote that this method will throw an exception in apps linked on or after iOS 8 if the session is\nset inactive while it has running or paused I/O (e.g. audio queues, players, recorders,\nconverters, remote I/Os, etc.).\n*/\n\u003c/pre\u003e\n\nAnd unfortunately \u003ca href=\"http://dragonmobile.nuancemobiledeveloper.com/public/index.php?task=prodDev#download\"\u003eNuance SDK\u003c/a\u003e is private API. And we don’t have access to the source code ☹\n\nYou can found some post in the official forum of this SDK. And there’re no any solutions. And the Nuance team did not particularly hurry to solve this issue ☹\n\nBut, it’s not all bad. Because we have \u003ca href=\"https://github.com/kstenerud/ObjectAL-for-iPhone\"\u003eObjectAL\u003c/a\u003e with opened source code ☺ And I can suggest the solution, maybe it’s not really good solution, but it works. Before using the \u003ca href=\"http://dragonmobile.nuancemobiledeveloper.com/public/index.php?task=prodDev#download\"\u003eNuance SDK\u003c/a\u003e you remove the \u003ca href=\"https://github.com/kstenerud/ObjectAL-for-iPhone\"\u003eObjectAL\u003c/a\u003e from memory, wait for deallocating framework, and will set up the \u003ca href=\"http://dragonmobile.nuancemobiledeveloper.com/public/index.php?task=prodDev#download\"\u003eNuance SDK\u003c/a\u003e after that. During the recognition you should not use \u003ca href=\"https://github.com/kstenerud/ObjectAL-for-iPhone\"\u003eObjectAL\u003c/a\u003e, because it’s will deactivate the audio session, but you can use for example \u003ci\u003eAVAudioPlayer\u003c/i\u003e.\n\nFor stop the \u003ca href=\"https://github.com/kstenerud/ObjectAL-for-iPhone\"\u003eObjectAL\u003c/a\u003e you should call the next:\n\n\u003cpre\u003e\n[[OALSimpleAudio sharedInstance] stopEverything];\n[OALSimpleAudio purgeSharedInstance];\n\u003c/pre\u003e\n\nIf you play some audios during the recognition, you should no forgot to stop the playing audio in the \u003ci\u003edidFinishWithResults\u003c/i\u003e and \u003ci\u003edidFinishWithError\u003c/i\u003e methods, for example for \u003ci\u003eAVAudioPlayer\u003c/i\u003e:\n\n\u003cpre\u003e\n- (void)recognizer:(SKRecognizer *)recognizer didFinishWithResults:(SKRecognition *)results\n{\n    if (audioPlayer) {\n        [audioPlayer stop];\n    }\n\n    ...\n}\n\n- (void)recognizer:(SKRecognizer *)recognizer didFinishWithError:(NSError *)error\n        suggestion:(NSString *)suggestion\n{\n    if (audioPlayer) {\n        [audioPlayer stop];\n    }\n\n    ...\n}\n\u003c/pre\u003e\n\nYou can check and try this in current repository.\u003cbr\u003e\nIt’s modified sample from \u003ca href=\"http://dragonmobile.nuancemobiledeveloper.com/public/index.php?task=prodDev#download\"\u003eNuance SDK\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximbilan%2Fios-dragon-mobile-sdk-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximbilan%2Fios-dragon-mobile-sdk-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximbilan%2Fios-dragon-mobile-sdk-example/lists"}