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.

23 satır
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