---
title: GrammarRecognizer
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/grammarrecognizer/ctor
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/windows/speech/grammarrecognizer/ctor.md
last_updated: 2026-10-07
generated_at: 2026-11-12T08:30:20.586Z
locale: en-us
---

# GrammarRecognizer

> Creates a grammar recognizer using specified file path and minimum confidence.

## Definition

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

## GrammarRecognizer(string)

Creates a grammar recognizer using specified file path and minimum confidence.

```csharp
public GrammarRecognizer(string grammarFilePath)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Path of the grammar file.

### Remarks

Note: only one grammar recognizer can be created at a time with the same grammar file.

## GrammarRecognizer(string, ConfidenceLevel)

Creates a grammar recognizer using specified file path and minimum confidence.

```csharp
public GrammarRecognizer(string grammarFilePath, ConfidenceLevel minimumConfidence)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Path of the grammar file.**** (\[ConfidenceLevel]\(/engine/7000.0/script-reference/unityengine/windows/speech/confidencelevel)): The confidence level at which the recognizer will begin accepting phrases.

### Remarks

Note: only one grammar recognizer can be created at a time with the same grammar file.
