Post

Replies

Boosts

Views

Activity

Reply to AVSpeechSynthesizer Leaking Like a Sieve
@And0Austria Yup just noticed the same thing...TTS will crash with the AddressSanitizer turned on iOS17. They are freeing a wild pointer according to the AddressSanitizer. Looks like every app that uses AVSpeechSynthesizer has undefined behavior. I've been working on a feature for my app for a couple of months that uses this API and now after updating to iOS 17 it abruptly stops and random points in an utterance. Maybe it'll work. Maybe it won't. I reported FB13188396 and made a thread about the issue here: https://developer.apple.com/forums/thread/737685 Kind of depressing that this was known two months ago and still made it into the iOS 17 release.
Sep ’23
Reply to AVSpeechSynthesizer Broken on iOS 17
Well oddly after changing the voice it works but for some reason when switching back to the Daniel enhanced voice it causes -speechSynthesizer:didFinishSpeechUtterance: to be called prematurely at the exact same location of the speech string every time in my app. In the event of some sort of error where speech synthesis is supposed to stop prematurely I'd expect -speechSynthesizer:didCancelSpeechUtterance: to be called not -speechSynthesizer:didFinishSpeechUtterance: (though I think a new -speechSynthesizer:didFailWithError: would be a useful addition since -speechSynthesizer:didCancelSpeechUtterance: I believe is called when I programmatically stop an utterance). Not sure why the synthesizer is prematurely calling -speechSynthesizer:didFinishSpeechUtterance:. I set a breakpoint in -speechSynthesizer:didFinishSpeechUtterance: but the call stack doesn't include debug symbols for the system methods that are called before. A bunch of methods _lldb_nanamed_symbol_1111 are listed before -speechSynthesizer:didFinishSpeechUtterance so there's not a whole lot for me to go on. Anyone else run into this?
Topic: Media Technologies SubTopic: Audio Tags:
Sep ’23
Reply to AVSpeechSynthesizer Broken on iOS 17
Part of my troubleshooting steps had me write the utterance to an AVAudioFile instead of just speaking it. This log seems like it could be related: Input data proc returned inconsistent 512 packets for 2,048 bytes; at 2 bytes per packet, that is actually 1,024 packets -- This really is a big setback for my development (I'm sure lots of other apps are affected by this too). Workaround I can think of are: Splitting the string into separate utterances or 2) Write the utterance to a file and play the audio file. Both options require me to restructure quite a bit of code and makes things much harder to maintain. No symbols for system methods...making it hard for devs to figure out workarounds. Anyone know if there is a method I can swizzle to patch this?
Topic: Media Technologies SubTopic: Audio Tags:
Sep ’23
Reply to 'UIStoryboard' and 'UIStoryboardSegue' was deprecated in visionOS 1.0 - Why?
Seems pretty absurd. Why bother implementing and deprecating something before the platform is even released? Many apps are complex and have taken years to write and their entire navigation structure is tied to one or more storyboards. Tearing the entire thing down isn't something you're going to do in a week (unless the app is very simple). So they want us to: Ship our storyboard based app on visionOS using deprecated "walking dead on arrival" API. They break the functionality and tell you to use SwiftUI. You now have a non-working app. Either rewrite the entire app with a new UI framework that has a different app lifecycle (can reuse very little code) or pull your live app from the store. No thanks. Instead of just letting developers choose which UI framework works best for them they have decided to force feed it. I mean if they want visionOS to be SwiftUI only like watchOS they should just enforce that policy from the start instead of trying to paint you into a corner. Feels like they are forcing SwiftUI because they're worried developers will choose UIKit if given the option. If SwiftUI is better, developers will use it so why force it? Oh yeah, interface builder products are being deprecated as well. I already miss the good old days where you could design custom table view cells in Interface Builder in like three seconds. And you didn't even have to wait for a preview to load. Even making the most basic custom table view cell now with the "content configuration" API is a pretty awful way to waste 30-45 minutes of your life.
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’23
Reply to How To Set Number Of Lines in UIButtonConfiguration
Being able to enforce numberOfLines would be desirable. It seems like a pretty common need to enforce a button to fit on a single line and I would think having a button wrap multiline would be more uncommon. In my case a button with a configuration initially displays with 1 line, but after toggling the Dynamic type setting to a smaller value, then increasing it back to the original value causes the button to start character wrapping even though there is plenty of room to fit all text on one line. It seems that UIButton (with a button configuration) can't really properly respond to the -sizeToFit method. Calling -sizeToFit just constrains the button to the current width and increases the height which is the opposite of what I often want.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’23
Reply to AVSpeechSynthesizer is broken on iOS 17 in Xcode 15
Check out these related threads: https://developer.apple.com/forums/thread/730639?answerId=765237022#765237022 https://developer.apple.com/forums/thread/737685 -- Appears every app using AVSpeechSynthesizer has undefined behavior on iOS 17. This is blocking me from pushing an update I've been working on for months.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to AVSpeechSynthesizer not playing words objective - c ios 16
Are you strongly retaining the synthesizer? You should be holding the synthesizer in a property at least until it finishes speaking the utterance. Also there are some problems with AVSpeechSynthesizer which may or may not be related to your issue: https://developer.apple.com/forums/thread/737685 https://developer.apple.com/forums/thread/730639
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to AVSpeechSynthesizer Leaking Like a Sieve
@And0Austria Yup just noticed the same thing...TTS will crash with the AddressSanitizer turned on iOS17. They are freeing a wild pointer according to the AddressSanitizer. Looks like every app that uses AVSpeechSynthesizer has undefined behavior. I've been working on a feature for my app for a couple of months that uses this API and now after updating to iOS 17 it abruptly stops and random points in an utterance. Maybe it'll work. Maybe it won't. I reported FB13188396 and made a thread about the issue here: https://developer.apple.com/forums/thread/737685 Kind of depressing that this was known two months ago and still made it into the iOS 17 release.
Replies
Boosts
Views
Activity
Sep ’23
Reply to AVSpeechSynthesizer Broken on iOS 17
Well oddly after changing the voice it works but for some reason when switching back to the Daniel enhanced voice it causes -speechSynthesizer:didFinishSpeechUtterance: to be called prematurely at the exact same location of the speech string every time in my app. In the event of some sort of error where speech synthesis is supposed to stop prematurely I'd expect -speechSynthesizer:didCancelSpeechUtterance: to be called not -speechSynthesizer:didFinishSpeechUtterance: (though I think a new -speechSynthesizer:didFailWithError: would be a useful addition since -speechSynthesizer:didCancelSpeechUtterance: I believe is called when I programmatically stop an utterance). Not sure why the synthesizer is prematurely calling -speechSynthesizer:didFinishSpeechUtterance:. I set a breakpoint in -speechSynthesizer:didFinishSpeechUtterance: but the call stack doesn't include debug symbols for the system methods that are called before. A bunch of methods _lldb_nanamed_symbol_1111 are listed before -speechSynthesizer:didFinishSpeechUtterance so there's not a whole lot for me to go on. Anyone else run into this?
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to AVSpeechSynthesizer Broken on iOS 17
Part of my troubleshooting steps had me write the utterance to an AVAudioFile instead of just speaking it. This log seems like it could be related: Input data proc returned inconsistent 512 packets for 2,048 bytes; at 2 bytes per packet, that is actually 1,024 packets -- This really is a big setback for my development (I'm sure lots of other apps are affected by this too). Workaround I can think of are: Splitting the string into separate utterances or 2) Write the utterance to a file and play the audio file. Both options require me to restructure quite a bit of code and makes things much harder to maintain. No symbols for system methods...making it hard for devs to figure out workarounds. Anyone know if there is a method I can swizzle to patch this?
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to 'UIStoryboard' and 'UIStoryboardSegue' was deprecated in visionOS 1.0 - Why?
Seems pretty absurd. Why bother implementing and deprecating something before the platform is even released? Many apps are complex and have taken years to write and their entire navigation structure is tied to one or more storyboards. Tearing the entire thing down isn't something you're going to do in a week (unless the app is very simple). So they want us to: Ship our storyboard based app on visionOS using deprecated "walking dead on arrival" API. They break the functionality and tell you to use SwiftUI. You now have a non-working app. Either rewrite the entire app with a new UI framework that has a different app lifecycle (can reuse very little code) or pull your live app from the store. No thanks. Instead of just letting developers choose which UI framework works best for them they have decided to force feed it. I mean if they want visionOS to be SwiftUI only like watchOS they should just enforce that policy from the start instead of trying to paint you into a corner. Feels like they are forcing SwiftUI because they're worried developers will choose UIKit if given the option. If SwiftUI is better, developers will use it so why force it? Oh yeah, interface builder products are being deprecated as well. I already miss the good old days where you could design custom table view cells in Interface Builder in like three seconds. And you didn't even have to wait for a preview to load. Even making the most basic custom table view cell now with the "content configuration" API is a pretty awful way to waste 30-45 minutes of your life.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to How To Set Number Of Lines in UIButtonConfiguration
Being able to enforce numberOfLines would be desirable. It seems like a pretty common need to enforce a button to fit on a single line and I would think having a button wrap multiline would be more uncommon. In my case a button with a configuration initially displays with 1 line, but after toggling the Dynamic type setting to a smaller value, then increasing it back to the original value causes the button to start character wrapping even though there is plenty of room to fit all text on one line. It seems that UIButton (with a button configuration) can't really properly respond to the -sizeToFit method. Calling -sizeToFit just constrains the button to the current width and increases the height which is the opposite of what I often want.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jul ’23