* Converts audio to text by applying powerful neural network models.

* *

* For more information about this service, see the API * Documentation *

* * @author Google, Inc. */ class Speech extends \Google\Service { /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */ const CLOUD_PLATFORM = "https://www.googleapis.com/auth/cloud-platform"; public $operations; public $projects_locations_customClasses; public $projects_locations_phraseSets; public $speech; /** * Constructs the internal representation of the Speech service. * * @param Client|array $clientOrConfig The client used to deliver requests, or a * config array to pass to a new Client instance. * @param string $rootUrl The root URL used for requests to the service. */ public function __construct($clientOrConfig = [], $rootUrl = null) { parent::__construct($clientOrConfig); $this->rootUrl = $rootUrl ?: 'https://speech.googleapis.com/'; $this->servicePath = ''; $this->batchPath = 'batch'; $this->version = 'v1'; $this->serviceName = 'speech'; $this->operations = new Speech\Resource\Operations( $this, $this->serviceName, 'operations', [ 'methods' => [ 'get' => [ 'path' => 'v1/operations/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'list' => [ 'path' => 'v1/operations', 'httpMethod' => 'GET', 'parameters' => [ 'filter' => [ 'location' => 'query', 'type' => 'string', ], 'name' => [ 'location' => 'query', 'type' => 'string', ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); $this->projects_locations_customClasses = new Speech\Resource\ProjectsLocationsCustomClasses( $this, $this->serviceName, 'customClasses', [ 'methods' => [ 'create' => [ 'path' => 'v1/{+parent}/customClasses', 'httpMethod' => 'POST', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'delete' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'DELETE', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'list' => [ 'path' => 'v1/{+parent}/customClasses', 'httpMethod' => 'GET', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], ], ],'patch' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'PATCH', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'updateMask' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); $this->projects_locations_phraseSets = new Speech\Resource\ProjectsLocationsPhraseSets( $this, $this->serviceName, 'phraseSets', [ 'methods' => [ 'create' => [ 'path' => 'v1/{+parent}/phraseSets', 'httpMethod' => 'POST', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'delete' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'DELETE', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'get' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], ], ],'list' => [ 'path' => 'v1/{+parent}/phraseSets', 'httpMethod' => 'GET', 'parameters' => [ 'parent' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'pageSize' => [ 'location' => 'query', 'type' => 'integer', ], 'pageToken' => [ 'location' => 'query', 'type' => 'string', ], ], ],'patch' => [ 'path' => 'v1/{+name}', 'httpMethod' => 'PATCH', 'parameters' => [ 'name' => [ 'location' => 'path', 'type' => 'string', 'required' => true, ], 'updateMask' => [ 'location' => 'query', 'type' => 'string', ], ], ], ] ] ); $this->speech = new Speech\Resource\Speech( $this, $this->serviceName, 'speech', [ 'methods' => [ 'longrunningrecognize' => [ 'path' => 'v1/speech:longrunningrecognize', 'httpMethod' => 'POST', 'parameters' => [], ],'recognize' => [ 'path' => 'v1/speech:recognize', 'httpMethod' => 'POST', 'parameters' => [], ], ] ] ); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(Speech::class, 'Google_Service_Speech');