RecognizerInfo Clase

Definición

Representa información sobre una instancia de SpeechRecognizer o de SpeechRecognitionEngine.Represents information about a SpeechRecognizer or SpeechRecognitionEngine instance.

public ref class RecognizerInfo : IDisposable
public ref class RecognizerInfo
public class RecognizerInfo : IDisposable
public class RecognizerInfo
type RecognizerInfo = class
    interface IDisposable
type RecognizerInfo = class
Public Class RecognizerInfo
Implements IDisposable
Public Class RecognizerInfo
Herencia
RecognizerInfo
Implementaciones

Ejemplos

En el ejemplo siguiente se valida una CultureInfo cadena de identificador y determinada según las SpeechRecognitionEngine configuraciones permitidas, expresadas como una lista de RecognizerInfo objetos.The following example validates a given CultureInfo and identifier string against the permitted SpeechRecognitionEngine configurations, expressed as a list of RecognizerInfo objects.

Si la CultureInfo cadena de identificador y es válida, en el ejemplo se crea una nueva instancia de SpeechRecognitionEngine con la RecognizerInfo instancia como un argumento.If the CultureInfo and identifier string are valid, the example creates a new instance of SpeechRecognitionEngine using the RecognizerInfo instance as an argument.

private SpeechRecognitionEngine SelectRecognizer(CultureInfo requiredCulture, string requiredId)   
{  
  // Select based on a specific recognizer configuration  
  SpeechRecognitionEngine speechRecognitionEngine=null;  
  foreach (RecognizerInfo config in SpeechRecognitionEngine.InstalledRecognizers())   
  {  
    if (config.Culture.Equals(requiredCulture) && config.Id== requiredId)   
    {  
      speechRecognitionEngine = new SpeechRecognitionEngine(config);  
      break;  
    }  
  }  
  return speechRecognitionEngine;  
}  

Comentarios

Puede obtener información de identificación de un motor de reconocimiento inicializado mediante SpeechRecognizer.RecognizerInfo para un SpeechRecognizer objeto o SpeechRecognitionEngine.RecognizerInfo para un SpeechRecognitionEngine objeto.You can obtain identifying information for an initialized recognition engine using SpeechRecognizer.RecognizerInfo for a SpeechRecognizer object or SpeechRecognitionEngine.RecognizerInfo for a SpeechRecognitionEngine object.

La información devuelta en las instancias de RecognizerInfo obtenidas de a SpeechRecognizer viene determinada por la configuración del miembro de propiedades de voz del Panel de control.The information returned in instances of RecognizerInfo obtained from a SpeechRecognizer is determined by the settings in the Speech Properties member of the Control Panel.

Puede usar instancias de RecognizerInfo para construir una configuración concreta de SpeechRecognitionEngine mediante el SpeechRecognitionEngine(RecognizerInfo) constructor.You can use instances of RecognizerInfo to construct a specific configuration of SpeechRecognitionEngine using the SpeechRecognitionEngine(RecognizerInfo) constructor.

El método estático InstalledRecognizers devuelve una lista de todas las SpeechRecognitionEngine configuraciones disponibles como RecognizerInfo instancias.The static method InstalledRecognizers returns a list of all available SpeechRecognitionEngine configurations as RecognizerInfo instances.

Propiedades

AdditionalInfo

Obtiene la información adicional sobre una instancia de SpeechRecognizer o de SpeechRecognitionEngine.Gets additional information about a SpeechRecognizer or SpeechRecognitionEngine instance.

Culture

Obtiene la referencia cultural admitida por una instancia de SpeechRecognizer o de SpeechRecognitionEngine.Gets the culture supported by a SpeechRecognizer or SpeechRecognitionEngine instance.

Description

Obtiene la descripción de una instancia SpeechRecognizer o SpeechRecognitionEngine.Gets the description of a SpeechRecognizer or SpeechRecognitionEngine instance.

Id

Obtiene el identificador de una instancia SpeechRecognizer o SpeechRecognitionEngine.Gets the identifier of a SpeechRecognizer or SpeechRecognitionEngine instance.

Name

Obtiene el nombre descriptivo de una instancia SpeechRecognizer o SpeechRecognitionEngine.Gets the friendly name of a SpeechRecognizer or SpeechRecognitionEngine instance.

SupportedAudioFormats

Obtiene los formatos de audio admitidos por una instancia de SpeechRecognizer o de SpeechRecognitionEngine.Gets the audio formats supported by a SpeechRecognizer or SpeechRecognitionEngine instance.

Métodos

Dispose()

Desecha el objeto RecognizerInfo.Disposes the RecognizerInfo object.

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.Determines whether the specified object is equal to the current object.

(Heredado de Object)
GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Heredado de Object)
MemberwiseClone()

Crea una copia superficial del Object actual.Creates a shallow copy of the current Object.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Heredado de Object)

Se aplica a

Consulte también