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

23 行
459B

  1. """
  2. baidu voice service
  3. """
  4. from aip import AipSpeech
  5. from voice.voice import Voice
  6. from config import conf
  7. class BaiduVoice(Voice):
  8. APP_ID = conf().get('baidu_app_id')
  9. API_KEY = conf().get('baidu_api_key')
  10. SECRET_KEY = conf().get('baidu_secret_key')
  11. client = AipSpeech(APP_ID, API_KEY, SECRET_KEY)
  12. def __init__(self):
  13. pass
  14. def voiceToText(self, voice_file):
  15. pass
  16. def textToVoice(self, text):
  17. pass