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 18namespace Google\Service\Texttospeech\Resource; 19 20use Google\Service\Texttospeech\ListVoicesResponse; 21 22/** 23 * The "voices" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $texttospeechService = new Google\Service\Texttospeech(...); 27 * $voices = $texttospeechService->voices; 28 * </code> 29 */ 30class Voices extends \Google\Service\Resource 31{ 32 /** 33 * Returns a list of Voice supported for synthesis. (voices.listVoices) 34 * 35 * @param array $optParams Optional parameters. 36 * 37 * @opt_param string languageCode Optional. Recommended. [BCP-47](https://www 38 * .rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If not specified, the API 39 * will return all supported voices. If specified, the ListVoices call will only 40 * return voices that can be used to synthesize this language_code. For example, 41 * if you specify `"en-NZ"`, all `"en-NZ"` voices will be returned. If you 42 * specify `"no"`, both `"no-"` (Norwegian) and `"nb-"` (Norwegian Bokmal) 43 * voices will be returned. 44 * @return ListVoicesResponse 45 */ 46 public function listVoices($optParams = []) 47 { 48 $params = []; 49 $params = array_merge($params, $optParams); 50 return $this->call('list', [$params], ListVoicesResponse::class); 51 } 52} 53 54// Adding a class alias for backwards compatibility with the previous class name. 55class_alias(Voices::class, 'Google_Service_Texttospeech_Resource_Voices'); 56