ReviewOS

also looking at this

meemalabs/laravel-text-to-speech

Support laravel 9

#32
Merged luigel wants to merge support-laravel-9 into main
17 files +83 -61
src/Converters/PollyConverter.phpmodified+14-14
formatting only · 8 hidden lines
Changes to src/Converters/PollyConverter.php
@@ -26,7 +26,7 @@ class PollyConverter implements Converter formatting only
2626 /**
2727 * Construct converter.
2828 *
29 * @param PollyClient $client
29 * @param PollyClient $client
3030 */
3131 public function __construct(PollyClient $client)
3232 {
Changes to src/Converters/PollyConverter.php
@@ -46,8 +46,8 @@ class PollyConverter implements Converter
4646 /**
4747 * Converts the text to speech.
4848 *
49 * @param string $data
50 * @param array $options
49 * @param string $data
50 * @param array|null $options
5151 * @return string|array
5252 */
5353 public function convert(string $data, array $options = null)
@@ -81,8 +81,8 @@ class PollyConverter implements Converter
8181 /**
8282 * Request to Amazon Polly to synthesize speech.
8383 *
84 * @param string|array $text
85 * @param array $options
84 * @param string|array $text
85 * @param array|null $options
8686 * @return array|\Aws\Result
8787 */
8888 protected function synthesizeSpeech($text, array $options = null)
@@ -111,7 +111,7 @@ class PollyConverter implements Converter
111111 'Text' => $textItem,
112112 ]));
113113
114 array_push($results, $result);
114 $results[] = $result;
115115 }
116116
117117 return $results;
formatting only · 8 hidden lines
Changes to src/Converters/PollyConverter.php
@@ -135,7 +135,7 @@ class PollyConverter implements Converter formatting only
135135 /**
136136 * Checks the length of the text if more than 3000.
137137 *
138 * @param string $text
138 * @param string $text
139139 * @return bool
140140 */
141141 protected function isTextAboveLimit(string $text)
formatting only · 10 hidden lines
Changes to src/Converters/PollyConverter.php
@@ -146,8 +146,8 @@ class PollyConverter implements Converter formatting only
146146 /**
147147 * Chunk the given text into array.
148148 *
149 * @param string $text
150 * @param int $size
149 * @param string $text
150 * @param int $size
151151 * @return array
152152 */
153153 protected function getChunkText(string $text, int $size = 2000)
formatting only · 8 hidden lines
Changes to src/Converters/PollyConverter.php
@@ -158,7 +158,7 @@ class PollyConverter implements Converter formatting only
158158 /**
159159 * Get the text to speech voice ID.
160160 *
161 * @param array $options
161 * @param array $options
162162 * @return string
163163 */
164164 protected function voice($options)
formatting only · 8 hidden lines
Changes to src/Converters/PollyConverter.php
@@ -193,7 +193,7 @@ class PollyConverter implements Converter formatting only
193193 /**
194194 * Get the audio format.
195195 *
196 * @param array $options
196 * @param array $options
197197 * @return string
198198 */
199199 protected function format($options)
formatting only · 8 hidden lines
Changes to src/Converters/PollyConverter.php
@@ -210,7 +210,7 @@ class PollyConverter implements Converter formatting only
210210 /**
211211 * Get the engine.
212212 *
213 * @param array $options
213 * @param array $options
214214 * @return string
215215 */
216216 protected function engine($options)
formatting only · 8 hidden lines
Changes to src/Converters/PollyConverter.php
@@ -233,7 +233,7 @@ class PollyConverter implements Converter formatting only
233233 /**
234234 * Get the content of the result from AWS Polly.
235235 *
236 * @param Result $result
236 * @param Result $result
237237 * @return mixed
238238 */
239239 protected function getResultContent($result)
formatting only · 8 hidden lines
Changes to src/Converters/PollyConverter.php
@@ -254,7 +254,7 @@ class PollyConverter implements Converter formatting only
254254 /**
255255 * Format the given json string into an array.
256256 *
257 * @param string $json
257 * @param string $json
258258 * @return array
259259 */
260260 protected function formatToArray($json)