Advertisement
Guest User

text-to-love.ino

a guest
Feb 19th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include <SpeechSynthesis.h>
  2.  
  3. char phoneNumber[] = "+639XXXXXXXXX";
  4. byte ssr[500];
  5.  
  6. void setup() {
  7.   Serial.begin(115200);
  8.   setupFona();
  9. }
  10.  
  11. void synthesize(String message) {
  12.   SpeechSynthesis.buf_init(ssr);
  13.   SpeechSynthesis.English(ssr, 4, "10");
  14.   SpeechSynthesis.English(ssr,6, message.c_str());
  15.   SpeechSynthesis.English(ssr, 4, "5");
  16.   SpeechSynthesis.Espeaking(0, 19, 4, ssr);
  17. }
  18.  
  19. void loop() {
  20.   String response = readSMS(phoneNumber);
  21.  
  22.   if (!response.equalsIgnoreCase("")) {
  23.     synthesize(response);
  24.   }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement