【问题标题】:Using Mbrola voices with pyttsx3在 pyttsx3 中使用 Mbrola 声音
【发布时间】:2020-12-15 08:43:05
【问题描述】:

我目前正在尝试在应用程序上使用 pyttsx3。 我对此没有任何问题,但客户希望应用程序以 pyttsx3 不这样做的声音交付,因为它使用操作系统的声音。 因此,我们的想法是在 pyttsx3 中使用 mbrola 声音。目标是下载声音并在 pyttsx3 中使用它们。 你知道这是否可能。

目前,我的代码如下所示:


def main():
    import os
    folder_name="../TTS/Code/Base de test/"
    arr = os.listdir(folder_name)
    for filename in arr:
        langage,sentence=lecture.create_sentence(folder_name+filename)
        test_pyttsx3.speak_sentence(langage,sentence)


if __name__ == "__main__":
    main()

提前致谢!

【问题讨论】:

    标签: python pyttsx3 mbrola


    【解决方案1】:

    导入 pyttsx3

    引擎 = pyttsx3.init()

    voices = engine.getProperty('voices')

    engine.setProperty('voice', voices[1].id)

    engine.say("Hello word")

    engine.runAndWait()

    【讨论】:

    • 请在您的答案中添加上下文并正确格式化。
    猜你喜欢
    • 2014-12-01
    • 2017-12-05
    • 1970-01-01
    • 1970-01-01
    • 2021-06-27
    • 1970-01-01
    • 2021-06-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多