These OSC commands are used internally by Sonic Pi in the server program to control recording and saving a file. The messages are sent to port 4557 (not the port 4559 used for external OSC commands coming into Sonic Pi.
I had a play with them this evening and found that the following code worked, which saves a demo 10 second wav file. I used Sonic Pi to send osc messages to itself on port 4557. The commands are as documented by @bahamut657 above, but require some further detail First each command has to be followed by a GUID value which you choose. I used the string “myGUID”. The start and stop recording commands need no further info, but the save-recording commands needs the full pathname to where you want the file to be saved.
osc_send "localhost",4557, "/start-recording","myGUID"
#generate some sound to record
play scale(:c4,:major,num_octaves:2).choose,release: 0.1
osc_send "localhost",4557, "/stop-recording","myGUID"
#change the path in the next command to suit your system and usernames
osc_send "localhost",4557, "/save-recording","myGUID","/Users/rbn/testfile.wav"
The code I tried is shown above. I used the osc_send command to specify the address (localhost) and the port 4557. The specimen file had 9.5 seconds of random notes. You can play the resulting file using a suitable player eg audacity.
All of the above uses undocumented internals of Sonic Pi and is not supported for use in this way, so use at your own risk. (You can see where the commands are set up in the file sonic-pi-server.rb which can be seen at https://github.com/samaaron/sonic-pi/blob/master/app/server/ruby/bin/sonic-pi-server.rb in the Sonic Pi github code. (Note this is in a different location to that employed in the current releases of Sonic Pi).