I am new to use the google API's. I am trying to use the google speech recognition, to convert my speech to text and vise versa. But don't know how to use the google speech API. I download the google cloud package using this command
composer require google/cloud
But I dont know how to use this. I am following tutorial https://github.com/GoogleCloudPlatform/google-cloud-php from this link. but it showing me errors.
Fatal error: Uncaught Google\Cloud\Exception\ServiceException: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information in /var/www/html/googlevoice/vendor/google/cloud/src/RequestWrapper.php:221
Stack trace:
#0 /var/www/html/googlevoice/vendor/google/cloud/src/RequestWrapper.php(185): Google\Cloud\RequestWrapper->convertToGoogleException(Object(DomainException))
#1 /var/www/html/googlevoice/vendor/google/cloud/src/RequestWrapper.php(167): Google\Cloud\RequestWrapper->fetchCredentials()
#2 /var/www/html/googlevoice/vendor/google/cloud/src/RequestWrapper.php(150): Google\Cloud\RequestWrapper->getToken()
#3 /var/www/html/googlevoice/vendor/google/cloud/src/RequestWrapper.php(131): Google\Cloud\RequestWrapper->signRequest(Object(GuzzleHttp\Psr7\Request))
#4 /var/www/html/googlevoice/vendor/google/cloud/src/RestTrait.php(78): Google\Cloud\RequestWrapper->send(Object(GuzzleHttp\Psr7\Request), Array)
#5 /var/www/html/googlevoice/vendor/goo in /var/www/html/googlevoice/vendor/google/cloud/src/RequestWrapper.php on line 221