def get_conn(self):
        """
        Retrieves connection to Cloud Text to Speech.

        :return: Google Cloud Text to Speech client object.
        :rtype: google.cloud.texttospeech_v1.TextToSpeechClient
        """
        if not self._client:
            self._client = TextToSpeechClient(credentials=self._get_credentials())
        return self._client
Ejemplo n.º 2
0
    def get_conn(self) -> TextToSpeechClient:
        """
        Retrieves connection to Cloud Text to Speech.

        :return: Google Cloud Text to Speech client object.
        :rtype: google.cloud.texttospeech_v1.TextToSpeechClient
        """
        if not self._client:
            # pylint: disable=unexpected-keyword-arg
            self._client = TextToSpeechClient(
                credentials=self._get_credentials(),
                client_info=self.client_info)
            # pylint: enable=unexpected-keyword-arg

        return self._client