Download the PHP package waglpz/google-tts without Composer
On this page you can find all versions of the php package waglpz/google-tts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download waglpz/google-tts
More information about waglpz/google-tts
Files in waglpz/google-tts
Package google-tts
Short Description Create sound files from text with Google.
License MIT
Informations about the package google-tts
Google Text To Speech Library for PHP
The Google TTS Library enables you to work with text to speech via Google API.
Requirements
PHP 8.2 or higher
Installation
composer require waglpz/google-tts:"^1.0"
Authentication with OAuth
- Follow the instructions to Create Web Application Credentials
- Download the JSON credentials in some hidden directory and include this one path in config.
- Set the path to these credentials using config
authConfig
. - Set the scopes required for the API you are going to call using config key
scopes
- Set your application's redirect URI in config
- Set expected prompt when redirect to google. These can
none
,consent
orselect_account
. - In the script handling the redirect URI, exchange the authorization code for an access token:
Example
Google documentation
Examples to createAudio: https://cloud.google.com/text-to-speech/docs/create-audio
PHP Example: https://cloud.google.com/php/docs/reference/cloud-text-to-speech/latest
Supported Voices and Languages: https://cloud.google.com/text-to-speech/docs/voices
Punctuation
Code Quality and Testing
To check for coding style violations, run
To automatically fix (fixable) coding style violations, run
To check for static type violations, run
To check for regressions, run
To check all violations at once, run
All versions of google-tts with dependencies
ext-json Version *
google/cloud-text-to-speech Version ^v1.8
waglpz/di-container Version ^2.0