@איש-ימיני לא חסר לי הקוד, יש לי בעיה בכלל בעבודה
אני מקבל
Fatal error: Uncaught Google\ApiCore\ApiException: { "reason": "SERVICE_DISABLED", "domain": "googleapis.com", "errorInfoMetadata": { "service": "texttospeech.googleapis.com", "consumer": "projects\/*****" }, "message": "Cloud Text-to-Speech API has not been used in project **** before or it is disabled. Enable it by visiting https:\/\/console.developers.google.com\/apis\/api\/texttospeech.googleapis.com\/overview?project=***** then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", "code": 7, "status": "PERMISSION_DENIED", "details": [ { "@type": "type.googleapis.com\/google.rpc.Help", "links": [ { "description": "Google developers console API activation", "url": "https:\/\/console.developers.google.com\/apis\/api\/texttospeech.googleapis.com\/overview?project=*****" } ] }, { "@type": "type.googleapis.com\/google.rpc.ErrorInfo", "reason": "SERVICE_DISABLED", "domain": "googleapis.com", "metadata": { "service": "texttospeech.googleapis.com", "consumer": "projects\/*****" } } ] } in /var/**/***/vendor/google/gax/src/ApiException.php:267 Stack trace: #0 /var/**/***/vendor/google/gax/src/ApiException.php(193): Google\ApiCore\ApiException::create() #1 /var/**/***/vendor/google/gax/src/ApiException.php(315): Google\ApiCore\ApiException::createFromRestApiResponse() #2 /var/**/***/vendor/google/gax/src/Transport/RestTransport.php(165): Google\ApiCore\ApiException::createFromRequestException() #3 /var/**/***/vendor/guzzlehttp/promises/src/Promise.php(209): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}() #4 /var/**/***/vendor/guzzlehttp/promises/src/Promise.php(158): GuzzleHttp\Promise\Promise::callHandler() #5 /var/**/***/vendor/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #6 /var/**/***/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(163): GuzzleHttp\Promise\TaskQueue->run() #7 /var/**/***/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(189): GuzzleHttp\Handler\CurlMultiHandler->tick() #8 /var/**/****/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Handler\CurlMultiHandler->execute() #9 /var/**/***/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn() #10 /var/**/***/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending() #11 /var/**/***/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList() #12 /var/**/***/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending() #13 /var/**/***/vendor/google/cloud-text-to-speech/src/V1/Gapic/TextToSpeechGapicClient.php(366): GuzzleHttp\Promise\Promise->wait() #14 /var/**/***/toSpeech.php(36): Google\Cloud\TextToSpeech\V1\Gapic\TextToSpeechGapicClient->synthesizeSpeech() #15 {main} thrown in /var/**/***/vendor/google/gax/src/ApiException.php on line 267
כשאני פותח את הקובץ שעליו מופיע השגיאה אני מקבל שגיאה על השורה הבאה
public function __toString()
{
return __CLASS__ . ": $this->message\n";
}
תוכן השגיאה
Declaration of ApiException::__toString() must be compatible with Exception::__toString():
מה זה?