You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
352B

  1. """
  2. Voice service abstract class
  3. """
  4. class Translator(object):
  5. # please use https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes to specify language
  6. def translate(self, query: str, from_lang: str = "", to_lang: str = "en") -> str:
  7. """
  8. Translate text from one language to another
  9. """
  10. raise NotImplementedError