Hi,
I'm using the Speech library to get speech recognition from AVAudioRecorder and store the text to database. However, most of the time it is not accurate. Heck, even "test 123" gave me entirely different words (eg. "this one till three", "this one ticket", etc). The funny thing was, it was correct a few times when it was still progressing, but then it changed into the wrong final words. So, how do I increase the accuracy of it?
This is what I got as the settings:
try audioSession.setCategory(.record, mode: .spokenAudio, options: .duckOthers)
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
let recorderSettings: [String:Any] = [
AVFormatIDKey: NSNumber(value: kAudioFormatAppleLossless),
AVSampleRateKey: 44100.0,
AVNumberOfChannelsKey: 1,
AVEncoderAudioQualityKey: AVAudioQuality.max.rawValue
]
Is there anything else to improve? Thank you.
Post
Replies
Boosts
Views
Activity
I have a custom UINavigationController like so:
class CustomNavigationController: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
delegate = self
setupDefaultAppearance()
}
private func setupDefaultAppearance() {
UINavigationBar.appearance().tintColor = R.color.textBlack()
let titleAttributes: [NSAttributedString.Key: Any] = [ .font: R.font.interMedium(size: 18)! ]
UINavigationBar.appearance().titleTextAttributes = titleAttributes
// Hide the title in bar button items
let backButtonAttributes: [NSAttributedString.Key: Any] = [ .font: UIFont(name: "Helvetica-Bold", size: 0.1)!,
.foregroundColor: UIColor.clear]
UIBarButtonItem.appearance().setTitleTextAttributes(backButtonAttributes, for: .normal)
UIBarButtonItem.appearance().setTitleTextAttributes(backButtonAttributes, for: .highlighted)
}
}
However, the code to hide the title in bar button items screwed IQKeyboardManager. The Done button (or any button on the toolbar) in the keyboard or any picker view is gone now because of this. So, I believe I should not use the UIBarButtonItem.appearance() static func. How do I remove the title of the Navigation Controller's back button without making the bug in the keyboard and picker views?
Thanks.
Hi,
I'm using XCode 13.4.1 and the team is suddenly gone. I have two accounts on my XCode. One is my personal account, the other one is my office account. The one missing is the office account. The last time I checked, it was working fine then I downloaded and opened the AVCam project and it's gone. I'm sure it is still in the Keychain. What should I do?
Thanks.
Hi, I'm implementing Apple Sign In in my project and when I tried running it in iOS 11 simulator (to check whether the sign in button and all the AuthenticationServices functionalities are gone), it crashed. It said this in the console:
dyld: Library not loaded: /System/Library/Frameworks/AuthenticationServices.framework/AuthenticationServices
Referenced from: /Users/bawenang/Library/Developer/CoreSimulator/Devices/D75148B2-C894-4230-A550-D865FAD1B70C/data/Containers/Bundle/Application/7C3BA89A-C072-467A-821D-01467596757E/Kolibree.app/Kolibree
Reason: no suitable image found. Did find:
/System/Library/Frameworks/AuthenticationServices.framework/AuthenticationServices: mach-o, but not built for iOS simulator
If it's iOS 13 or 14, it worked fine though (except for the other bug in simulator that I've mentioned here). - https://developer.apple.com/forums/thread/676571?answerId=667630022#667630022 How do I fix this?
BTW, I'm using XCode 12.
Hi, I'm currently trying to develop Sign In with Apple feature. I'm testing it on simulators because I don't have any device that has iOS 13 in it (my phone is only an iPhone 6). And when I tried the Apple Sign In button, it stuck on the screen where we need to input the password. The activity indicator is always turning non stop and it didn't return either success or error. I'm pretty sure the password I inputted is correct.
This is what I've done so far:
Implement AuthenticationServices
Set the ASAuthorizationControllerDelegate to handle return value from Apple
Thanks.