Class HybridSpeechConfig

  • All Implemented Interfaces:
    AutoCloseable

    public final class HybridSpeechConfig
    extends Object
    implements AutoCloseable
    Class that defines hybrid (cloud and embedded) configurations for speech recognition and speech synthesis. Note: close() must be called in order to release underlying resources held by the object.
    • Method Detail

      • fromConfigs

        public static final HybridSpeechConfig fromConfigs​(SpeechConfig cloudSpeechConfig,
                                                           EmbeddedSpeechConfig embeddedSpeechConfig)
        Creates an instance of the hybrid speech config with specified cloud and embedded speech configs.
        Parameters:
        cloudSpeechConfig - Cloud speech configuration.
        embeddedSpeechConfig - Embedded speech configuration.
        Returns:
        A hybrid speech config instance.
      • setSpeechRecognitionOutputFormat

        public final void setSpeechRecognitionOutputFormat​(OutputFormat value)
        Sets the speech recognition output format.
        Parameters:
        value - The recognition output format.
      • getSpeechRecognitionOutputFormat

        public final OutputFormat getSpeechRecognitionOutputFormat()
        Gets the speech recognition output format.
        Returns:
        The recognition output format.
      • setSpeechSynthesisOutputFormat

        public final void setSpeechSynthesisOutputFormat​(SpeechSynthesisOutputFormat value)
        Sets the speech synthesis output format.
        Parameters:
        value - The synthesis output format ID (e.g. Riff16Khz16BitMonoPcm).
      • getSpeechSynthesisOutputFormat

        public final String getSpeechSynthesisOutputFormat()
        Gets the speech synthesis output format.
        Returns:
        Returns the synthesis output format.
      • setProperty

        public void setProperty​(String name,
                                String value)
        Sets a named property as value.
        Parameters:
        name - the name of the property.
        value - the value.
      • setProperty

        public void setProperty​(PropertyId id,
                                String value)
        Sets the property by propertyId.
        Parameters:
        id - PropertyId of the property.
        value - The value.
      • getProperty

        public String getProperty​(String name)
        Gets a named property as value.
        Parameters:
        name - the name of the property.
        Returns:
        The value.
      • getProperty

        public String getProperty​(PropertyId id)
        Gets the property by propertyId.
        Parameters:
        id - PropertyId of the property.
        Returns:
        The value.
      • close

        public final void close()
        Dispose of associated resources.
        Specified by:
        close in interface AutoCloseable
      • getImpl

        public SafeHandle getImpl()
        Returns a internal handle to SpeechConfig implementation.
        Returns:
        The implementation handle.