What’s new in AVFoundation

RSS for tag

Discuss the WWDC21 session What’s new in AVFoundation.

Posts under wwdc21-10146 tag

2 Posts

Post

Replies

Boosts

Views

Activity

AVSpeechSynthesisVoice.speechVoices() problem
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.
1
0
966
May ’22
AVCaptionRenderer
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
2
0
1.2k
Jan ’22
AVSpeechSynthesisVoice.speechVoices() problem
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.
Replies
1
Boosts
0
Views
966
Activity
May ’22
AVCaptionRenderer
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
Replies
2
Boosts
0
Views
1.2k
Activity
Jan ’22