gestione documentale avanzata 1 parte

This commit is contained in:
2026-05-28 09:34:28 +02:00
parent 3471befb1a
commit f2b0833b90
34482 changed files with 4312269 additions and 546 deletions
@@ -0,0 +1,122 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class AdvancedVoiceOptions extends \Google\Model
{
/**
* Optional. If true, textnorm will be applied to text input. This feature is
* enabled by default. Only applies for Gemini TTS.
*
* @var bool
*/
public $enableTextnorm;
/**
* Only for Journey voices. If false, the synthesis is context aware and has a
* higher latency.
*
* @var bool
*/
public $lowLatencyJourneySynthesis;
/**
* Optional. Input only. Deprecated, use safety_settings instead. If true,
* relaxes safety filters for Gemini TTS.
*
* @deprecated
* @var bool
*/
public $relaxSafetyFilters;
protected $safetySettingsType = SafetySettings::class;
protected $safetySettingsDataType = '';
/**
* Optional. If true, textnorm will be applied to text input. This feature is
* enabled by default. Only applies for Gemini TTS.
*
* @param bool $enableTextnorm
*/
public function setEnableTextnorm($enableTextnorm)
{
$this->enableTextnorm = $enableTextnorm;
}
/**
* @return bool
*/
public function getEnableTextnorm()
{
return $this->enableTextnorm;
}
/**
* Only for Journey voices. If false, the synthesis is context aware and has a
* higher latency.
*
* @param bool $lowLatencyJourneySynthesis
*/
public function setLowLatencyJourneySynthesis($lowLatencyJourneySynthesis)
{
$this->lowLatencyJourneySynthesis = $lowLatencyJourneySynthesis;
}
/**
* @return bool
*/
public function getLowLatencyJourneySynthesis()
{
return $this->lowLatencyJourneySynthesis;
}
/**
* Optional. Input only. Deprecated, use safety_settings instead. If true,
* relaxes safety filters for Gemini TTS.
*
* @deprecated
* @param bool $relaxSafetyFilters
*/
public function setRelaxSafetyFilters($relaxSafetyFilters)
{
$this->relaxSafetyFilters = $relaxSafetyFilters;
}
/**
* @deprecated
* @return bool
*/
public function getRelaxSafetyFilters()
{
return $this->relaxSafetyFilters;
}
/**
* Optional. Input only. This applies to Gemini TTS only. If set, the category
* specified in the safety setting will be blocked if the harm probability is
* above the threshold. Otherwise, the safety filter will be disabled by
* default.
*
* @param SafetySettings $safetySettings
*/
public function setSafetySettings(SafetySettings $safetySettings)
{
$this->safetySettings = $safetySettings;
}
/**
* @return SafetySettings
*/
public function getSafetySettings()
{
return $this->safetySettings;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AdvancedVoiceOptions::class, 'Google_Service_Texttospeech_AdvancedVoiceOptions');
@@ -0,0 +1,210 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class AudioConfig extends \Google\Collection
{
/**
* Not specified. Only used by GenerateVoiceCloningKey. Otherwise, will return
* result google.rpc.Code.INVALID_ARGUMENT.
*/
public const AUDIO_ENCODING_AUDIO_ENCODING_UNSPECIFIED = 'AUDIO_ENCODING_UNSPECIFIED';
/**
* Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio
* content returned as LINEAR16 also contains a WAV header.
*/
public const AUDIO_ENCODING_LINEAR16 = 'LINEAR16';
/**
* MP3 audio at 32kbps.
*/
public const AUDIO_ENCODING_MP3 = 'MP3';
/**
* Opus encoded audio wrapped in an ogg container. The result is a file which
* can be played natively on Android, and in browsers (at least Chrome and
* Firefox). The quality of the encoding is considerably higher than MP3 while
* using approximately the same bitrate.
*/
public const AUDIO_ENCODING_OGG_OPUS = 'OGG_OPUS';
/**
* 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
* Audio content returned as MULAW also contains a WAV header.
*/
public const AUDIO_ENCODING_MULAW = 'MULAW';
/**
* 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.
* Audio content returned as ALAW also contains a WAV header.
*/
public const AUDIO_ENCODING_ALAW = 'ALAW';
/**
* Uncompressed 16-bit signed little-endian samples (Linear PCM). Note that as
* opposed to LINEAR16, audio won't be wrapped in a WAV (or any other) header.
*/
public const AUDIO_ENCODING_PCM = 'PCM';
/**
* M4A audio.
*/
public const AUDIO_ENCODING_M4A = 'M4A';
protected $collection_key = 'effectsProfileId';
/**
* Required. The format of the audio byte stream.
*
* @var string
*/
public $audioEncoding;
/**
* Optional. Input only. An identifier which selects 'audio effects' profiles
* that are applied on (post synthesized) text to speech. Effects are applied
* on top of each other in the order they are given. See [audio
* profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for
* current supported profile ids.
*
* @var string[]
*/
public $effectsProfileId;
/**
* Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means
* increase 20 semitones from the original pitch. -20 means decrease 20
* semitones from the original pitch.
*
* @var
*/
public $pitch;
/**
* Optional. The synthesis sample rate (in hertz) for this audio. When this is
* specified in SynthesizeSpeechRequest, if this is different from the voice's
* natural sample rate, then the synthesizer will honor this request by
* converting to the desired sample rate (which might result in worse audio
* quality), unless the specified sample rate is not supported for the
* encoding chosen, in which case it will fail the request and return
* google.rpc.Code.INVALID_ARGUMENT.
*
* @var int
*/
public $sampleRateHertz;
/**
* Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is
* the normal native speed supported by the specific voice. 2.0 is twice as
* fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0
* speed. Any other values < 0.25 or > 2.0 will return an error.
*
* @var
*/
public $speakingRate;
/**
* Optional. Input only. Volume gain (in dB) of the normal native volume
* supported by the specific voice, in the range [-96.0, 16.0]. If unset, or
* set to a value of 0.0 (dB), will play at normal native signal amplitude. A
* value of -6.0 (dB) will play at approximately half the amplitude of the
* normal native signal amplitude. A value of +6.0 (dB) will play at
* approximately twice the amplitude of the normal native signal amplitude.
* Strongly recommend not to exceed +10 (dB) as there's usually no effective
* increase in loudness for any value greater than that.
*
* @var
*/
public $volumeGainDb;
/**
* Required. The format of the audio byte stream.
*
* Accepted values: AUDIO_ENCODING_UNSPECIFIED, LINEAR16, MP3, OGG_OPUS,
* MULAW, ALAW, PCM, M4A
*
* @param self::AUDIO_ENCODING_* $audioEncoding
*/
public function setAudioEncoding($audioEncoding)
{
$this->audioEncoding = $audioEncoding;
}
/**
* @return self::AUDIO_ENCODING_*
*/
public function getAudioEncoding()
{
return $this->audioEncoding;
}
/**
* Optional. Input only. An identifier which selects 'audio effects' profiles
* that are applied on (post synthesized) text to speech. Effects are applied
* on top of each other in the order they are given. See [audio
* profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for
* current supported profile ids.
*
* @param string[] $effectsProfileId
*/
public function setEffectsProfileId($effectsProfileId)
{
$this->effectsProfileId = $effectsProfileId;
}
/**
* @return string[]
*/
public function getEffectsProfileId()
{
return $this->effectsProfileId;
}
public function setPitch($pitch)
{
$this->pitch = $pitch;
}
public function getPitch()
{
return $this->pitch;
}
/**
* Optional. The synthesis sample rate (in hertz) for this audio. When this is
* specified in SynthesizeSpeechRequest, if this is different from the voice's
* natural sample rate, then the synthesizer will honor this request by
* converting to the desired sample rate (which might result in worse audio
* quality), unless the specified sample rate is not supported for the
* encoding chosen, in which case it will fail the request and return
* google.rpc.Code.INVALID_ARGUMENT.
*
* @param int $sampleRateHertz
*/
public function setSampleRateHertz($sampleRateHertz)
{
$this->sampleRateHertz = $sampleRateHertz;
}
/**
* @return int
*/
public function getSampleRateHertz()
{
return $this->sampleRateHertz;
}
public function setSpeakingRate($speakingRate)
{
$this->speakingRate = $speakingRate;
}
public function getSpeakingRate()
{
return $this->speakingRate;
}
public function setVolumeGainDb($volumeGainDb)
{
$this->volumeGainDb = $volumeGainDb;
}
public function getVolumeGainDb()
{
return $this->volumeGainDb;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AudioConfig::class, 'Google_Service_Texttospeech_AudioConfig');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class CancelOperationRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CancelOperationRequest::class, 'Google_Service_Texttospeech_CancelOperationRequest');
@@ -0,0 +1,133 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class CustomPronunciationParams extends \Google\Model
{
/**
* Not specified.
*/
public const PHONETIC_ENCODING_PHONETIC_ENCODING_UNSPECIFIED = 'PHONETIC_ENCODING_UNSPECIFIED';
/**
* IPA, such as apple -> ˈæpəl.
* https://en.wikipedia.org/wiki/International_Phonetic_Alphabet
*/
public const PHONETIC_ENCODING_PHONETIC_ENCODING_IPA = 'PHONETIC_ENCODING_IPA';
/**
* X-SAMPA, such as apple -> "{p@l". https://en.wikipedia.org/wiki/X-SAMPA
*/
public const PHONETIC_ENCODING_PHONETIC_ENCODING_X_SAMPA = 'PHONETIC_ENCODING_X_SAMPA';
/**
* For reading-to-pron conversion to work well, the `pronunciation` field
* should only contain Kanji, Hiragana, and Katakana. The pronunciation can
* also contain pitch accents. The start of a pitch phrase is specified with
* `^` and the down-pitch position is specified with `!`, for example:
* phrase:端 pronunciation:^はし phrase:箸 pronunciation:^は!し phrase:橋
* pronunciation:^はし! We currently only support the Tokyo dialect, which
* allows at most one down-pitch per phrase (i.e. at most one `!` between
* `^`).
*/
public const PHONETIC_ENCODING_PHONETIC_ENCODING_JAPANESE_YOMIGANA = 'PHONETIC_ENCODING_JAPANESE_YOMIGANA';
/**
* Used to specify pronunciations for Mandarin words. See
* https://en.wikipedia.org/wiki/Pinyin. For example: 朝阳, the pronunciation is
* "chao2 yang2". The number represents the tone, and there is a space between
* syllables. Neutral tones are represented by 5, for example 孩子 "hai2 zi5".
*/
public const PHONETIC_ENCODING_PHONETIC_ENCODING_PINYIN = 'PHONETIC_ENCODING_PINYIN';
/**
* The phonetic encoding of the phrase.
*
* @var string
*/
public $phoneticEncoding;
/**
* The phrase to which the customization is applied. The phrase can be
* multiple words, such as proper nouns, but shouldn't span the length of the
* sentence.
*
* @var string
*/
public $phrase;
/**
* The pronunciation of the phrase. This must be in the phonetic encoding
* specified above.
*
* @var string
*/
public $pronunciation;
/**
* The phonetic encoding of the phrase.
*
* Accepted values: PHONETIC_ENCODING_UNSPECIFIED, PHONETIC_ENCODING_IPA,
* PHONETIC_ENCODING_X_SAMPA, PHONETIC_ENCODING_JAPANESE_YOMIGANA,
* PHONETIC_ENCODING_PINYIN
*
* @param self::PHONETIC_ENCODING_* $phoneticEncoding
*/
public function setPhoneticEncoding($phoneticEncoding)
{
$this->phoneticEncoding = $phoneticEncoding;
}
/**
* @return self::PHONETIC_ENCODING_*
*/
public function getPhoneticEncoding()
{
return $this->phoneticEncoding;
}
/**
* The phrase to which the customization is applied. The phrase can be
* multiple words, such as proper nouns, but shouldn't span the length of the
* sentence.
*
* @param string $phrase
*/
public function setPhrase($phrase)
{
$this->phrase = $phrase;
}
/**
* @return string
*/
public function getPhrase()
{
return $this->phrase;
}
/**
* The pronunciation of the phrase. This must be in the phonetic encoding
* specified above.
*
* @param string $pronunciation
*/
public function setPronunciation($pronunciation)
{
$this->pronunciation = $pronunciation;
}
/**
* @return string
*/
public function getPronunciation()
{
return $this->pronunciation;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CustomPronunciationParams::class, 'Google_Service_Texttospeech_CustomPronunciationParams');
@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class CustomPronunciations extends \Google\Collection
{
protected $collection_key = 'pronunciations';
protected $pronunciationsType = CustomPronunciationParams::class;
protected $pronunciationsDataType = 'array';
/**
* The pronunciation customizations are applied.
*
* @param CustomPronunciationParams[] $pronunciations
*/
public function setPronunciations($pronunciations)
{
$this->pronunciations = $pronunciations;
}
/**
* @return CustomPronunciationParams[]
*/
public function getPronunciations()
{
return $this->pronunciations;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CustomPronunciations::class, 'Google_Service_Texttospeech_CustomPronunciations');
@@ -0,0 +1,90 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class CustomVoiceParams extends \Google\Model
{
/**
* Request with reported usage unspecified will be rejected.
*/
public const REPORTED_USAGE_REPORTED_USAGE_UNSPECIFIED = 'REPORTED_USAGE_UNSPECIFIED';
/**
* For scenarios where the synthesized audio is not downloadable and can only
* be used once. For example, real-time request in IVR system.
*/
public const REPORTED_USAGE_REALTIME = 'REALTIME';
/**
* For scenarios where the synthesized audio is downloadable and can be
* reused. For example, the synthesized audio is downloaded, stored in
* customer service system and played repeatedly.
*/
public const REPORTED_USAGE_OFFLINE = 'OFFLINE';
/**
* Required. The name of the AutoML model that synthesizes the custom voice.
*
* @var string
*/
public $model;
/**
* Optional. Deprecated. The usage of the synthesized audio to be reported.
*
* @deprecated
* @var string
*/
public $reportedUsage;
/**
* Required. The name of the AutoML model that synthesizes the custom voice.
*
* @param string $model
*/
public function setModel($model)
{
$this->model = $model;
}
/**
* @return string
*/
public function getModel()
{
return $this->model;
}
/**
* Optional. Deprecated. The usage of the synthesized audio to be reported.
*
* Accepted values: REPORTED_USAGE_UNSPECIFIED, REALTIME, OFFLINE
*
* @deprecated
* @param self::REPORTED_USAGE_* $reportedUsage
*/
public function setReportedUsage($reportedUsage)
{
$this->reportedUsage = $reportedUsage;
}
/**
* @deprecated
* @return self::REPORTED_USAGE_*
*/
public function getReportedUsage()
{
return $this->reportedUsage;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CustomVoiceParams::class, 'Google_Service_Texttospeech_CustomVoiceParams');
@@ -0,0 +1,94 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class GenerateVoiceCloningKeyRequest extends \Google\Model
{
/**
* @var string
*/
public $consentScript;
/**
* @var string
*/
public $languageCode;
protected $referenceAudioType = InputAudio::class;
protected $referenceAudioDataType = '';
protected $voiceTalentConsentType = InputAudio::class;
protected $voiceTalentConsentDataType = '';
/**
* @param string
*/
public function setConsentScript($consentScript)
{
$this->consentScript = $consentScript;
}
/**
* @return string
*/
public function getConsentScript()
{
return $this->consentScript;
}
/**
* @param string
*/
public function setLanguageCode($languageCode)
{
$this->languageCode = $languageCode;
}
/**
* @return string
*/
public function getLanguageCode()
{
return $this->languageCode;
}
/**
* @param InputAudio
*/
public function setReferenceAudio(InputAudio $referenceAudio)
{
$this->referenceAudio = $referenceAudio;
}
/**
* @return InputAudio
*/
public function getReferenceAudio()
{
return $this->referenceAudio;
}
/**
* @param InputAudio
*/
public function setVoiceTalentConsent(InputAudio $voiceTalentConsent)
{
$this->voiceTalentConsent = $voiceTalentConsent;
}
/**
* @return InputAudio
*/
public function getVoiceTalentConsent()
{
return $this->voiceTalentConsent;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GenerateVoiceCloningKeyRequest::class, 'Google_Service_Texttospeech_GenerateVoiceCloningKeyRequest');
@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class GenerateVoiceCloningKeyResponse extends \Google\Model
{
/**
* @var string
*/
public $voiceCloningKey;
/**
* @param string
*/
public function setVoiceCloningKey($voiceCloningKey)
{
$this->voiceCloningKey = $voiceCloningKey;
}
/**
* @return string
*/
public function getVoiceCloningKey()
{
return $this->voiceCloningKey;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GenerateVoiceCloningKeyResponse::class, 'Google_Service_Texttospeech_GenerateVoiceCloningKeyResponse');
@@ -0,0 +1,87 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata extends \Google\Model
{
/**
* Deprecated. Do not use.
*
* @deprecated
* @var string
*/
public $lastUpdateTime;
/**
* The progress of the most recent processing update in percentage, ie. 70.0%.
*
* @var
*/
public $progressPercentage;
/**
* Time when the request was received.
*
* @var string
*/
public $startTime;
/**
* Deprecated. Do not use.
*
* @deprecated
* @param string $lastUpdateTime
*/
public function setLastUpdateTime($lastUpdateTime)
{
$this->lastUpdateTime = $lastUpdateTime;
}
/**
* @deprecated
* @return string
*/
public function getLastUpdateTime()
{
return $this->lastUpdateTime;
}
public function setProgressPercentage($progressPercentage)
{
$this->progressPercentage = $progressPercentage;
}
public function getProgressPercentage()
{
return $this->progressPercentage;
}
/**
* Time when the request was received.
*
* @param string $startTime
*/
public function setStartTime($startTime)
{
$this->startTime = $startTime;
}
/**
* @return string
*/
public function getStartTime()
{
return $this->startTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata::class, 'Google_Service_Texttospeech_GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata');
@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class ImportDataRequest extends \Google\Model
{
/**
* @var string
*/
public $csvCloudStorageUri;
/**
* @param string
*/
public function setCsvCloudStorageUri($csvCloudStorageUri)
{
$this->csvCloudStorageUri = $csvCloudStorageUri;
}
/**
* @return string
*/
public function getCsvCloudStorageUri()
{
return $this->csvCloudStorageUri;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ImportDataRequest::class, 'Google_Service_Texttospeech_ImportDataRequest');
@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class InputAudio extends \Google\Model
{
protected $audioConfigType = InputAudioConfig::class;
protected $audioConfigDataType = '';
/**
* @var string
*/
public $content;
/**
* @param InputAudioConfig
*/
public function setAudioConfig(InputAudioConfig $audioConfig)
{
$this->audioConfig = $audioConfig;
}
/**
* @return InputAudioConfig
*/
public function getAudioConfig()
{
return $this->audioConfig;
}
/**
* @param string
*/
public function setContent($content)
{
$this->content = $content;
}
/**
* @return string
*/
public function getContent()
{
return $this->content;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InputAudio::class, 'Google_Service_Texttospeech_InputAudio');
@@ -0,0 +1,62 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class InputAudioConfig extends \Google\Model
{
/**
* @var string
*/
public $audioEncoding;
/**
* @var int
*/
public $sampleRateHertz;
/**
* @param string
*/
public function setAudioEncoding($audioEncoding)
{
$this->audioEncoding = $audioEncoding;
}
/**
* @return string
*/
public function getAudioEncoding()
{
return $this->audioEncoding;
}
/**
* @param int
*/
public function setSampleRateHertz($sampleRateHertz)
{
$this->sampleRateHertz = $sampleRateHertz;
}
/**
* @return int
*/
public function getSampleRateHertz()
{
return $this->sampleRateHertz;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InputAudioConfig::class, 'Google_Service_Texttospeech_InputAudioConfig');
@@ -0,0 +1,95 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class ListOperationsResponse extends \Google\Collection
{
protected $collection_key = 'unreachable';
/**
* The standard List next-page token.
*
* @var string
*/
public $nextPageToken;
protected $operationsType = Operation::class;
protected $operationsDataType = 'array';
/**
* Unordered list. Unreachable resources. Populated when the request sets
* `ListOperationsRequest.return_partial_success` and reads across
* collections. For example, when attempting to list all resources across all
* supported locations.
*
* @var string[]
*/
public $unreachable;
/**
* The standard List next-page token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* A list of operations that matches the specified filter in the request.
*
* @param Operation[] $operations
*/
public function setOperations($operations)
{
$this->operations = $operations;
}
/**
* @return Operation[]
*/
public function getOperations()
{
return $this->operations;
}
/**
* Unordered list. Unreachable resources. Populated when the request sets
* `ListOperationsRequest.return_partial_success` and reads across
* collections. For example, when attempting to list all resources across all
* supported locations.
*
* @param string[] $unreachable
*/
public function setUnreachable($unreachable)
{
$this->unreachable = $unreachable;
}
/**
* @return string[]
*/
public function getUnreachable()
{
return $this->unreachable;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListOperationsResponse::class, 'Google_Service_Texttospeech_ListOperationsResponse');
@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class ListVoicesResponse extends \Google\Collection
{
protected $collection_key = 'voices';
protected $voicesType = Voice::class;
protected $voicesDataType = 'array';
/**
* The list of voices.
*
* @param Voice[] $voices
*/
public function setVoices($voices)
{
$this->voices = $voices;
}
/**
* @return Voice[]
*/
public function getVoices()
{
return $this->voices;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListVoicesResponse::class, 'Google_Service_Texttospeech_ListVoicesResponse');
@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class MultiSpeakerMarkup extends \Google\Collection
{
protected $collection_key = 'turns';
protected $turnsType = Turn::class;
protected $turnsDataType = 'array';
/**
* Required. Speaker turns.
*
* @param Turn[] $turns
*/
public function setTurns($turns)
{
$this->turns = $turns;
}
/**
* @return Turn[]
*/
public function getTurns()
{
return $this->turns;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MultiSpeakerMarkup::class, 'Google_Service_Texttospeech_MultiSpeakerMarkup');
@@ -0,0 +1,46 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class MultiSpeakerVoiceConfig extends \Google\Collection
{
protected $collection_key = 'speakerVoiceConfigs';
protected $speakerVoiceConfigsType = MultispeakerPrebuiltVoice::class;
protected $speakerVoiceConfigsDataType = 'array';
/**
* Required. A list of configurations for the voices of the speakers. Exactly
* two speaker voice configurations must be provided.
*
* @param MultispeakerPrebuiltVoice[] $speakerVoiceConfigs
*/
public function setSpeakerVoiceConfigs($speakerVoiceConfigs)
{
$this->speakerVoiceConfigs = $speakerVoiceConfigs;
}
/**
* @return MultispeakerPrebuiltVoice[]
*/
public function getSpeakerVoiceConfigs()
{
return $this->speakerVoiceConfigs;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MultiSpeakerVoiceConfig::class, 'Google_Service_Texttospeech_MultiSpeakerVoiceConfig');
@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class MultispeakerPrebuiltVoice extends \Google\Model
{
/**
* Required. The speaker alias of the voice. This is the user-chosen speaker
* name that is used in the multispeaker text input, such as "Speaker1".
*
* @var string
*/
public $speakerAlias;
/**
* Required. The speaker ID of the voice. See https://cloud.google.com/text-
* to-speech/docs/gemini-tts#voice_options for available values.
*
* @var string
*/
public $speakerId;
/**
* Required. The speaker alias of the voice. This is the user-chosen speaker
* name that is used in the multispeaker text input, such as "Speaker1".
*
* @param string $speakerAlias
*/
public function setSpeakerAlias($speakerAlias)
{
$this->speakerAlias = $speakerAlias;
}
/**
* @return string
*/
public function getSpeakerAlias()
{
return $this->speakerAlias;
}
/**
* Required. The speaker ID of the voice. See https://cloud.google.com/text-
* to-speech/docs/gemini-tts#voice_options for available values.
*
* @param string $speakerId
*/
public function setSpeakerId($speakerId)
{
$this->speakerId = $speakerId;
}
/**
* @return string
*/
public function getSpeakerId()
{
return $this->speakerId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MultispeakerPrebuiltVoice::class, 'Google_Service_Texttospeech_MultispeakerPrebuiltVoice');
@@ -0,0 +1,158 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class Operation extends \Google\Model
{
/**
* If the value is `false`, it means the operation is still in progress. If
* `true`, the operation is completed, and either `error` or `response` is
* available.
*
* @var bool
*/
public $done;
protected $errorType = Status::class;
protected $errorDataType = '';
/**
* Service-specific metadata associated with the operation. It typically
* contains progress information and common metadata such as create time. Some
* services might not provide such metadata. Any method that returns a long-
* running operation should document the metadata type, if any.
*
* @var array[]
*/
public $metadata;
/**
* The server-assigned name, which is only unique within the same service that
* originally returns it. If you use the default HTTP mapping, the `name`
* should be a resource name ending with `operations/{unique_id}`.
*
* @var string
*/
public $name;
/**
* The normal, successful response of the operation. If the original method
* returns no data on success, such as `Delete`, the response is
* `google.protobuf.Empty`. If the original method is standard
* `Get`/`Create`/`Update`, the response should be the resource. For other
* methods, the response should have the type `XxxResponse`, where `Xxx` is
* the original method name. For example, if the original method name is
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*
* @var array[]
*/
public $response;
/**
* If the value is `false`, it means the operation is still in progress. If
* `true`, the operation is completed, and either `error` or `response` is
* available.
*
* @param bool $done
*/
public function setDone($done)
{
$this->done = $done;
}
/**
* @return bool
*/
public function getDone()
{
return $this->done;
}
/**
* The error result of the operation in case of failure or cancellation.
*
* @param Status $error
*/
public function setError(Status $error)
{
$this->error = $error;
}
/**
* @return Status
*/
public function getError()
{
return $this->error;
}
/**
* Service-specific metadata associated with the operation. It typically
* contains progress information and common metadata such as create time. Some
* services might not provide such metadata. Any method that returns a long-
* running operation should document the metadata type, if any.
*
* @param array[] $metadata
*/
public function setMetadata($metadata)
{
$this->metadata = $metadata;
}
/**
* @return array[]
*/
public function getMetadata()
{
return $this->metadata;
}
/**
* The server-assigned name, which is only unique within the same service that
* originally returns it. If you use the default HTTP mapping, the `name`
* should be a resource name ending with `operations/{unique_id}`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The normal, successful response of the operation. If the original method
* returns no data on success, such as `Delete`, the response is
* `google.protobuf.Empty`. If the original method is standard
* `Get`/`Create`/`Update`, the response should be the resource. For other
* methods, the response should have the type `XxxResponse`, where `Xxx` is
* the original method name. For example, if the original method name is
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*
* @param array[] $response
*/
public function setResponse($response)
{
$this->response = $response;
}
/**
* @return array[]
*/
public function getResponse()
{
return $this->response;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Operation::class, 'Google_Service_Texttospeech_Operation');
@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech\Resource;
use Google\Service\Texttospeech\CancelOperationRequest;
use Google\Service\Texttospeech\TexttospeechEmpty;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $texttospeechService = new Google\Service\Texttospeech(...);
* $operations = $texttospeechService->operations;
* </code>
*/
class Operations extends \Google\Service\Resource
{
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not guaranteed.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation, the
* operation is not deleted; instead, it becomes an operation with an
* Operation.error value with a google.rpc.Status.code of `1`, corresponding to
* `Code.CANCELLED`. (operations.cancel)
*
* @param string $name The name of the operation resource to be cancelled.
* @param CancelOperationRequest $postBody
* @param array $optParams Optional parameters.
* @return TexttospeechEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, CancelOperationRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], TexttospeechEmpty::class);
}
/**
* Deletes a long-running operation. This method indicates that the client is no
* longer interested in the operation result. It does not cancel the operation.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. (operations.delete)
*
* @param string $name The name of the operation resource to be deleted.
* @param array $optParams Optional parameters.
* @return TexttospeechEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], TexttospeechEmpty::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Operations::class, 'Google_Service_Texttospeech_Resource_Operations');
@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $texttospeechService = new Google\Service\Texttospeech(...);
* $projects = $texttospeechService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_Texttospeech_Resource_Projects');
@@ -0,0 +1,52 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech\Resource;
use Google\Service\Texttospeech\Operation;
use Google\Service\Texttospeech\SynthesizeLongAudioRequest;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $texttospeechService = new Google\Service\Texttospeech(...);
* $locations = $texttospeechService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
/**
* Synthesizes long form text asynchronously. (locations.synthesizeLongAudio)
*
* @param string $parent The resource states of the request in the form of
* `projects/locations`.
* @param SynthesizeLongAudioRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function synthesizeLongAudio($parent, SynthesizeLongAudioRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('synthesizeLongAudio', [$params], Operation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocations::class, 'Google_Service_Texttospeech_Resource_ProjectsLocations');
@@ -0,0 +1,51 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech\Resource;
use Google\Service\Texttospeech\ImportDataRequest;
use Google\Service\Texttospeech\Operation;
/**
* The "datasets" collection of methods.
* Typical usage is:
* <code>
* $texttospeechService = new Google\Service\Texttospeech(...);
* $datasets = $texttospeechService->datasets;
* </code>
*/
class ProjectsLocationsDatasets extends \Google\Service\Resource
{
/**
* Imports audio+text data for training custom voice. (datasets.import)
*
* @param string $name The name of the Dataset resource. Format:
* `projects/{project}/locations/{location}/datasets/{dataset}`
* @param ImportDataRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
*/
public function import($name, ImportDataRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('import', [$params], Operation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsDatasets::class, 'Google_Service_Texttospeech_Resource_ProjectsLocationsDatasets');
@@ -0,0 +1,79 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech\Resource;
use Google\Service\Texttospeech\ListOperationsResponse;
use Google\Service\Texttospeech\Operation;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $texttospeechService = new Google\Service\Texttospeech(...);
* $operations = $texttospeechService->projects_locations_operations;
* </code>
*/
class ProjectsLocationsOperations extends \Google\Service\Resource
{
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service. (operations.get)
*
* @param string $name The name of the operation resource.
* @param array $optParams Optional parameters.
* @return Operation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Operation::class);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* (operations.listProjectsLocationsOperations)
*
* @param string $name The name of the operation's parent resource.
* @param array $optParams Optional parameters.
*
* @opt_param string filter The standard list filter.
* @opt_param int pageSize The standard list page size.
* @opt_param string pageToken The standard list page token.
* @opt_param bool returnPartialSuccess When set to `true`, operations that are
* reachable are returned as normal, and those that are unreachable are returned
* in the ListOperationsResponse.unreachable field. This can only be `true` when
* reading across collections. For example, when `parent` is set to
* `"projects/example/locations/-"`. This field is not supported by default and
* will result in an `UNIMPLEMENTED` error if set unless explicitly documented
* otherwise in service or product specific documentation.
* @return ListOperationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsOperations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListOperationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsOperations::class, 'Google_Service_Texttospeech_Resource_ProjectsLocationsOperations');
@@ -0,0 +1,51 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech\Resource;
use Google\Service\Texttospeech\Operation;
use Google\Service\Texttospeech\SynthesizeLongAudioRequest;
/**
* The "voices" collection of methods.
* Typical usage is:
* <code>
* $texttospeechService = new Google\Service\Texttospeech(...);
* $voices = $texttospeechService->voices;
* </code>
*/
class ProjectsLocationsVoices extends \Google\Service\Resource
{
/**
* Synthesizes long form text asynchronously. (voices.synthesizeLongAudio)
*
* @param string $parent The resource states of the request in the form of
* projects/locations/voices.
* @param SynthesizeLongAudioRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
*/
public function synthesizeLongAudio($parent, SynthesizeLongAudioRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('synthesizeLongAudio', [$params], Operation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsVoices::class, 'Google_Service_Texttospeech_Resource_ProjectsLocationsVoices');
@@ -0,0 +1,51 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech\Resource;
use Google\Service\Texttospeech\SynthesizeSpeechRequest;
use Google\Service\Texttospeech\SynthesizeSpeechResponse;
/**
* The "text" collection of methods.
* Typical usage is:
* <code>
* $texttospeechService = new Google\Service\Texttospeech(...);
* $text = $texttospeechService->text;
* </code>
*/
class Text extends \Google\Service\Resource
{
/**
* Synthesizes speech synchronously: receive results after all text input has
* been processed. (text.synthesize)
*
* @param SynthesizeSpeechRequest $postBody
* @param array $optParams Optional parameters.
* @return SynthesizeSpeechResponse
* @throws \Google\Service\Exception
*/
public function synthesize(SynthesizeSpeechRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('synthesize', [$params], SynthesizeSpeechResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Text::class, 'Google_Service_Texttospeech_Resource_Text');
@@ -0,0 +1,56 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech\Resource;
use Google\Service\Texttospeech\ListVoicesResponse;
/**
* The "voices" collection of methods.
* Typical usage is:
* <code>
* $texttospeechService = new Google\Service\Texttospeech(...);
* $voices = $texttospeechService->voices;
* </code>
*/
class Voices extends \Google\Service\Resource
{
/**
* Returns a list of Voice supported for synthesis. (voices.listVoices)
*
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode Optional. Recommended.
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If not
* specified, the API will return all supported voices. If specified, the
* ListVoices call will only return voices that can be used to synthesize this
* language_code. For example, if you specify `"en-NZ"`, all `"en-NZ"` voices
* will be returned. If you specify `"no"`, both `"no-"` (Norwegian) and `"nb-"`
* (Norwegian Bokmal) voices will be returned.
* @return ListVoicesResponse
* @throws \Google\Service\Exception
*/
public function listVoices($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListVoicesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Voices::class, 'Google_Service_Texttospeech_Resource_Voices');
@@ -0,0 +1,122 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class SafetySetting extends \Google\Model
{
/**
* Default value. This value is unused.
*/
public const CATEGORY_HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED';
/**
* Content that promotes violence or incites hatred against individuals or
* groups based on certain attributes.
*/
public const CATEGORY_HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH';
/**
* Content that promotes, facilitates, or enables dangerous activities.
*/
public const CATEGORY_HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT';
/**
* Abusive, threatening, or content intended to bully, torment, or ridicule.
*/
public const CATEGORY_HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT';
/**
* Content that contains sexually explicit material.
*/
public const CATEGORY_HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT';
/**
* The harm block threshold is unspecified.
*/
public const THRESHOLD_HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED';
/**
* Block content with a low harm probability or higher.
*/
public const THRESHOLD_BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE';
/**
* Block content with a medium harm probability or higher.
*/
public const THRESHOLD_BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE';
/**
* Block content with a high harm probability.
*/
public const THRESHOLD_BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH';
/**
* Do not block any content, regardless of its harm probability.
*/
public const THRESHOLD_BLOCK_NONE = 'BLOCK_NONE';
/**
* Turn off the safety filter entirely.
*/
public const THRESHOLD_OFF = 'OFF';
/**
* The harm category to apply the safety setting to.
*
* @var string
*/
public $category;
/**
* The harm block threshold for the safety setting.
*
* @var string
*/
public $threshold;
/**
* The harm category to apply the safety setting to.
*
* Accepted values: HARM_CATEGORY_UNSPECIFIED, HARM_CATEGORY_HATE_SPEECH,
* HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT,
* HARM_CATEGORY_SEXUALLY_EXPLICIT
*
* @param self::CATEGORY_* $category
*/
public function setCategory($category)
{
$this->category = $category;
}
/**
* @return self::CATEGORY_*
*/
public function getCategory()
{
return $this->category;
}
/**
* The harm block threshold for the safety setting.
*
* Accepted values: HARM_BLOCK_THRESHOLD_UNSPECIFIED, BLOCK_LOW_AND_ABOVE,
* BLOCK_MEDIUM_AND_ABOVE, BLOCK_ONLY_HIGH, BLOCK_NONE, OFF
*
* @param self::THRESHOLD_* $threshold
*/
public function setThreshold($threshold)
{
$this->threshold = $threshold;
}
/**
* @return self::THRESHOLD_*
*/
public function getThreshold()
{
return $this->threshold;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SafetySetting::class, 'Google_Service_Texttospeech_SafetySetting');
@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class SafetySettings extends \Google\Collection
{
protected $collection_key = 'settings';
protected $settingsType = SafetySetting::class;
protected $settingsDataType = 'array';
/**
* The safety settings for the request.
*
* @param SafetySetting[] $settings
*/
public function setSettings($settings)
{
$this->settings = $settings;
}
/**
* @return SafetySetting[]
*/
public function getSettings()
{
return $this->settings;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SafetySettings::class, 'Google_Service_Texttospeech_SafetySettings');
@@ -0,0 +1,99 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class Status extends \Google\Collection
{
protected $collection_key = 'details';
/**
* The status code, which should be an enum value of google.rpc.Code.
*
* @var int
*/
public $code;
/**
* A list of messages that carry the error details. There is a common set of
* message types for APIs to use.
*
* @var array[]
*/
public $details;
/**
* A developer-facing error message, which should be in English. Any user-
* facing error message should be localized and sent in the
* google.rpc.Status.details field, or localized by the client.
*
* @var string
*/
public $message;
/**
* The status code, which should be an enum value of google.rpc.Code.
*
* @param int $code
*/
public function setCode($code)
{
$this->code = $code;
}
/**
* @return int
*/
public function getCode()
{
return $this->code;
}
/**
* A list of messages that carry the error details. There is a common set of
* message types for APIs to use.
*
* @param array[] $details
*/
public function setDetails($details)
{
$this->details = $details;
}
/**
* @return array[]
*/
public function getDetails()
{
return $this->details;
}
/**
* A developer-facing error message, which should be in English. Any user-
* facing error message should be localized and sent in the
* google.rpc.Status.details field, or localized by the client.
*
* @param string $message
*/
public function setMessage($message)
{
$this->message = $message;
}
/**
* @return string
*/
public function getMessage()
{
return $this->message;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Status::class, 'Google_Service_Texttospeech_Status');
@@ -0,0 +1,171 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class SynthesisInput extends \Google\Model
{
protected $customPronunciationsType = CustomPronunciations::class;
protected $customPronunciationsDataType = '';
/**
* Markup for Chirp 3: HD voices specifically. This field may not be used with
* any other voices.
*
* @var string
*/
public $markup;
protected $multiSpeakerMarkupType = MultiSpeakerMarkup::class;
protected $multiSpeakerMarkupDataType = '';
/**
* This system instruction is supported only for controllable/promptable voice
* models. If this system instruction is used, we pass the unedited text to
* Gemini-TTS. Otherwise, a default system instruction is used. AI Studio
* calls this system instruction, Style Instructions.
*
* @var string
*/
public $prompt;
/**
* The SSML document to be synthesized. The SSML document must be valid and
* well-formed. Otherwise the RPC will fail and return
* google.rpc.Code.INVALID_ARGUMENT. For more information, see
* [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
*
* @var string
*/
public $ssml;
/**
* The raw text to be synthesized.
*
* @var string
*/
public $text;
/**
* Optional. The pronunciation customizations are applied to the input. If
* this is set, the input is synthesized using the given pronunciation
* customizations. The initial support is for en-us, with plans to expand to
* other locales in the future. Instant Clone voices aren't supported. In
* order to customize the pronunciation of a phrase, there must be an exact
* match of the phrase in the input types. If using SSML, the phrase must not
* be inside a phoneme tag.
*
* @param CustomPronunciations $customPronunciations
*/
public function setCustomPronunciations(CustomPronunciations $customPronunciations)
{
$this->customPronunciations = $customPronunciations;
}
/**
* @return CustomPronunciations
*/
public function getCustomPronunciations()
{
return $this->customPronunciations;
}
/**
* Markup for Chirp 3: HD voices specifically. This field may not be used with
* any other voices.
*
* @param string $markup
*/
public function setMarkup($markup)
{
$this->markup = $markup;
}
/**
* @return string
*/
public function getMarkup()
{
return $this->markup;
}
/**
* The multi-speaker input to be synthesized. Only applicable for multi-
* speaker synthesis.
*
* @param MultiSpeakerMarkup $multiSpeakerMarkup
*/
public function setMultiSpeakerMarkup(MultiSpeakerMarkup $multiSpeakerMarkup)
{
$this->multiSpeakerMarkup = $multiSpeakerMarkup;
}
/**
* @return MultiSpeakerMarkup
*/
public function getMultiSpeakerMarkup()
{
return $this->multiSpeakerMarkup;
}
/**
* This system instruction is supported only for controllable/promptable voice
* models. If this system instruction is used, we pass the unedited text to
* Gemini-TTS. Otherwise, a default system instruction is used. AI Studio
* calls this system instruction, Style Instructions.
*
* @param string $prompt
*/
public function setPrompt($prompt)
{
$this->prompt = $prompt;
}
/**
* @return string
*/
public function getPrompt()
{
return $this->prompt;
}
/**
* The SSML document to be synthesized. The SSML document must be valid and
* well-formed. Otherwise the RPC will fail and return
* google.rpc.Code.INVALID_ARGUMENT. For more information, see
* [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
*
* @param string $ssml
*/
public function setSsml($ssml)
{
$this->ssml = $ssml;
}
/**
* @return string
*/
public function getSsml()
{
return $this->ssml;
}
/**
* The raw text to be synthesized.
*
* @param string $text
*/
public function setText($text)
{
$this->text = $text;
}
/**
* @return string
*/
public function getText()
{
return $this->text;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SynthesisInput::class, 'Google_Service_Texttospeech_SynthesisInput');
@@ -0,0 +1,87 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class SynthesizeLongAudioMetadata extends \Google\Model
{
/**
* Deprecated. Do not use.
*
* @deprecated
* @var string
*/
public $lastUpdateTime;
/**
* The progress of the most recent processing update in percentage, ie. 70.0%.
*
* @var
*/
public $progressPercentage;
/**
* Time when the request was received.
*
* @var string
*/
public $startTime;
/**
* Deprecated. Do not use.
*
* @deprecated
* @param string $lastUpdateTime
*/
public function setLastUpdateTime($lastUpdateTime)
{
$this->lastUpdateTime = $lastUpdateTime;
}
/**
* @deprecated
* @return string
*/
public function getLastUpdateTime()
{
return $this->lastUpdateTime;
}
public function setProgressPercentage($progressPercentage)
{
$this->progressPercentage = $progressPercentage;
}
public function getProgressPercentage()
{
return $this->progressPercentage;
}
/**
* Time when the request was received.
*
* @param string $startTime
*/
public function setStartTime($startTime)
{
$this->startTime = $startTime;
}
/**
* @return string
*/
public function getStartTime()
{
return $this->startTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SynthesizeLongAudioMetadata::class, 'Google_Service_Texttospeech_SynthesizeLongAudioMetadata');
@@ -0,0 +1,106 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class SynthesizeLongAudioRequest extends \Google\Model
{
protected $audioConfigType = AudioConfig::class;
protected $audioConfigDataType = '';
protected $inputType = SynthesisInput::class;
protected $inputDataType = '';
/**
* Required. Specifies a Cloud Storage URI for the synthesis results. Must be
* specified in the format: `gs://bucket_name/object_name`, and the bucket
* must already exist.
*
* @var string
*/
public $outputGcsUri;
protected $voiceType = VoiceSelectionParams::class;
protected $voiceDataType = '';
/**
* Required. The configuration of the synthesized audio.
*
* @param AudioConfig $audioConfig
*/
public function setAudioConfig(AudioConfig $audioConfig)
{
$this->audioConfig = $audioConfig;
}
/**
* @return AudioConfig
*/
public function getAudioConfig()
{
return $this->audioConfig;
}
/**
* Required. The Synthesizer requires either plain text or SSML as input.
*
* @param SynthesisInput $input
*/
public function setInput(SynthesisInput $input)
{
$this->input = $input;
}
/**
* @return SynthesisInput
*/
public function getInput()
{
return $this->input;
}
/**
* Required. Specifies a Cloud Storage URI for the synthesis results. Must be
* specified in the format: `gs://bucket_name/object_name`, and the bucket
* must already exist.
*
* @param string $outputGcsUri
*/
public function setOutputGcsUri($outputGcsUri)
{
$this->outputGcsUri = $outputGcsUri;
}
/**
* @return string
*/
public function getOutputGcsUri()
{
return $this->outputGcsUri;
}
/**
* Required. The desired voice of the synthesized audio.
*
* @param VoiceSelectionParams $voice
*/
public function setVoice(VoiceSelectionParams $voice)
{
$this->voice = $voice;
}
/**
* @return VoiceSelectionParams
*/
public function getVoice()
{
return $this->voice;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SynthesizeLongAudioRequest::class, 'Google_Service_Texttospeech_SynthesizeLongAudioRequest');
@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class SynthesizeSpeechRequest extends \Google\Model
{
protected $advancedVoiceOptionsType = AdvancedVoiceOptions::class;
protected $advancedVoiceOptionsDataType = '';
protected $audioConfigType = AudioConfig::class;
protected $audioConfigDataType = '';
protected $inputType = SynthesisInput::class;
protected $inputDataType = '';
protected $voiceType = VoiceSelectionParams::class;
protected $voiceDataType = '';
/**
* Optional. Advanced voice options.
*
* @param AdvancedVoiceOptions $advancedVoiceOptions
*/
public function setAdvancedVoiceOptions(AdvancedVoiceOptions $advancedVoiceOptions)
{
$this->advancedVoiceOptions = $advancedVoiceOptions;
}
/**
* @return AdvancedVoiceOptions
*/
public function getAdvancedVoiceOptions()
{
return $this->advancedVoiceOptions;
}
/**
* Required. The configuration of the synthesized audio.
*
* @param AudioConfig $audioConfig
*/
public function setAudioConfig(AudioConfig $audioConfig)
{
$this->audioConfig = $audioConfig;
}
/**
* @return AudioConfig
*/
public function getAudioConfig()
{
return $this->audioConfig;
}
/**
* Required. The Synthesizer requires either plain text or SSML as input.
*
* @param SynthesisInput $input
*/
public function setInput(SynthesisInput $input)
{
$this->input = $input;
}
/**
* @return SynthesisInput
*/
public function getInput()
{
return $this->input;
}
/**
* Required. The desired voice of the synthesized audio.
*
* @param VoiceSelectionParams $voice
*/
public function setVoice(VoiceSelectionParams $voice)
{
$this->voice = $voice;
}
/**
* @return VoiceSelectionParams
*/
public function getVoice()
{
return $this->voice;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SynthesizeSpeechRequest::class, 'Google_Service_Texttospeech_SynthesizeSpeechRequest');
@@ -0,0 +1,56 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class SynthesizeSpeechResponse extends \Google\Model
{
/**
* The audio data bytes encoded as specified in the request, including the
* header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS).
* For LINEAR16 audio, we include the WAV header. Note: as with all bytes
* fields, protobuffers use a pure binary representation, whereas JSON
* representations use base64.
*
* @var string
*/
public $audioContent;
/**
* The audio data bytes encoded as specified in the request, including the
* header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS).
* For LINEAR16 audio, we include the WAV header. Note: as with all bytes
* fields, protobuffers use a pure binary representation, whereas JSON
* representations use base64.
*
* @param string $audioContent
*/
public function setAudioContent($audioContent)
{
$this->audioContent = $audioContent;
}
/**
* @return string
*/
public function getAudioContent()
{
return $this->audioContent;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SynthesizeSpeechResponse::class, 'Google_Service_Texttospeech_SynthesizeSpeechResponse');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class TexttospeechEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TexttospeechEmpty::class, 'Google_Service_Texttospeech_TexttospeechEmpty');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class Turn extends \Google\Model
{
/**
* Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer to
* documentation for available speakers.
*
* @var string
*/
public $speaker;
/**
* Required. The text to speak.
*
* @var string
*/
public $text;
/**
* Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer to
* documentation for available speakers.
*
* @param string $speaker
*/
public function setSpeaker($speaker)
{
$this->speaker = $speaker;
}
/**
* @return string
*/
public function getSpeaker()
{
return $this->speaker;
}
/**
* Required. The text to speak.
*
* @param string $text
*/
public function setText($text)
{
$this->text = $text;
}
/**
* @return string
*/
public function getText()
{
return $this->text;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Turn::class, 'Google_Service_Texttospeech_Turn');
@@ -0,0 +1,140 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class Voice extends \Google\Collection
{
/**
* An unspecified gender. In VoiceSelectionParams, this means that the client
* doesn't care which gender the selected voice will have. In the Voice field
* of ListVoicesResponse, this may mean that the voice doesn't fit any of the
* other categories in this enum, or that the gender of the voice isn't known.
*/
public const SSML_GENDER_SSML_VOICE_GENDER_UNSPECIFIED = 'SSML_VOICE_GENDER_UNSPECIFIED';
/**
* A male voice.
*/
public const SSML_GENDER_MALE = 'MALE';
/**
* A female voice.
*/
public const SSML_GENDER_FEMALE = 'FEMALE';
/**
* A gender-neutral voice. This voice is not yet supported.
*/
public const SSML_GENDER_NEUTRAL = 'NEUTRAL';
protected $collection_key = 'languageCodes';
/**
* The languages that this voice supports, expressed as
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
* "en-US", "es-419", "cmn-tw").
*
* @var string[]
*/
public $languageCodes;
/**
* The name of this voice. Each distinct voice has a unique name.
*
* @var string
*/
public $name;
/**
* The natural sample rate (in hertz) for this voice.
*
* @var int
*/
public $naturalSampleRateHertz;
/**
* The gender of this voice.
*
* @var string
*/
public $ssmlGender;
/**
* The languages that this voice supports, expressed as
* [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
* "en-US", "es-419", "cmn-tw").
*
* @param string[] $languageCodes
*/
public function setLanguageCodes($languageCodes)
{
$this->languageCodes = $languageCodes;
}
/**
* @return string[]
*/
public function getLanguageCodes()
{
return $this->languageCodes;
}
/**
* The name of this voice. Each distinct voice has a unique name.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The natural sample rate (in hertz) for this voice.
*
* @param int $naturalSampleRateHertz
*/
public function setNaturalSampleRateHertz($naturalSampleRateHertz)
{
$this->naturalSampleRateHertz = $naturalSampleRateHertz;
}
/**
* @return int
*/
public function getNaturalSampleRateHertz()
{
return $this->naturalSampleRateHertz;
}
/**
* The gender of this voice.
*
* Accepted values: SSML_VOICE_GENDER_UNSPECIFIED, MALE, FEMALE, NEUTRAL
*
* @param self::SSML_GENDER_* $ssmlGender
*/
public function setSsmlGender($ssmlGender)
{
$this->ssmlGender = $ssmlGender;
}
/**
* @return self::SSML_GENDER_*
*/
public function getSsmlGender()
{
return $this->ssmlGender;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Voice::class, 'Google_Service_Texttospeech_Voice');
@@ -0,0 +1,48 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class VoiceCloneParams extends \Google\Model
{
/**
* Required. Created by GenerateVoiceCloningKey.
*
* @var string
*/
public $voiceCloningKey;
/**
* Required. Created by GenerateVoiceCloningKey.
*
* @param string $voiceCloningKey
*/
public function setVoiceCloningKey($voiceCloningKey)
{
$this->voiceCloningKey = $voiceCloningKey;
}
/**
* @return string
*/
public function getVoiceCloningKey()
{
return $this->voiceCloningKey;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(VoiceCloneParams::class, 'Google_Service_Texttospeech_VoiceCloneParams');
@@ -0,0 +1,227 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Texttospeech;
class VoiceSelectionParams extends \Google\Model
{
/**
* An unspecified gender. In VoiceSelectionParams, this means that the client
* doesn't care which gender the selected voice will have. In the Voice field
* of ListVoicesResponse, this may mean that the voice doesn't fit any of the
* other categories in this enum, or that the gender of the voice isn't known.
*/
public const SSML_GENDER_SSML_VOICE_GENDER_UNSPECIFIED = 'SSML_VOICE_GENDER_UNSPECIFIED';
/**
* A male voice.
*/
public const SSML_GENDER_MALE = 'MALE';
/**
* A female voice.
*/
public const SSML_GENDER_FEMALE = 'FEMALE';
/**
* A gender-neutral voice. This voice is not yet supported.
*/
public const SSML_GENDER_NEUTRAL = 'NEUTRAL';
protected $customVoiceType = CustomVoiceParams::class;
protected $customVoiceDataType = '';
/**
* Required. The language (and potentially also the region) of the voice
* expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
* language tag, e.g. "en-US". This should not include a script tag (e.g. use
* "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred
* from the input provided in the SynthesisInput. The TTS service will use
* this parameter to help choose an appropriate voice. Note that the TTS
* service may choose a voice with a slightly different language code than the
* one selected; it may substitute a different region (e.g. using en-US rather
* than en-CA if there isn't a Canadian voice available), or even a different
* language, e.g. using "nb" (Norwegian Bokmal) instead of "no" (Norwegian)".
*
* @var string
*/
public $languageCode;
/**
* Optional. The name of the model. If set, the service will choose the model
* matching the specified configuration.
*
* @var string
*/
public $modelName;
protected $multiSpeakerVoiceConfigType = MultiSpeakerVoiceConfig::class;
protected $multiSpeakerVoiceConfigDataType = '';
/**
* The name of the voice. If both the name and the gender are not set, the
* service will choose a voice based on the other parameters such as
* language_code.
*
* @var string
*/
public $name;
/**
* The preferred gender of the voice. If not set, the service will choose a
* voice based on the other parameters such as language_code and name. Note
* that this is only a preference, not requirement; if a voice of the
* appropriate gender is not available, the synthesizer should substitute a
* voice with a different gender rather than failing the request.
*
* @var string
*/
public $ssmlGender;
protected $voiceCloneType = VoiceCloneParams::class;
protected $voiceCloneDataType = '';
/**
* The configuration for a custom voice. If [CustomVoiceParams.model] is set,
* the service will choose the custom voice matching the specified
* configuration.
*
* @param CustomVoiceParams $customVoice
*/
public function setCustomVoice(CustomVoiceParams $customVoice)
{
$this->customVoice = $customVoice;
}
/**
* @return CustomVoiceParams
*/
public function getCustomVoice()
{
return $this->customVoice;
}
/**
* Required. The language (and potentially also the region) of the voice
* expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
* language tag, e.g. "en-US". This should not include a script tag (e.g. use
* "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred
* from the input provided in the SynthesisInput. The TTS service will use
* this parameter to help choose an appropriate voice. Note that the TTS
* service may choose a voice with a slightly different language code than the
* one selected; it may substitute a different region (e.g. using en-US rather
* than en-CA if there isn't a Canadian voice available), or even a different
* language, e.g. using "nb" (Norwegian Bokmal) instead of "no" (Norwegian)".
*
* @param string $languageCode
*/
public function setLanguageCode($languageCode)
{
$this->languageCode = $languageCode;
}
/**
* @return string
*/
public function getLanguageCode()
{
return $this->languageCode;
}
/**
* Optional. The name of the model. If set, the service will choose the model
* matching the specified configuration.
*
* @param string $modelName
*/
public function setModelName($modelName)
{
$this->modelName = $modelName;
}
/**
* @return string
*/
public function getModelName()
{
return $this->modelName;
}
/**
* Optional. The configuration for a Gemini multi-speaker text-to-speech
* setup. Enables the use of two distinct voices in a single synthesis
* request.
*
* @param MultiSpeakerVoiceConfig $multiSpeakerVoiceConfig
*/
public function setMultiSpeakerVoiceConfig(MultiSpeakerVoiceConfig $multiSpeakerVoiceConfig)
{
$this->multiSpeakerVoiceConfig = $multiSpeakerVoiceConfig;
}
/**
* @return MultiSpeakerVoiceConfig
*/
public function getMultiSpeakerVoiceConfig()
{
return $this->multiSpeakerVoiceConfig;
}
/**
* The name of the voice. If both the name and the gender are not set, the
* service will choose a voice based on the other parameters such as
* language_code.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The preferred gender of the voice. If not set, the service will choose a
* voice based on the other parameters such as language_code and name. Note
* that this is only a preference, not requirement; if a voice of the
* appropriate gender is not available, the synthesizer should substitute a
* voice with a different gender rather than failing the request.
*
* Accepted values: SSML_VOICE_GENDER_UNSPECIFIED, MALE, FEMALE, NEUTRAL
*
* @param self::SSML_GENDER_* $ssmlGender
*/
public function setSsmlGender($ssmlGender)
{
$this->ssmlGender = $ssmlGender;
}
/**
* @return self::SSML_GENDER_*
*/
public function getSsmlGender()
{
return $this->ssmlGender;
}
/**
* Optional. The configuration for a voice clone. If
* [VoiceCloneParams.voice_clone_key] is set, the service chooses the voice
* clone matching the specified configuration.
*
* @param VoiceCloneParams $voiceClone
*/
public function setVoiceClone(VoiceCloneParams $voiceClone)
{
$this->voiceClone = $voiceClone;
}
/**
* @return VoiceCloneParams
*/
public function getVoiceClone()
{
return $this->voiceClone;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(VoiceSelectionParams::class, 'Google_Service_Texttospeech_VoiceSelectionParams');