首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在桌面(Linux)上为英语深入学习免费TTS

在桌面(Linux)上为英语深入学习免费TTS
EN

Software Recommendation用户
提问于 2023-02-21 06:06:44
回答 1查看 37关注 0票数 2

我最近发生了一次徒步旅行事故,其中一只眼睛受伤了。希望我能完全康复,但在那之前,读更长的课文对我来说是非常累人的。因此,我正在寻找一个文本到语音(TTS)解决方案,我可以使用电子邮件/其他一些文本。

我正在寻找一个本地执行的免费提供 TTS软件(语音合成) (没有web服务,因此没有Lyrebird /gTT),听起来比eSpeak更好。它应该在linux上运行。

我正在寻找类似塔科创2的东西,但可以随时使用(如果可能的话,不需要GPU;它不需要是实时的)。我还在神经语音合成研究综述中看到了更多的模型,它们可能会带来类似的好结果。

我试过什么

示例文本

我以马克·吐温的糟糕的德语为例:

代码语言:javascript
复制
I went often to look at the collection of curiosities in Heidelberg Castle, and one day I surprised the keeper of it with my German. I spoke entirely in that language. He was greatly interested; and after I had talked a while he said my German was very rare, possibly a "unique"; and wanted to add it to his museum.

If he had known what it had cost me to acquire my art, he would also have known that it would break any collector to buy it. Harris and I had been hard at work on our German during several weeks at that time, and although we had made good progress, it had been accomplished under great difficulty and annoyance, for three of our teachers had died in the mean time.
EN

回答 1

Software Recommendation用户

回答已采纳

发布于 2023-02-22 06:51:39

我发现了一些东西: CoquiTTS (网络演示)

代码语言:javascript
复制
import sys


def gen(model_name: str, text: str, out_file: str) -> None:
    from TTS.api import TTS  # pip install TTS

    tts = TTS(model_name=model_name, progress_bar=False, gpu=False)
    # if you want to see which models are available: TTS.list_models()
    print("#" * 80)
    print(f"model={model_name}")
    print(f"speakers={tts.speakers}")
    print(f"languages={tts.languages}")
    speaker = tts.speakers[0] if tts.speakers else None
    language = "en" if tts.languages else None
    tts.tts_to_file(text=text, speaker=speaker, language=language, file_path=out_file)


def get_text(filepath: str) -> str:
    with open(filepath) as fp:
        text = fp.read()
    text = text.replace("”", '"').replace("“", '"')
    return text


if __name__ == "__main__":
    gen(
        model_name="tts_models/en/ljspeech/vits--neon",
        text=get_text(sys.argv[1]),
        out_file=sys.argv[2]
    )
票数 1
EN
页面原文内容由Software Recommendation提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://softwarerecs.stackexchange.com/questions/85372

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档