diff --git a/Xamarin.Essentials/TextToSpeech/TextToSpeech.android.cs b/Xamarin.Essentials/TextToSpeech/TextToSpeech.android.cs index e6df35c7..6258be3e 100644 --- a/Xamarin.Essentials/TextToSpeech/TextToSpeech.android.cs +++ b/Xamarin.Essentials/TextToSpeech/TextToSpeech.android.cs @@ -109,6 +109,8 @@ namespace Xamarin.Essentials if (tcsUtterances?.Task != null) await tcsUtterances.Task; + tcsUtterances = new TaskCompletionSource(); + if (cancelToken != null) { cancelToken.Register(() => @@ -150,7 +152,6 @@ namespace Xamarin.Essentials var parts = text.SplitSpeak(max); numExpectedUtterances = parts.Count; - tcsUtterances = new TaskCompletionSource(); var guid = Guid.NewGuid().ToString();