您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

13 行
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