简体   繁体   中英

Watson tts in Python 3

尝试运行代码的屏幕截图

Whenever I attempt to run a simple piece of code containing everything I need to run a ttsWatson.play, I am faced with the same errors.

This is my code:

from tts_watson.TtsWatson import TtsWatson
TtsWatson = TtsWatson("credentials_here", "more_credentials_here", "en-US_AllisonVoice")
TtsWatson.play("Hello World")

只需在两行dataToRead = ''替换为dataToRead = ''.encode()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM