설명 없음

Texttospeech.php 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. /**
  18. * Service definition for Texttospeech (v1beta1).
  19. *
  20. * <p>
  21. * Synthesizes natural-sounding speech by applying powerful neural network
  22. * models.</p>
  23. *
  24. * <p>
  25. * For more information about this service, see the API
  26. * <a href="https://cloud.google.com/text-to-speech/" target="_blank">Documentation</a>
  27. * </p>
  28. *
  29. * @author Google, Inc.
  30. */
  31. class Google_Service_Texttospeech extends Google_Service
  32. {
  33. /** View and manage your data across Google Cloud Platform services. */
  34. const CLOUD_PLATFORM =
  35. "https://www.googleapis.com/auth/cloud-platform";
  36. public $text;
  37. public $voices;
  38. /**
  39. * Constructs the internal representation of the Texttospeech service.
  40. *
  41. * @param Google_Client $client
  42. */
  43. public function __construct(Google_Client $client)
  44. {
  45. parent::__construct($client);
  46. $this->rootUrl = 'https://texttospeech.googleapis.com/';
  47. $this->servicePath = '';
  48. $this->version = 'v1beta1';
  49. $this->serviceName = 'texttospeech';
  50. $this->text = new Google_Service_Texttospeech_Resource_Text(
  51. $this,
  52. $this->serviceName,
  53. 'text',
  54. array(
  55. 'methods' => array(
  56. 'synthesize' => array(
  57. 'path' => 'v1beta1/text:synthesize',
  58. 'httpMethod' => 'POST',
  59. 'parameters' => array(),
  60. ),
  61. )
  62. )
  63. );
  64. $this->voices = new Google_Service_Texttospeech_Resource_Voices(
  65. $this,
  66. $this->serviceName,
  67. 'voices',
  68. array(
  69. 'methods' => array(
  70. 'list' => array(
  71. 'path' => 'v1beta1/voices',
  72. 'httpMethod' => 'GET',
  73. 'parameters' => array(
  74. 'languageCode' => array(
  75. 'location' => 'query',
  76. 'type' => 'string',
  77. ),
  78. ),
  79. ),
  80. )
  81. )
  82. );
  83. }
  84. }