<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate(self, text):
 """Try to get the generated file. Args: text: The text that you want to generate. """

        if not text:
            raise Exception("No text to speak")

        if len(text) >= self.MAX_CHARS:
            raise Exception("Number of characters must be less than 2000")

        params = self.__params.copy()
        params["text"] = text
        self._data = requests.get(self.TTS_URL, params=params,
                                  stream=False).iter_content()