KeywordRecognitionModel Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. KeywordRecognitionModel
- com.
Implements
public class KeywordRecognitionModel
implements java.lang.AutoCloseable
Represents a keyword recognition model for recognizing when the user says a keyword to initiate further speech recognition. 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
Keyword |
fromConfig(EmbeddedSpeechConfig embeddedSpeechConfig)
Creates a keyword recognition model using the specified embedded speech config. |
static
Keyword |
fromConfig(EmbeddedSpeechConfig embeddedSpeechConfig, List<String> userDefinedWakeWords)
Creates a keyword recognition model using the specified embedded speech config and user-defined wake words. |
static
Keyword |
fromFile(String fileName)
Creates a keyword recognition model using the specified filename. |
static
Keyword |
fromStream(InputStream inputStream, String name, boolean isZipped)
Creates a keyword recognition model using the specified input stream. |
Safe |
getImpl()
Returns the keyword recognition model. |
Methods inherited from java.lang.Object
Method Details
close
public void close()
Dispose of associated resources.
fromConfig
public static KeywordRecognitionModel fromConfig(EmbeddedSpeechConfig embeddedSpeechConfig)
Creates a keyword recognition model using the specified embedded speech config.
Parameters:
Returns:
fromConfig
public static KeywordRecognitionModel fromConfig(EmbeddedSpeechConfig embeddedSpeechConfig, List
Creates a keyword recognition model using the specified embedded speech config and user-defined wake words.
Parameters:
Returns:
fromFile
public static KeywordRecognitionModel fromFile(String fileName)
Creates a keyword recognition model using the specified filename.
Parameters:
Returns:
fromStream
public static KeywordRecognitionModel fromStream(InputStream inputStream, String name, boolean isZipped)
Creates a keyword recognition model using the specified input stream.
Parameters:
Returns:
Throws:
getImpl
public SafeHandle getImpl()
Returns the keyword recognition model.
Returns:
Applies to
Azure SDK for Java
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour