mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-17 13:09:37 +00:00
add condition for macOS 11 and greater for default backend
This commit is contained in:
parent
f78aed211f
commit
f7297e18fd
|
@ -230,7 +230,8 @@ impl TTS {
|
|||
let version = version[1];
|
||||
let version_parts: Vec<&str> = version.split(".").collect();
|
||||
let minor_version: i8 = version_parts[1].parse().unwrap();
|
||||
if minor_version >= 14 {
|
||||
let major_version: i8 = version_parts[0].parse().unwrap();
|
||||
if minor_version >= 14 || major_version >= 11 {
|
||||
TTS::new(Backends::AvFoundation)
|
||||
} else {
|
||||
TTS::new(Backends::AppKit)
|
||||
|
|
Loading…
Reference in New Issue
Block a user