Class RealtimeTranscriber

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public final class RealtimeTranscriber
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Method Detail

      • connect

        public void connect()
        Establishes connection with the websocket. Defaults to a 10s timeout.
      • sendAudio

        public void sendAudio​(byte[] audio)
        Stream binary audio data
        Parameters:
        audio - byte array audio data
      • sendAudio

        public void sendAudio​(java.lang.String audio)
        Stream base64 encoded audio data
        Parameters:
        audio - base64 audio data string
      • forceEndUtterance

        public void forceEndUtterance()
        Manually end an utterance
      • configureEndUtteranceSilenceThreshold

        public void configureEndUtteranceSilenceThreshold​(int threshold)
        Configure the threshold for how long to wait before ending an utterance. Default is 700ms.
        Parameters:
        threshold - The duration of the end utterance silence threshold in milliseconds
      • close

        public void close()
        Closes the websocket connection.
        Specified by:
        close in interface java.lang.AutoCloseable