Post

Replies

Boosts

Views

Activity

SFSpeechRecognizer on MacOS - crash
I'm debuggin a macOS application that uses SFSpeechRecognizer to translate a video or audio file into a text file. I think that I'm doing something wrong when I call SFSpeechRecognizer. Here is the code:      guard let myRecognizer = SFSpeechRecognizer() else {       // A recognizer is not supported for the current locale       print("Recognizer not supported for current locale")       self.titleText = "Recognizer not supported for current locale"       return     }           if !myRecognizer.isAvailable {       // The recognizer is not available right now       print("Recognizer is not available right now")       self.titleText = "Recognizer is not available right now"       return     }               let request = SFSpeechURLRecognitionRequest(url: url)     myRecognizer.recognitionTask(with: request) { (result, error) in And this is the relevant stack trace. Application Specific Backtrace 0: 0 CoreFoundation 0x00000001b5e9d148 __exceptionPreprocess + 240 1 libobjc.A.dylib 0x00000001b5be7e04 objc_exception_throw + 60 2 AVFCore 0x00000001c851701c -[AVAssetReaderAudioMixOutput initWithAudioTracks:audioSettings:] + 984 3 AVFCore 0x00000001c8516c28 +[AVAssetReaderAudioMixOutput assetReaderAudioMixOutputWithAudioTracks:audioSettings:] + 52 4 Speech 0x00000001e46f1348 __151-[SFSpeechURLRecognitionRequest _handlePreRecordedAudioWithAsset:audioTracks:narrowband:addSpeechDataBlock:stopSpeechBlock:cancelSpeechWithErrorBlock:]_block_invoke.227 + 380 5 Speech 0x00000001e46f1130 __151-[SFSpeechURLRecognitionRequest _handlePreRecordedAudioWithAsset:audioTracks:narrowband:addSpeechDataBlock:stopSpeechBlock:cancelSpeechWithErrorBlock:]_block_invoke + 212 6 libdispatch.dylib 0x00000001b5b8a5f0 _dispatch_call_block_and_release + 32 7 libdispatch.dylib 0x00000001b5b8c1b4 _dispatch_client_callout + 20 8 libdispatch.dylib 0x00000001b5b8f2c8 _dispatch_queue_override_invoke + 784 9 libdispatch.dylib 0x00000001b5b9d8e8 _dispatch_root_queue_drain + 396 10 libdispatch.dylib 0x00000001b5b9e104 _dispatch_worker_thread2 + 164 11 libsystem_pthread.dylib 0x00000001b5d4c324 _pthread_wqthread + 228 12 libsystem_pthread.dylib 0x00000001b5d4b080 start_wqthread + 8 Full ips file attached. Thanks for taking a look :) Speech+Recognizer+2-2022-09-16-160824.txt
2
0
636
Sep ’22
App Store Connect Calculate Character Length for Thai
I'm working with the app store connect api. I'd like to update the keywords for an appStoreVersionLocalization. I'm getting the following error code: ENTITY_ERROR.ATTRIBUTE.INVALID.TOO_LONG And I've tried limiting the length of the keywords using: let shortenedKeywords = String(keywords.prefix(100)) But I'm still running into the mentioned error. The following string is valid: ตัวแก้ไข xliff, การแปลเป็นภาษาท้องถิ่น, เครื่องมือ xliff, xcode, การแปล xliff, xcloc, การแปลงข้อความ and it returns a character count of 91. If I do something like:      let shortenedKeywords = String(keywords.prefix(80)) The error goes away. Mostly hoping to understand why/how the character limit is calculated for Thai and if it's somehow different. Thanks! Full error included below: String data is: {  "errors" : [ {   "id" : "d4813683-949d-4a62-b4d2-7aac248add3c",   "status" : "409",   "code" : "ENTITY_ERROR.ATTRIBUTE.INVALID.TOO_LONG",   "title" : "An attribute value is too long.",   "detail" : "Keywords for Thai cannot be longer than 100 characters.",   "source" : {    "pointer" : "/data/attributes/keywords"   }  } ] } This is an example request: curl -X "PATCH" "https://api.appstoreconnect.apple.com/v1/appStoreVersionLocalizations/{id}" \ -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json; charset=utf-8' \ -d $'{ "data": { "type": "appStoreVersionLocalizations", "attributes": { "keywords": "ตัวแก้ไข xliff, การแปลเป็นภาษาท้องถิ่น, เครื่องมือ xliff, xcode, การแปล xliff, xcloc, การแปลงข้อความ xliff" }, "id": "a4f0ba21-a8ea-4d6b-a162-bf34f36268cc" } }'
1
0
572
May ’22