google/cloud-text-to-speech
Cloud Text-to-Speech Client for PHP
Maintainers
Package info
github.com/googleapis/google-cloud-php-text-to-speech
pkg:composer/google/cloud-text-to-speech
Requires
- php: ^8.1
- google/gax: ^1.38.0
Requires (Dev)
- google/cloud-core: ^1.52.7
- phpunit/phpunit: ^9.0
Suggests
- ext-grpc: Enables use of gRPC, a universal high-performance RPC framework created by Google.
- ext-protobuf: Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions.
Provides
None
Conflicts
None
Replaces
None
Apache-2.0 6d7e5a1366991cf104b4cf30f5fe74efb90bd71d
This package is auto-updated.
Last update: 2026-06-09 22:02:06 UTC
README
Idiomatic PHP client for Cloud Text-to-Speech.
👁 Latest Stable Version
👁 Packagist
NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project.
Installation
To begin, install the preferred dependency manager for PHP, Composer.
Now install this component:
$ composer require google/cloud-text-to-speech
Authentication
Please see our Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.
Sample
use Google\ApiCore\ApiException; use Google\Cloud\TextToSpeech\V1\Client\TextToSpeechClient; use Google\Cloud\TextToSpeech\V1\ListVoicesRequest; use Google\Cloud\TextToSpeech\V1\ListVoicesResponse; // Create a client. $textToSpeechClient = new TextToSpeechClient(); // Prepare the request message. $request = new ListVoicesRequest(); // Call the API and handle any network failures. try { /** @var ListVoicesResponse $response */ $response = $textToSpeechClient->listVoices($request); printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); } catch (ApiException $ex) { printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); }
Debugging
Please see our Debugging guide for more information about the debugging tools.
Version
This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.
Next Steps
- Understand the official documentation.
