void setup() { Serial.begin(115200); //define speech text here char* text = "[x0][g2][h2][m51][s6][t5]welcome to a new voltlog"; // this is for text speech //char* text = "[x1]sound101 sound102 sound103 sound104 sound105 sound106"; // this will output built-in sounds //sending commands to XFS5152CE module Serial.write(0xFD); //start coms, send header 0xFD Serial.write(0x00); //high byte - message size Serial.write(2 + strlen(text)); //low byte - message size Serial.write(0x01); //command type (0x01 means Speech synthesis command) Serial.write(0x00); //text encoding format (GB2312 works ok for english) Serial.write(text); //text to be synthesized } void loop() { }