Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

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