public ServiceCall < Pronunciation > getPronunciation ( GetPronunciationOptions getPronunciationOptions ) { Validator . notNull ( getPronunciationOptions , "getPronunciationOptions cannot be null" ) ; String [ ] pathSegments = { "v1/pronunciation" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "text_to_speech" , "v1" , "getPronunciation" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; builder . query ( "text" , getPronunciationOptions . text ( ) ) ; if ( getPronunciationOptions . voice ( ) != null ) { builder . query ( "voice" , getPronunciationOptions . voice ( ) ) ; } if ( getPronunciationOptions . format ( ) != null ) { builder . query ( "format" , getPronunciationOptions . format ( ) ) ; } if ( getPronunciationOptions . customizationId ( ) != null ) { builder . query ( "customization_id" , getPronunciationOptions . customizationId ( ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Pronunciation . class ) ) ; }
Get pronunciation .