Class SpeechSynthesisResult

  • All Implemented Interfaces:
    AutoCloseable

    public class SpeechSynthesisResult
    extends Object
    implements AutoCloseable
    Contains detailed information about result of a speech synthesis operation. Note: close() must be called in order to release underlying resources held by the object. Added in version 1.7.0
    • Constructor Detail

      • SpeechSynthesisResult

        protected SpeechSynthesisResult​(IntRef result)
        PROTECTED
        Parameters:
        result - PROTECTED
    • Method Detail

      • getResultId

        public String getResultId()
        Gets the unique ID of the result.
        Returns:
        Specifies unique ID of the result.
      • getReason

        public ResultReason getReason()
        Gets the reason the result was created.
        Returns:
        Specifies reason of the result.
      • getAudioLength

        public long getAudioLength()
        Gets the size of synthesized audio in bytes.
        Returns:
        Length of synthesized audio.
      • getAudioDuration

        public long getAudioDuration()
        Gets the time duration of synthesized audio, by ticks (100ns). Only valid for completed synthesis.
        Returns:
        Time duration of synthesized audio, by ticks (100ns).
      • getAudioData

        public byte[] getAudioData()
        Gets the synthesized audio from the result.
        Returns:
        Synthesized audio.
      • getProperties

        public PropertyCollection getProperties()
        The set of properties exposed in the result.
        Returns:
        The set of properties exposed in the result.
      • close

        public void close()
        Explicitly frees any external resource attached to the object
        Specified by:
        close in interface AutoCloseable
      • getImpl

        public SafeHandle getImpl()
        Returns the synthesis result implementation.
        Returns:
        The implementation of the result.