2
A
回答
1
要停止發言,您將不得不停止運行發言的過程。當你說「Mac正在製作的任何演講」時,這很難做到,因爲可能有不同的過程產生演講。你必須找出一種方法來確定講話的內容。
下面是一個例子,我生成的演講,因此我知道什麼過程殺死,使演講停止。
set theText to "Is it possible to stop any speech that the Mac is currently producing (or has queued) using an AppleScript? I'm basically looking for the opposite of the AppleScript \"say\" command."
set thePID to do shell script "say " & quoted form of theText & " > /dev/null 2>&1 & echo $!"
delay 1
do shell script "kill " & thePID
3
試試這個,一個完整的AppleScript解決方案(無需殼):
-- say some text asynchronously
say "Hello, world!" waiting until completion no
-- delay 1 second before stopping
delay 1
-- stop text by saying nothing, which stops current speech
say "" with stopping current speech
相關問題
- 1. Bing Speech API和UWP Speech API之間有什麼區別
- 2. Chrome和YouTube和AppleScript
- 3. Speech to Text Android
- 4. Speech to text c#
- 5. AVSpeechSynthesizer Text-To-Speech
- 6. Iphone Speech Bubble
- 7. silverlight speech to text
- 8. Google Speech API streaming
- 9. Applescript和Flash Builder
- 10. AppleScript和崩潰
- 11. Applescript,iTunes和'date'
- 12. Applescript和Microsoft Word
- 13. 的AppleScript和MD5
- 14. Applescript和shell
- 15. Windows Speech API問題
- 16. Watson Speech to Text Latency
- 17. Google Cloud Streaming Speech API
- 18. Microsoft Speech API安裝
- 19. 使用Google Speech API
- 20. Android Java Speech to text
- 21. Geektool和返回Applescript
- 22. 的AppleScript和可可
- 23. 使用pngquant和AppleScript
- 24. GCD和AppleEvents/NSOperationQueue和AppleScript
- 25. 是否有任何IBM Watson Speech to Speech API?
- 26. Speech Sdk 5.1的問題?
- 27. Windows上的Google Speech API?
- 28. Google Speech API在文件
- 29. Speech to text result = null error
- 30. android text to speech toast message
我已經試圖用`停止當前speech`,沒有成功,感謝您指出了`等到完成否「選項。 – 2016-04-05 19:09:56