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.

16 lines
476B

  1. from bot import bot_factory
  2. from voice import voice_factory
  3. class Bridge(object):
  4. def __init__(self):
  5. pass
  6. def fetch_reply_content(self, query, context):
  7. return bot_factory.create_bot("chatGPT").reply(query, context)
  8. def fetch_voice_to_text(self, voiceFile):
  9. return voice_factory.create_voice("openai").voiceToText(voiceFile)
  10. def fetch_text_to_voice(self, text):
  11. return voice_factory.create_voice("baidu").textToVoice(text)