Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

23 lines
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