我想合成Mac的演讲,但我用的是个人电脑。我可以在家里的Macbook上设置一个PHP服务器,并让它为我合成文本,并通过网络请求返回给我吗?
就像http://mymacbook.com/speak.php?t=why+hello+there
什么秘密PHP代码将解锁这种可能性?我知道我可以用say -o "output.aiff" -f "input.txt"在命令行上合成语音,但我需要帮助处理这里的结缔组织。
和没有-我不想链接到倒谱或AT&T的在线语音合成器,因为我想使用特殊的Mac语音合成语法。
发布于 2011-09-27 02:16:05
<?php
file_put_contents('input.txt', $_GET['t']);
exec('say -o output.aiff -f input.txt');
header("Content-Type: audio/x-aiff");
readfile("output.aiff");
unlink("output.aiff");
exit;https://stackoverflow.com/questions/7563483
复制相似问题