python - 谷歌云文本语音“没有属性'SynthesisInput'”错误
问题描述
https://cloud.google.com/text-to-speech/docs/libraries?hl=pt-br#client-libraries-install-python
在尝试主要的谷歌示例时,我收到了这个错误:
AttributeError Traceback (most recent call last)
<ipython-input-92-866a7868dbb4> in <module>
10
11 # Set the text input to be synthesized
---> 12 synthesis_input = texttospeech.SynthesisInput(text="Hello, World!")
13
14 # Build the voice request, select the language code ("en-US") and the ssml
AttributeError: module 'google.cloud.texttospeech' has no attribute 'SynthesisInput'
有什么建议吗?使用 conda-forge:google-cloud-texttospeech 1.0.1
解决方案
推荐阅读
- command-line-interface - 使用 cli 的帮助提示来扩展 yang
- python - 在 pygame 中使多行精灵重新出现在屏幕顶部
- javascript - React - 以反应形式收集数据 - 反应钩子
- c++ - c++ 对象可以占用比需要更多的内存空间吗?
- java - 在视图类上定义的 android:onClick 属性的父或祖先上下文中找不到方法 log_out(View)
- c# - 在 ASP.NET MVC 应用程序中获取 HttpClientCertificate
- django - 在 base.html 中显示任务计数
- python-3.x - 船,不是射击
- java - 如何检查输入字符串是否与指定格式匹配?
- html - 进度条 - 颜色变化