Added multi-platform speech of cchars
This commit is contained in:
parent
bcec11c238
commit
eabb06d90f
1 changed files with 2 additions and 2 deletions
|
@ -378,7 +378,7 @@
|
||||||
if (firstRender)
|
if (firstRender)
|
||||||
{
|
{
|
||||||
// Gets chinese voice on windows or iphone.
|
// Gets chinese voice on windows or iphone.
|
||||||
this.SpeechVoice = ((IEnumerable<SpeechSynthesisVoice>)(await this.SpeechSynthesis.GetVoicesAsync())).FirstOrDefault(v => v.Name.Contains("Yaoyao") || v.Name.Contains("Ting-Ting"));
|
this.SpeechVoice = ((IEnumerable<SpeechSynthesisVoice>)(await this.SpeechSynthesis.GetVoicesAsync())).FirstOrDefault(v => v.Name.Contains("Yaoyao") || v.Name.Contains("Ting-Ting") || v.Name.ToLower().Contains("cn"));
|
||||||
this.StateHasChanged();
|
this.StateHasChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -387,7 +387,7 @@
|
||||||
{
|
{
|
||||||
if (SpeechVoice == null)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue