Closed cfw011566 closed 4 years ago
Hi @cfw011566 Please make sure you have followed all voice instructions If problem still exist, please provide sample code and specify HERE SDK version you use.
I dump the voice at delegate function -voiceCatalog:didUpdateWithError:
sample code like following
extension MenuVoiceOptionViewController: NMAVoiceCatalogDelegate {
func voiceCatalog(_ voiceCatalog: NMAVoiceCatalog, didUpdate error: Error?) {
print("Did update \(error)")
let version = NMAApplicationContext.sdkVersion()
print("HERE SDK \(version)")
print("count = \(voiceCatalog.voicePackages.count)")
for (index, voice) in voiceCatalog.voicePackages.enumerated() {
print("\(index) -------")
print(voice)
}
LoadingIndicatorView.hide()
self.fetchVoicePackageInfo()
self.voiceTable.reloadData()
}
}
dump from Xcode
Did update Optional(Error Domain=NMAVoiceCatalog Code=1 "(null)") HERE SDK 3.15.2.92 count = 1 0 ------- <NMAVoicePackage: 0x283b83720; packageId = 206; name = "English (US)"; gender = 2; language = "English (US)"; languageCode = "en-US"; localizedLanguage = "English (US)"; isUpdateAvailable = 0; isInstalled = 1; downloadSize = -1.000; installationSize = 0.371; isRemovable = 0; quality = "(null)"; localizedGender = "(null)"; localizedQuality = "(null)"; localizedType = "(null)"; marcCode = "010"; version = "0.5.0.4043695813"; customAttributes = "(null)"; description = "English (US)">
Error with Code=1 (NMAVoiceCatalogErrorUnknown) is also returned for network related errors such as no connectivity.
Thanks for the fast response.
The same code on different project, i.e. different bundle ID, is fine and returns 81 voice packages.
Any hint or suggestion ?
Credentials(App_Id, App_Code, and licenseKey) are unique to your application bundle identifier. More about credentials here. Make sure NMAApplicationContext.setAppId does not return any error and is called before updateVoiceCatalog.
I do setAppId
in AppDelegate.swift and return value is 0.
let status = NMAApplicationContext.setAppId(hereAppID, appCode: hereAppCode, licenseKey: hereLicenseKey)
print("setAppId return \(status.rawValue)")
output setAppId return 0
The other functions like getting route and navigation work fine. Only voiceCatalog not working.
This issue was fixed by asking support team's help.
What was the root cause of the issue if it is not a secret? In case other users run into the same one we would recommend this solution. Thanks!
It was not coding issue. The support team say that the voice was not enabled for my AppID. They enabled it then problem was solved.
Hi, I am using voiceCatalog to download different voice for navigation but got only one voice package whose id 206. I have print the count of voice packages and dumped the voice data in below:
voicePackages count = 1 <NMAVoicePackage: 0x2804f6c80; packageId = 206; name = "English (US)"; gender = 2; language = "English (US)"; languageCode = "en-US"; localizedLanguage = "English (US)"; isUpdateAvailable = 0; isInstalled = 1; downloadSize = -1.000; installationSize = 0.371; isRemovable = 0; quality = "(null)"; localizedGender = "(null)"; localizedQuality = "(null)"; localizedType = "(null)"; marcCode = "010"; version = "0.5.0.4043695813"; customAttributes = "(null)"; description = "English (US)">
Any hint? or suggestion?