Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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