Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: changed error.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 26, 2023
1 parent f1c2349 commit f1dcd97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion RotationSolver/SpeechHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ internal static class SpeechHelper
{
static SpeechSynthesizer _speech;
public static string[] VoiceNames { get; private set; }
static bool _errored;
internal static void Speak(string text)
{
try
Expand All @@ -23,7 +24,11 @@ internal static void Speak(string text)
}
catch(Exception ex)
{
PluginLog.Error(ex, "Speech Exception");
if (!_errored)
{
_errored = true;
PluginLog.Error(ex, "Speech Exception");
}
}
_speech.SpeakAsyncCancelAll();
_speech.SpeakAsync(text);
Expand Down

0 comments on commit f1dcd97

Please sign in to comment.