|
27 | 27 | use Google\Cloud\Logging\LoggingClient; |
28 | 28 | use Google\Cloud\PubSub\PubSubClient; |
29 | 29 | use Google\Cloud\Spanner\SpannerClient; |
| 30 | +use Google\Cloud\Speech\SpeechClient; |
30 | 31 | use Google\Cloud\Storage\StorageClient; |
31 | 32 | use Google\Cloud\Trace\TraceClient; |
32 | 33 | use Google\Cloud\Translate\TranslateClient; |
| 34 | +use Google\Cloud\Vision\VisionClient; |
33 | 35 | use Psr\Cache\CacheItemPoolInterface; |
34 | 36 |
|
35 | 37 | /** |
@@ -266,6 +268,35 @@ public function spanner(array $config = []) |
266 | 268 | return $this->createClient(SpannerClient::class, 'spanner', $config); |
267 | 269 | } |
268 | 270 |
|
| 271 | + /** |
| 272 | + * Google Cloud Speech enables easy integration of Google speech recognition |
| 273 | + * technologies into developer applications. Send audio and receive a text |
| 274 | + * transcription from the Cloud Speech API service. Find more information at |
| 275 | + * the [Google Cloud Speech API docs](https://cloud.google.com/speech/docs/). |
| 276 | + * |
| 277 | + * Example: |
| 278 | + * ``` |
| 279 | + * $speech = $cloud->speech([ |
| 280 | + * 'languageCode' => 'en-US' |
| 281 | + * ]); |
| 282 | + * ``` |
| 283 | + * |
| 284 | + * @param array $config [optional] { |
| 285 | + * Configuration options. See |
| 286 | + * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options. |
| 287 | + * |
| 288 | + * @type string $languageCode The language of the content to |
| 289 | + * be recognized. Only BCP-47 (e.g., `"en-US"`, `"es-ES"`) |
| 290 | + * language codes are accepted. See |
| 291 | + * [Language Support](https://cloud.google.com/speech/docs/languages) |
| 292 | + * for a list of the currently supported language codes. |
| 293 | + * @return SpeechClient |
| 294 | + */ |
| 295 | + public function speech(array $config = []) |
| 296 | + { |
| 297 | + return $this->createClient(SpeechClient::class, 'speech', $config); |
| 298 | + } |
| 299 | + |
269 | 300 | /** |
270 | 301 | * Google Cloud Storage allows you to store and retrieve data on Google's |
271 | 302 | * infrastructure. Find more information at the |
@@ -305,6 +336,26 @@ public function trace(array $config = []) |
305 | 336 | return $this->createClient(TraceClient::class, 'trace', $config); |
306 | 337 | } |
307 | 338 |
|
| 339 | + /** |
| 340 | + * Google Cloud Vision allows you to understand the content of an image, |
| 341 | + * classify images into categories, detect text, objects, faces and more. |
| 342 | + * Find more information at the |
| 343 | + * [Google Cloud Vision docs](https://cloud.google.com/vision/docs/). |
| 344 | + * |
| 345 | + * Example: |
| 346 | + * ``` |
| 347 | + * $vision = $cloud->vision(); |
| 348 | + * ``` |
| 349 | + * |
| 350 | + * @param array $config [optional] Configuration options. See |
| 351 | + * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the available options. |
| 352 | + * @return VisionClient |
| 353 | + */ |
| 354 | + public function vision(array $config = []) |
| 355 | + { |
| 356 | + return $this->createClient(VisionClient::class, 'vision', $config); |
| 357 | + } |
| 358 | + |
308 | 359 | /** |
309 | 360 | * Google Cloud Translation provides the ability to dynamically translate |
310 | 361 | * text between thousands of language pairs and lets websites and programs |
|
0 commit comments