---
title: OnError
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/windows/speech/phraserecognitionsystem/onerror
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/windows/speech/phraserecognitionsystem/onerror.md
last_updated: 2026-10-07
generated_at: 2026-11-11T12:59:00.891Z
locale: en-us
---

# OnError

> Event that gets invoked when phrase recognition system encounters an error.

## Definition

* **Type:** Event
* **Namespace:** [UnityEngine.Windows.Speech](/engine/7000.0/script-reference/unityengine/windows/speech.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static event PhraseRecognitionSystem.ErrorDelegate OnError
```

### Remarks

If any errors occurred due to issues the user can fix (e.g. the microphone being unavailable), you should tell the user to correct the issue. In this example, you should show a message asking the user to reconnect the microphone and then attempt to restart the phrase recognition system.
