控制节日输出

发布于 2024-08-16 05:19:54 字数 450 浏览 9 评论 0原文

我正在致力于改进 Emacs 上的 Festival。当 Festival 读取句子时,我需要更好地控制它。基本上,我需要两件事:

  1. 显示正在阅读的单词。
  2. 改变正在阅读的内容的速度(也许还有音调)。

理想情况下,Festival 会输出一些数据结构,将偏移量/长度(通常是单词的开始/长度)与输出 WAV 文件(甚至是 wav 文件中的位置)链接起来。然后,我可以使用 mplayer 之类的东西来构建一个播放列表,并以某种方式告诉我何时播放下一个单词以及该单词在缓冲区中的位置。

我还希望有一些简单的命令可以改变正在阅读的速度。然而,mplayer 可以为我做到这一点,所以如果我能让 #1 工作也没什么大不了的。

I am working on improving Festival on Emacs. I need better control of Festival when it reads a sentence. Basically, I need two things:

  1. Show what word is being read.
  2. Change the speed (and maybe pitch) of what is being read.

Ideally, there would be some data structure output by Festival that would link offset/length (usually the start/length of a word) with an output WAV file (or even a location in a wav file). I could then use something like mplayer to build a playlist and somehow tell me when the next word is being played and where that word exists in the buffer.

I'm also hoping there's some simple command to change the speed of what is being read. However, mplayer can do that for me, so it's not a big deal if I can get #1 working.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡淡绿茶香 2024-08-23 05:19:54

请参阅此处的手册,特别是有关“text2wave”的部分“ 脚本。我不清楚这是一个单独的可执行文件还是只是您必须调用的方案脚本。无论哪种情况,它看起来都应该为您提供一些如何做到这一点的灵感。在我看来,您可以将整个缓冲区发送到此命令,这将生成一个 .wav 文件,然后您可以通过 mplayer 进行控制。当然,这意味着您不知道当前正在播放哪个句子,因此您可以将每个句子输出为 .wav 文件,然后将它们在 mplayer 中排队(或重复调用 mplayer)。如果 text2wave 是可执行文件,我不确定它是否在 Windows 上可用,但您应该能够使用 Festival 的方案脚本完成相同的事情。

编辑:text2wave确实是一个脚本,但您应该能够轻松修改它以使用脚本作为参数调用节日(path/to/festival --script text2wave)。我不知道 Windows 二进制文件是否包含这个,但它应该可以从 Festival 主站点或 *nix 发行版中获得(它肯定在 Ubuntu 中)。

See the manual here, especially the part about the "text2wave" script. I'm unclear whether this is a separate executable or just a scheme script that you will have to call. In either case, it looks that it should give you some inspiration for how to do this. It appears to me that you could possibly send a whole buffer to this command, which would generate a .wav file, which you could then control via mplayer. Of course, this would mean you wouldn't know which sentence was currently playing, so you could output each sentence as a .wav file, then queue them up in mplayer (or call mplayer repeatedly). If text2wave is an executable, I'm not sure it's available on Windows, but you should be able to accomplish the same thing with a scheme script for Festival.

Edit: text2wave is indeed a script, but you should be able to easily modify it to call festival with the script as an argument (path/to/festival --script text2wave). I don't know if the Windows binaries include this, but it should be available either from the main Festival site or in a *nix distro (it's definitely in Ubuntu).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文