diff --git a/CCharLearn/Pages/Learn.razor b/CCharLearn/Pages/Learn.razor index fdf9354..a180e2b 100644 --- a/CCharLearn/Pages/Learn.razor +++ b/CCharLearn/Pages/Learn.razor @@ -378,7 +378,7 @@ if (firstRender) { // Gets chinese voice on windows or iphone. - this.SpeechVoice = ((IEnumerable)(await this.SpeechSynthesis.GetVoicesAsync())).FirstOrDefault(v => v.Name.Contains("Yaoyao") || v.Name.Contains("Ting-Ting")); + this.SpeechVoice = ((IEnumerable)(await this.SpeechSynthesis.GetVoicesAsync())).FirstOrDefault(v => v.Name.Contains("Yaoyao") || v.Name.Contains("Ting-Ting") || v.Name.ToLower().Contains("cn")); this.StateHasChanged(); } } @@ -387,7 +387,7 @@ { if (SpeechVoice == null) { - Snackbar.Add("Couldn't play sound", Severity.Error); + Snackbar.Add("Couldn't play sound.\nLikely reason: Chinese speech not installed", Severity.Error); return; }