To send binary data to the robot, the method sendBin must be used. It takes as parameters the buffer to send and its size, and optionnaly a header.
sendBin
client->sendBin(soundData, soundDataSize,"speaker.val = BIN %d raw 2 16000 16 1;", soundDataSize);