Class RealtimeParameters.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • encoding

        public RealtimeParameters.Builder encoding​(String encoding)
        Audio encoding to use - audio/raw;rate=16000 - audio/raw;rate=8000 - audio/raw;rate=8000;codec=mulaw - audio/raw;rate=8000;codec=alaw
        Parameters:
        encoding - the value to set
        Returns:
        this builder
      • isAckEnabled

        public RealtimeParameters.Builder isAckEnabled​(Boolean isAckEnabled)
        Toggle for ack messages.
        Parameters:
        isAckEnabled - the value to set
        Returns:
        this builder
      • partialSilenceThresholdInMs

        public RealtimeParameters.Builder partialSilenceThresholdInMs​(Integer partialSilenceThresholdInMs)
        Silence threshold for Realtime Speech partial results in milliseconds.
        Parameters:
        partialSilenceThresholdInMs - the value to set
        Returns:
        this builder
      • finalSilenceThresholdInMs

        public RealtimeParameters.Builder finalSilenceThresholdInMs​(Integer finalSilenceThresholdInMs)
        Silence threshold for Realtime Speech final results in milliseconds.
        Parameters:
        finalSilenceThresholdInMs - the value to set
        Returns:
        this builder
      • stabilizePartialResults

        public RealtimeParameters.Builder stabilizePartialResults​(RealtimeParameters.StabilizePartialResults stabilizePartialResults)
        When enabled sets the amount of confidence required for latest tokens before returning them as part of a new partial result
        Parameters:
        stabilizePartialResults - the value to set
        Returns:
        this builder
      • languageCode

        public RealtimeParameters.Builder languageCode​(String languageCode)
        Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646].
        • en-US: English - United States - es-ES: Spanish - Spain - pt-BR: Portuguese - Brazil - en-GB: English - Great Britain - en-AU: English - Australia - en-IN: English - India - hi-IN: Hindi - India - fr-FR: French - France - de-DE: German - Germany - it-IT: Italian - Italy
        Parameters:
        languageCode - the value to set
        Returns:
        this builder
      • shouldIgnoreInvalidCustomizations

        public RealtimeParameters.Builder shouldIgnoreInvalidCustomizations​(Boolean shouldIgnoreInvalidCustomizations)
        If set to true, the service will not fail connection attempt if it encounters any issues that prevent the loading of all specified user customizations.

        Any invalid customizations will simply be ignored and connection will continue being established with the default base model and any remaining valid customizations. If set to false, if the service is unable to load any of the specified customizations, an error detailing why will be returned and the session will end.

        Parameters:
        shouldIgnoreInvalidCustomizations - the value to set
        Returns:
        this builder
      • punctuation

        public RealtimeParameters.Builder punctuation​(RealtimeParameters.Punctuation punctuation)
        Configure punctuations in the generated transcriptions.

        Disabled by default. - NONE: No punctuation in the transcription response - SPOKEN: Punctuations in response only when verbally spoken - AUTO: Automatic punctuation in the response, spoken punctuations are disabled

        Parameters:
        punctuation - the value to set
        Returns:
        this builder