18 行
347B

  1. """
  2. Voice service abstract class
  3. """
  4. class Voice(object):
  5. def voiceToText(self, voice_file):
  6. """
  7. Send voice to voice service and get text
  8. """
  9. raise NotImplementedError
  10. def textToVoice(self, text):
  11. """
  12. Send text to voice service and get voice
  13. """
  14. raise NotImplementedError