also looking at this
meemalabs/laravel-text-to-speech
Require aws php sdk
#24
2 files
+6
-6
| @@ -26,11 +26,11 @@ | ||
| 26 | 26 | ], |
| 27 | 27 | "require": { |
| 28 | 28 | "php": "^7.3|^7.4|^8.0", |
| 29 | "aws/aws-sdk-php": "^3.178", | |
| 29 | 30 | "guzzlehttp/guzzle": "^6.0|^7.0", |
| 30 | 31 | "illuminate/support": "5.*|^6.0|^7.0|^8.0" |
| 31 | 32 | }, |
| 32 | 33 | "require-dev": { |
| 33 | "aws/aws-sdk-php": "^3.0", | |
| 34 | 34 | "orchestra/testbench": "^4.0|^5.0|^6.0", |
| 35 | 35 | "phpunit/phpunit": "^5.0|^6.0|^8.0|^9.3" |
| 36 | 36 | }, |
| @@ -18,7 +18,7 @@ class PollyConverter implements Converter | ||
| 18 | 18 | /** |
| 19 | 19 | * Client instance of Polly. |
| 20 | 20 | * |
| 21 | * @var \Aws\Polly\PollyClient | |
| 21 | * @var PollyClient | |
| 22 | 22 | */ |
| 23 | 23 | protected $client; |
| 24 | 24 | |
| @@ -163,11 +163,11 @@ class PollyConverter implements Converter | ||
| 163 | 163 | /** |
| 164 | 164 | * Get the text type. |
| 165 | 165 | * |
| 166 | * @return void | |
| 166 | * @return string | |
| 167 | 167 | */ |
| 168 | 168 | protected function textType() |
| 169 | 169 | { |
| 170 | $default = config('tts.text_type', 'text'); | |
| 170 | $default = (string) config('tts.text_type', 'text'); | |
| 171 | 171 | |
| 172 | 172 | return $this->textType ?? $default; |
| 173 | 173 | } |
formatting only · 8 hidden lines
| @@ -185,7 +185,7 @@ class PollyConverter implements Converter formatting only | ||
| 185 | 185 | /** |
| 186 | 186 | * Get the audio format. |
| 187 | 187 | * |
| 188 | * @param array $options | |
| 188 | * @param array $options | |
| 189 | 189 | * @return string |
| 190 | 190 | */ |
| 191 | 191 | protected function format($options) |
| @@ -198,7 +198,7 @@ class PollyConverter implements Converter | ||
| 198 | 198 | /** |
| 199 | 199 | * Get the content of the result from AWS Polly. |
| 200 | 200 | * |
| 201 | * @param mixed $result | |
| 201 | * @param Result $result | |
| 202 | 202 | * @return mixed |
| 203 | 203 | */ |
| 204 | 204 | protected function getResultContent($result) |