# GrammarRecognizer

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

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEngine.Windows.Speech](/engine/6000.7/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/6000.7/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.
