我知道像谷歌文字语音转换这样的图书馆。然而,这在Colab中并不适用。我最近在Colab https://colab.research.google.com/github/tugstugi/pytorch-dc-tts/blob/master/notebooks/EnglishTTS.ipynb#scrollTo=jLU2p4Gq_12d里看到了一个复杂的笔记本,我们可以在里面把文本转换成语音。但是,有没有一种简单的方法可以在googlecolab中使用Google文本语音转换或其他库?在
这样我就提供了一个字符串-"My name is XYZ"
,它在Colab笔记本中被读出。(这发生在我提供的链接中,但相当复杂)。在
另外,如果可能的话,我希望音频可以自动播放,就像GTTS那样。在本笔记本中,我们需要单击播放按钮进行语音输出。在
我终于解决了。一个简单的方法是将Google文本语音转换与IPython的音频方法结合使用。下面的代码片段只需几行就可以完成这项工作!你也可以看看我在这里创建的Colab笔记本https://colab.research.google.com/drive/1wMg9ZV2WH2ugAC-6iZLUkEH3V6XxI3H-演示了这一点。在
相关问题 更多 >
编程相关推荐