1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-11-17 12:19:37 +00:00

Account for macOS 11.

This commit is contained in:
Nolan Darilek 2020-11-25 10:13:17 -06:00
parent f4952ad132
commit 0bdf0fcfd3

View File

@ -225,8 +225,9 @@ impl TTS {
let version: Vec<&str> = str.split(" ").collect();
let version = version[1];
let version_parts: Vec<&str> = version.split(".").collect();
let major_version: i8 = version_parts[0].parse().unwrap();
let minor_version: i8 = version_parts[1].parse().unwrap();
if minor_version >= 14 {
if major_version >= 11 || minor_version >= 14 {
TTS::new(Backends::AvFoundation)
} else {
TTS::new(Backends::AppKit)