设置默认声音播放器
通过使用像tuneR和seewave这样的R包,我生成了我想用一些不是Windows Media Player的软件来播放的声音,但我不知道如何设置它。该命令
setWavPlayer("mplay32")
是唯一有效的命令(及其 WMP)。当我尝试这样的事情时,
setWavPlayer("C:/Program Files/foobar2000/foobar2000.exe")
当我尝试播放声音时,合成器或播放命令只会给出此错误
'C:/Program' is not recognized as an internal or external command, operable program or batch file.
有任何提示吗?
By using R packages like tuneR and seewave I generated sounds that I want to play with some software that is not Windows Media Player but I don't know how to set this up. This command
setWavPlayer("mplay32")
Is the only thing that works (and its WMP). When I try something like this
setWavPlayer("C:/Program Files/foobar2000/foobar2000.exe")
The synth or play command just gives this error when I try to playback my sound
'C:/Program' is not recognized as an internal or external command, operable program or batch file.
Any hints?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是在 OSX 下对我有用的方法:假设我安装了一个名为 'play.app' 的应用程序,
在您的情况下,您的路径字符串的空间(在“Program[space]Files”中)的某处会导致要分割的字符串。该错误消息很明显来自 CommandPrompt 或类似的 shell。您需要使用
shQuote
引用字符串,以便正确处理空格:Here's what works for me under OSX: assuming I've installed an app called 'play.app' ,
In your case it would appear that somewhere along the line your path string's space (in "Program[space]Files" ) is causing the string to be split up. That error message is pretty clearly coming from a CommandPrompt or similar shell. You need to quote the string using
shQuote
so that the space is handled properly:如果你想在 Windows 中这样做,这就是我所做的。不幸的是 wmplayer 不能完美工作。尽管如此,您可以用它播放声音。
If you want to do it in windows this is what I did. Unfortunately wmplayer does not work perfectly. Nonetheless you can play sounds with it.