What’s new in AVFoundation

RSS for tag

Discuss the WWDC21 session What’s new in AVFoundation.

View Session

Posts under wwdc21-10146 tag

2 Posts
Sort by:
Post not yet marked as solved
0 Replies
83 Views
I've used AVSpeechSynthesisVoice.speechVoices() to acquire the list of voices available on a device. I've then extracted the voices available in my target language by collecting only those whose language matches AVSpeechSynthesisVoice.currentLanguageCode(). My code showed Fred, Samantha, Victoria, and Alex. All voices worked right in my app's voice example except Alex, which was replaced by Samantha. At this point on the device, Settings -> Accessibility -> Spoken Content -> Voices -> English showed Fred, Samantha, and Victoria as available. I have since downloaded Alex. Everything works the same except the Alex voice is now used successfully. So... Why was Alex being reported as available when it was not, and how can I detect that in my code so I don't indicate to a user that a voice is available when it is not? Device is iPhone 12 running iOS 15.4.1; development system is MacBook Pro running MacOS 12.3.1 and Xcode 13.3.1.
Posted
by
mlw
Post not yet marked as solved
2 Replies
303 Views
Has anybody successfully used AVCaptionRenderer for anything? I am attempting to preview what AVMutableCaptions will look like by using AVCaptionRenderer. I am able to render an image with the caption (very small in the lower left corner), but changes to text properties are not having any effect. I have tried the following: setBackgroundColor - No effect. setFontStyle - No Effect. textAlignment - No effect. I'm beginning to think that AVCaptionRender isn't what I think it's for. The documentation is sparse, the mention in the WWDC video is brief, and I can't find any sample code. The video mentions reaching out here for help adopting these APIs, so here I am. WWDC Video Mention: https://developer.apple.com/videos/play/wwdc2021-10146/?time=943
Posted
by