Post

Replies

Boosts

Views

Activity

Reply to Need help requesting authorization to use personal voice in tts app
Here's how I'm doing it. So far so good. -(void) MeTalkTPretty { if (@available(iOS 17.0, *)) { [AVSpeechSynthesizer requestPersonalVoiceAuthorizationWithCompletionHandler:^(AVSpeechSynthesisPersonalVoiceAuthorizationStatus status) { NSLog(@"AVSpeechSynthesis requestPersonalVoiceWCH returned %lu", (unsigned long)status); if (status == AVSpeechSynthesisPersonalVoiceAuthorizationStatusAuthorized) { NSLog(@"Yippee! I can use personal voice"); // set this in case none of the voices are personal voice voiceToUse = [AVSpeechSynthesisVoice voiceWithLanguage:AVSpeechSynthesisVoice.currentLanguageCode]; for (AVSpeechSynthesisVoice *thisVoice in [AVSpeechSynthesisVoice speechVoices]) { if (thisVoice.voiceTraits == AVSpeechSynthesisVoiceTraitIsPersonalVoice) { voiceToUse = [AVSpeechSynthesisVoice voiceWithIdentifier:thisVoice.identifier]; NSLog(@"WINNER is personal voice %@ ", voiceToUse); } } } else { NSLog(@"darn, I can't use personal voice even though on iOS17"); voiceToUse = [AVSpeechSynthesisVoice voiceWithLanguage:AVSpeechSynthesisVoice.currentLanguageCode]; } }]; } else { NSLog(@"Darn, I can't use personal voice because this device isn't running ios17"); voiceToUse = [AVSpeechSynthesisVoice voiceWithLanguage:AVSpeechSynthesisVoice.currentLanguageCode]; } }
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’23
Reply to crash in iOS 17.2 of _UIPhysicalButtonInteraction _registerWithArbiterSkippingEvaluationAndObservation]
I still can't find any documentation on this, but have figured out it's caused by adding an AVPlayerViewController to an AirPlay screen. if ([[UIScreen screens] count] > 1){ externalScreen = [[UIScreen screens] objectAtIndex:1]; externalWindow = [[UIWindow alloc] initWithFrame:[externalScreen bounds]]; externalWindow.screen = externalScreen; externalView = [[UIView alloc]initWithFrame:[externalScreen bounds]]; movieAVPlayer = [[AVPlayerViewController alloc] init]; [externalView addSubview:movieAVPlayer.view]; [externalView bringSubviewToFront:movieAVPlayer.view]; [externalWindow addSubview:externalView]; } I've tried changing all of these before adding it to the view, but I always get the above crash when adding. movieAVPlayer.showsPlaybackControls = YES; movieAVPlayer.player.allowsExternalPlayback = YES; movieAVPlayer.player.usesExternalPlaybackWhileExternalScreenIsActive = YES; Anyone have any ideas of what else to try?
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’23