Synthesizes speech synchronously: receive results after all text input
        has been processed.

        Example:
            >>> from google.cloud import texttospeech_v1beta1
            >>>
            >>> client = texttospeech_v1beta1.TextToSpeechClient()
            >>>
            >>> # TODO: Initialize `input_`:
            >>> input_ = {}
            >>>
            >>> # TODO: Initialize `voice`:
            >>> voice = {}
            >>>
            >>> # TODO: Initialize `audio_config`:
            >>> audio_config = {}
            >>>
            >>> response = client.synthesize_speech(input_, voice, audio_config)

        Args:
            input_ (Union[dict, ~google.cloud.texttospeech_v1beta1.types.SynthesisInput]): Required. The Synthesizer requires either plain text or SSML as input.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.texttospeech_v1beta1.types.SynthesisInput`
            voice (Union[dict, ~google.cloud.texttospeech_v1beta1.types.VoiceSelectionParams]): Required. The desired voice of the synthesized audio.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.texttospeech_v1beta1.types.VoiceSelectionParams`
            audio_config (Union[dict, ~google.cloud.texttospeech_v1beta1.types.AudioConfig]): Required. The configuration of the synthesized audio.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.texttospeech_v1beta1.types.AudioConfig`
            retry (Optional[google.api_core.retry.Retry]):  A retry object used
                to retry requests. If ``None`` is specified, requests will not
                be retried.
            timeout (Optional[float]): The amount of time, in seconds, to wait
                for the request to complete. Note that if ``retry`` is
                specified, the timeout applies to each individual attempt.
            metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
                that is provided to the method.

        Returns:
            A :class:`~google.cloud.texttospeech_v1beta1.types.SynthesizeSpeechResponse` instance.

        Raises:
            google.api_core.exceptions.GoogleAPICallError: If the request
                    failed for any reason.
            google.api_core.exceptions.RetryError: If the request failed due
                    to a retryable error and retry attempts failed.
            ValueError: If the parameters are invalid.

def synthesize_speech(
        self,
        input_,
        voice,
        audio_config,
        retry=google.api_core.gapic_v1.method.DEFAULT,
        timeout=google.api_core.gapic_v1.method.DEFAULT,
        metadata=None,
    ):
        """
        Synthesizes speech synchronously: receive results after all text input
        has been processed.

        Example:
            >>> from google.cloud import texttospeech_v1beta1
            >>>
            >>> client = texttospeech_v1beta1.TextToSpeechClient()
            >>>
            >>> # TODO: Initialize `input_`:
            >>> input_ = {}
            >>>
            >>> # TODO: Initialize `voice`:
            >>> voice = {}
            >>>
            >>> # TODO: Initialize `audio_config`:
            >>> audio_config = {}
            >>>
            >>> response = client.synthesize_speech(input_, voice, audio_config)

        Args:
            input_ (Union[dict, ~google.cloud.texttospeech_v1beta1.types.SynthesisInput]): Required. The Synthesizer requires either plain text or SSML as input.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.texttospeech_v1beta1.types.SynthesisInput`
            voice (Union[dict, ~google.cloud.texttospeech_v1beta1.types.VoiceSelectionParams]): Required. The desired voice of the synthesized audio.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.texttospeech_v1beta1.types.VoiceSelectionParams`
            audio_config (Union[dict, ~google.cloud.texttospeech_v1beta1.types.AudioConfig]): Required. The configuration of the synthesized audio.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.texttospeech_v1beta1.types.AudioConfig`
            retry (Optional[google.api_core.retry.Retry]):  A retry object used
                to retry requests. If ``None`` is specified, requests will not
                be retried.
            timeout (Optional[float]): The amount of time, in seconds, to wait
                for the request to complete. Note that if ``retry`` is
                specified, the timeout applies to each individual attempt.
            metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
                that is provided to the method.

        Returns:
            A :class:`~google.cloud.texttospeech_v1beta1.types.SynthesizeSpeechResponse` instance.

        Raises:
            google.api_core.exceptions.GoogleAPICallError: If the request
                    failed for any reason.
            google.api_core.exceptions.RetryError: If the request failed due
                    to a retryable error and retry attempts failed.
            ValueError: If the parameters are invalid.
        """
        # Wrap the transport method to add retry and timeout logic.
        if "synthesize_speech" not in self._inner_api_calls:
            self._inner_api_calls[
                "synthesize_speech"
            ] = google.api_core.gapic_v1.method.wrap_method(
                self.transport.synthesize_speech,
                default_retry=self._method_configs["SynthesizeSpeech"].retry,
                default_timeout=self._method_configs["SynthesizeSpeech"].timeout,
                client_info=self._client_info,
            )

        request = cloud_tts_pb2.SynthesizeSpeechRequest(
            input=input_, voice=voice, audio_config=audio_config
        )
        return self._inner_api_calls["synthesize_speech"](
            request, retry=retry, timeout=timeout, metadata=metadata
        )