Please remember that the second parameter (the size) is used to allocate the internal buffer, therefore it must allow for the 0-char terminator.
Using message.size() might be the cause of your issue and must be replaced by message.size() + 1.
See sample code at eSpeak sample