有没有办法从命令行使用 MS Speech 实用程序?我可以在 Mac 上执行此操作,但在 Windows XP 上找不到任何参考。
我对这个主题的 2 美分,命令行俏皮话:
-
在 Win 上使用PowerShell.exe
PowerShell -Command "Add-Type –AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('hello');"
-
在 Win 上使用mshta.exe
mshta vbscript:Execute("CreateObject(""SAPI.SpVoice"").Speak(""Hello"")(window.close)")
-
在 OSX 上使用say
say "hello"
-
使用本机的 Ubuntu 桌面 (>=2015)spd-say
spd-say "hello"
-
在任何其他 Linux 上
- 参考如何使用命令行进行文本转语音输出? https://askubuntu.com/a/501917
- 命令行函数使用谷歌 TTS https://www.commandlinefu.com/commands/view/13612/googles-text-to-speech-in-command-line(wget 到 mp3->mplayer)
- command using google with mplayer directly https://elinux.org/RPi_Text_to_Speech_(Speech_Synthesis)#Google_Text_to_Speech:
-
/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&q=Hello%20World&tl=en"
;
-
在 Raspberry Pi、Win、OSX(或任何遥控器)上使用Node-Red
npm i node-red-contrib-sysmessage https://flows.nodered.org/node/node-red-contrib-sysmessage
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)