Fixed a panic in SpeechDispatcher.voices()

This commit is contained in:
Esther Alter 2023-10-25 11:59:13 -04:00
parent 5c528f1d8e
commit a0c6cbaf6a
1 changed files with 1 additions and 0 deletions

View File

@ -188,6 +188,7 @@ impl Backend for SpeechDispatcher {
.0
.list_synthesis_voices()?
.iter()
.filter(|v| LanguageTag::parse(v.language.clone()).is_ok())
.map(|v| Voice {
id: v.name.clone(),
name: v.name.clone(),