public function createPayload()
    {
        $payloadArray = (object)array();
        $payloadArray->Input['Data'] = $this->getQueryText();
        $payloadArray->Input['Type'] = 'text/plain';

        $payloadArray->OutputFormat['Codec'] = $this->getOptions()->getOutputFormatCodec();
        $payloadArray->OutputFormat['SampleRate'] = (int)$this->getOptions()->getOutputSampleRate();
        $payloadArray->Voice['Language'] = $this->getOptions()->getLanguage();
        $payloadArray->Voice['Name'] = $this->getOptions()->getVoice();
        $payloadArray->Parameters['Rate'] = $this->getOptions()->getParametersRate();

        $this->setPayload(json_encode($payloadArray));
        return $this;
    }
public function createPayload()
    {
        $payloadArray = (object)array();
        $payloadArray->Input['Data'] = $this->getQueryText();
        $payloadArray->Input['Type'] = 'text/plain';

        $payloadArray->OutputFormat['Codec'] = $this->getOptions()->getOutputFormatCodec();
        $payloadArray->OutputFormat['SampleRate'] = (int)$this->getOptions()->getOutputSampleRate();
        $payloadArray->Voice['Language'] = $this->getOptions()->getLanguage();
        $payloadArray->Voice['Name'] = $this->getOptions()->getVoice();
        $payloadArray->Parameters['Rate'] = $this->getOptions()->getParametersRate();

        $this->setPayload(json_encode($payloadArray));
        return $this;
    }
public function createPayload ( ) { $ payloadArray = ( object ) array ( ) ; $ payloadArray -> Input [ 'Data' ] = $ this -> getQueryText ( ) ; $ payloadArray -> Input [ 'Type' ] = 'text/plain' ; $ payloadArray -> OutputFormat [ 'Codec' ] = $ this -> getOptions ( ) -> getOutputFormatCodec ( ) ; $ payloadArray -> OutputFormat [ 'SampleRate' ] = ( int ) $ this -> getOptions ( ) -> getOutputSampleRate ( ) ; $ payloadArray -> Voice [ 'Language' ] = $ this -> getOptions ( ) -> getLanguage ( ) ; $ payloadArray -> Voice [ 'Name' ] = $ this -> getOptions ( ) -> getVoice ( ) ; $ payloadArray -> Parameters [ 'Rate' ] = $ this -> getOptions ( ) -> getParametersRate ( ) ; $ this -> setPayload ( json_encode ( $ payloadArray ) ) ; return $ this ; }
Create json object with post parameters
@return $this
Create json object with post parameters