我最近发生了一次徒步旅行事故,其中一只眼睛受伤了。希望我能完全康复,但在那之前,读更长的课文对我来说是非常累人的。因此,我正在寻找一个文本到语音(TTS)解决方案,我可以使用电子邮件/其他一些文本。
我正在寻找一个本地执行的免费提供 TTS软件(语音合成) (没有web服务,因此没有Lyrebird /gTT),听起来比eSpeak更好。它应该在linux上运行。
我正在寻找类似塔科创2的东西,但可以随时使用(如果可能的话,不需要GPU;它不需要是实时的)。我还在神经语音合成研究综述中看到了更多的模型,它们可能会带来类似的好结果。
pyttsx3 with eSpeak (代码)给出了这个mp3。太可怕了。我以马克·吐温的糟糕的德语为例:
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.发布于 2023-02-22 06:51:39
我发现了一些东西: CoquiTTS (网络演示)
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]
)https://softwarerecs.stackexchange.com/questions/85372
复制相似问题