Grammar Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. Grammar
- com.
Implements
java.lang.AutoCloseable
public class Grammar
implements java.lang.AutoCloseable
Represents a generic grammar used to assist in improving speech recogniton accuracy. Note: close() must be called in order to release underlying resources held by the object.
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Dispose of associated resources. |
static Grammar |
fromStorageId(String id)
Creates a Grammar from its storage Id. |
Safe |
getImpl()
Returns the internal grammar instance |
Methods inherited from java.lang.Object
java.lang.Object.clone
java.lang.Object.equals
java.lang.Object.finalize
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString
java.lang.Object.wait
java.lang.Object.wait
java.lang.Object.wait
Method Details
close
public void close()
Dispose of associated resources.
fromStorageId
public static Grammar fromStorageId(String id)
Creates a Grammar from its storage Id. Creating a grammar from a storage ID is only usable in specific scenarios and is not generally possible.
Parameters:
id
- The Id of the grammar
Returns:
Grammar associated with the given Id.
getImpl
public SafeHandle getImpl()
Returns the internal grammar instance
Returns:
The internal grammar instance