Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SpeechSynthesis.h>
- char phoneNumber[] = "+639XXXXXXXXX";
- byte ssr[500];
- void setup() {
- Serial.begin(115200);
- setupFona();
- }
- void synthesize(String message) {
- SpeechSynthesis.buf_init(ssr);
- SpeechSynthesis.English(ssr, 4, "10");
- SpeechSynthesis.English(ssr,6, message.c_str());
- SpeechSynthesis.English(ssr, 4, "5");
- SpeechSynthesis.Espeaking(0, 19, 4, ssr);
- }
- void loop() {
- String response = readSMS(phoneNumber);
- if (!response.equalsIgnoreCase("")) {
- synthesize(response);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement