Search code examples
sox

SoX will not run using "play". 'play' is not recognized as an internal or external command, operable program or batch file


I've already added sox to my PATH and it seems to be doing fine with that. If I open my terminal and enter C:\Users\[EXAMPLE USERNAME]>sox, the program will run through all of the options and effects. The problem is I can't seem to get play to work. I've tried C:\Users\[EXAMPLE USERNAME]>play file.ogg which gives the resulting error: 'play' is not recognized as an internal or external command, operable program or batch file. I'm not entirely sure what's going on here.

I would normally think to create a PATH variable for play but as mentioned in the comments of the answer to this question, there is no executable, it's sox under a different name.

Also, for reference, I'm using sox-14-4-2 on Windows 10.


Solution

  • In the comment in the linked question, it's mentioned that "play is sox just under a different name." I had interpreted this to mean play is a part of sox's code, where you only needed one file: sox and, provided everything was properly configured, that file would be called on through the use of any of those commands (where the specific command would activate its specific code in sox). It turns out I over-complicated this a lot. The actual solution is copying sox a three times and renaming the duplicates to play, rec and soxi. The reason why they weren't included in the .exe was for space. I personally don't see why the developers couldn't have just gone the route of what I assumed to conserve space, but that's just my opinion on the matter.