public function read($text)
    {
        $payload = $this->getPayload($text);

        $handle = $this->getHandle();
        $handle->setUrl($payload->getServiceUrl());
        $handle->setOption(CURLOPT_RETURNTRANSFER, 1);
        $handle->setOption(CURLOPT_POST, true);

        $handle->setOption(CURLOPT_POSTFIELDS, $payload->getPayload());
        $handle->setOption(CURLOPT_HTTPHEADER, $payload->getHeaders());
        $handle->setOption(CURLOPT_SSL_VERIFYPEER, false);

        $response = $handle->execute();
        $this->setHeaders($handle->getInfo());
        return $response;
    }
public function read($text)
    {
        $payload = $this->getPayload($text);

        $handle = $this->getHandle();
        $handle->setUrl($payload->getServiceUrl());
        $handle->setOption(CURLOPT_RETURNTRANSFER, 1);
        $handle->setOption(CURLOPT_POST, true);

        $handle->setOption(CURLOPT_POSTFIELDS, $payload->getPayload());
        $handle->setOption(CURLOPT_HTTPHEADER, $payload->getHeaders());
        $handle->setOption(CURLOPT_SSL_VERIFYPEER, false);

        $response = $handle->execute();
        $this->setHeaders($handle->getInfo());
        return $response;
    }
public function read ( $ text ) { $ payload = $ this -> getPayload ( $ text ) ; $ handle = $ this -> getHandle ( ) ; $ handle -> setUrl ( $ payload -> getServiceUrl ( ) ) ; $ handle -> setOption ( CURLOPT_RETURNTRANSFER , 1 ) ; $ handle -> setOption ( CURLOPT_POST , true ) ; $ handle -> setOption ( CURLOPT_POSTFIELDS , $ payload -> getPayload ( ) ) ; $ handle -> setOption ( CURLOPT_HTTPHEADER , $ payload -> getHeaders ( ) ) ; $ handle -> setOption ( CURLOPT_SSL_VERIFYPEER , false ) ; $ response = $ handle -> execute ( ) ; $ this -> setHeaders ( $ handle -> getInfo ( ) ) ; return $ response ; }
Read audio from Ivona service
@param string $text
@return mixed
Read audio from Ivona service