ms speech from command line

前端 未结 7 1783
遥遥无期
遥遥无期 2020-12-02 11:23

Is there a way to use the MS Speech utility from command line? I can do it on a mac, but can\'t find any reference to it on Windows XP.

7条回答
  •  隐瞒了意图╮
    2020-12-02 11:51

    My 2 cents on the topic, command line one-liners:

    • on Win using PowerShell.exe

      PowerShell -Command "Add-Type –AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('hello');"
      
    • on Win using mshta.exe

      mshta vbscript:Execute("CreateObject(""SAPI.SpVoice"").Speak(""Hello"")(window.close)")
      
    • on OSX using say

      say "hello"
      
    • Ubuntu Desktop (>=2015) using native spd-say

      spd-say "hello"
      
    • on any other Linux

      • refer to How to text-to-speech output using command-line?
      • commandline function using google TTS (wget to mp3->mplayer)
    • on Raspberry Pi, Win, OSX using Node-Red

      npm i node-red-contrib-sysmessage

提交回复
热议问题