Alright, I’m having trouble getting started on this one. I’m trying to use the soundsc function in Octave, but I keep getting this error:
error: sound.m: No command line utility found for sound playing
I’ve searched around some on the net but couldn’t find out what to do. Here’s a link to the source code of the file I found on the net that contains the error: http://octave-audio.sourcearchive.com/documentation/1.1.3/sound_8m-source.html
The error I think comes from here:
## What do we use for playing?
global sound_play_utility;
if ~isempty(sound_play_utility),
## User specified command
elseif (file_in_path(EXEC_PATH, "ofsndplay"))
## Mac
sound_play_utility = "ofsndplay -"
elseif (file_in_path(EXEC_PATH, "play"))
## Linux (sox)
sound_play_utility = "play -t AU -";
else
error("sound.m: No command line utility found for sound playing");
endif
I just so happen to be using Windows 7, so I guess I have to specify the path somehow my self? Change the source code? I have no idea what I’m suppose to do to get this to work! Can anyone tell me?
The file you linked to includes documentation at the top, which includes the following:
So you need to install sox, for starters. This will include
play.exe. Then you have to either set the value of the global variablesound_play_utilityin Octave to reflect where you installedsox, or make sure thefile_in_path(EXEC_PATH)stuff can findplay.exe. Looking a few lines down from the snippet you posted, it looks like the file passes that variable topopen, which is supposed to launch a new process. I’ve never done anything like that on Octave on a Windows machine, so I can’t help you on the exact details.