Created
January 19, 2024 10:30
-
-
Save thomaswitt/55d75ff18598b56e30f9f379686c44b1 to your computer and use it in GitHub Desktop.
Enable "Personal Voice" in a terminal to use 'say' with your own voice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Compile via: | |
gcc -x objective-c -framework AVFoundation -framework Foundation personal-voice.c -o personal-voice | |
Run it in a terminal (make sure you authorized apps to use your personal voice) | |
*/ | |
#import <AVFoundation/AVFoundation.h> | |
int main(){ | |
[AVSpeechSynthesizer requestPersonalVoiceAuthorizationWithCompletionHandler:^(AVSpeechSynthesisPersonalVoiceAuthorizationStatus status){ | |
// authorization popup should be visible now | |
}]; | |
[[NSRunLoop currentRunLoop] run]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment