Last active
January 21, 2019 14:51
-
-
Save myrickchow32/c91062bc4ec45b769acb97d92929762f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| let speechVoices = AVSpeechSynthesisVoice.speechVoices() | |
| speechVoices.forEach { (voice) in | |
| print("**********************************") | |
| print("Voice identifier: \(voice.identifier)") | |
| print("Voice language: \(voice.language)") | |
| print("Voice name: \(voice.name)") | |
| print("Voice quality: \(voice.quality.rawValue)") // Compact: 1 ; Enhanced: 2 | |
| } | |
| /* | |
| Example output: | |
| ********************************** | |
| Voice identifier: com.apple.ttsbundle.Karen-compact | |
| Voice language: en-AU | |
| Voice name: Karen | |
| Voice quality: 1 <- Compact voice track | |
| ********************************** | |
| Voice identifier: com.apple.ttsbundle.Karen-premium | |
| Voice language: en-AU | |
| Voice name: Karen (Enhanced) | |
| Voice quality: 2 <- Enhanced voice track | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment