Forum >error when compiling example code - text to speech
error when compiling example code - text to speech

#include <SpeechSynthesis.h>
void setup()
{
Serial.begin(9600);
}
byte ssr[500];//define a character string
void loop()
{
SpeechSynthesis.buf_init(ssr);//initialize the buff
SpeechSynthesis.English(ssr,4,"5");//volume in grade 5
SpeechSynthesis.English(ssr,6,"cooki");//"6" means synthesis in English; "cooki"is the content
SpeechSynthesis.English(ssr,4,"5");
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
SpeechSynthesis.English(ssr,2,"10");
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
SpeechSynthesis.English(ssr,2,"5");//speed of speaking: grade 5
SpeechSynthesis.English(ssr,5," ");//speed,volume,intomation are all set into default
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
SpeechSynthesis.Espeaking(0,19,4,ssr);//Executive commands above, "0" is synthesis command; "19" select speaker; "4" speech function
while(Serial.read()!=0x41)//waiting synthesis complete
{}
while(Serial.read()!=0x4F)//waiting play complete
{}
SpeechSynthesis.buf_init(ssr);
SpeechSynthesis.English(ssr,6,"hello cooki 123");
SpeechSynthesis.Espeaking(0,19,4,ssr);
while(Serial.read()!=0x41)
{}
while(Serial.read()!=0x4F)
{}
SpeechSynthesis.buf_init(ssr);
SpeechSynthesis.English(ssr,6,"hello cooki 123");
SpeechSynthesis.Espeaking(0,19,7,ssr);
while(1);
}
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino: In function 'void loop()':
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:10:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,4,"5");//volume in grade 5
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:11:38: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"cooki");//"6" means synthesis in English; "cooki"is the content
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:12:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,4,"5");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:13:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:14:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,2,"10");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:15:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:16:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,2,"5");//speed of speaking: grade 5
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:17:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,5," ");//speed,volume,intomation are all set into default
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:18:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:26:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"hello cooki 123");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:34:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"hello cooki 123");
^
In file included from /Users/Ronald/Documents/Arduino/libraries/SpeechSynthesis/SpeechSynthesis.cpp:10:0:
/Users/Ronald/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/avr/include/avr/delay.h:36:2: warning: #warning "This file has been moved to <util/delay.h>." [-Wcpp]
#warning "This file has been moved to <util/delay.h>."
^
Sketch uses 3490 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 985 bytes (12%) of dynamic memory, leaving 7207 bytes for local variables. Maximum is 8192 bytes.
void setup()
{
Serial.begin(9600);
}
byte ssr[500];//define a character string
void loop()
{
SpeechSynthesis.buf_init(ssr);//initialize the buff
SpeechSynthesis.English(ssr,4,"5");//volume in grade 5
SpeechSynthesis.English(ssr,6,"cooki");//"6" means synthesis in English; "cooki"is the content
SpeechSynthesis.English(ssr,4,"5");
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
SpeechSynthesis.English(ssr,2,"10");
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
SpeechSynthesis.English(ssr,2,"5");//speed of speaking: grade 5
SpeechSynthesis.English(ssr,5," ");//speed,volume,intomation are all set into default
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
SpeechSynthesis.Espeaking(0,19,4,ssr);//Executive commands above, "0" is synthesis command; "19" select speaker; "4" speech function
while(Serial.read()!=0x41)//waiting synthesis complete
{}
while(Serial.read()!=0x4F)//waiting play complete
{}
SpeechSynthesis.buf_init(ssr);
SpeechSynthesis.English(ssr,6,"hello cooki 123");
SpeechSynthesis.Espeaking(0,19,4,ssr);
while(Serial.read()!=0x41)
{}
while(Serial.read()!=0x4F)
{}
SpeechSynthesis.buf_init(ssr);
SpeechSynthesis.English(ssr,6,"hello cooki 123");
SpeechSynthesis.Espeaking(0,19,7,ssr);
while(1);
}
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino: In function 'void loop()':
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:10:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,4,"5");//volume in grade 5
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:11:38: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"cooki");//"6" means synthesis in English; "cooki"is the content
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:12:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,4,"5");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:13:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:14:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,2,"10");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:15:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:16:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,2,"5");//speed of speaking: grade 5
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:17:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,5," ");//speed,volume,intomation are all set into default
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:18:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:26:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"hello cooki 123");
^
/Users/Ronald/Documents/Arduino/speech_english/speech_english.ino:34:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
SpeechSynthesis.English(ssr,6,"hello cooki 123");
^
In file included from /Users/Ronald/Documents/Arduino/libraries/SpeechSynthesis/SpeechSynthesis.cpp:10:0:
/Users/Ronald/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/avr/include/avr/delay.h:36:2: warning: #warning "This file has been moved to <util/delay.h>." [-Wcpp]
#warning "This file has been moved to <util/delay.h>."
^
Sketch uses 3490 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 985 bytes (12%) of dynamic memory, leaving 7207 bytes for local variables. Maximum is 8192 bytes.
2021-06-29 00:52:29 In this post, I will show you how to convert text to speech using Python. The last example of text to speech conversion, I would like to share with you is audiobooks. We will be building a machine program that will convert our text to speech. 6 Sklearn Mistakes That Silently Tell You Are a Rookie.
myloweslife
lisacarter19794
myloweslife

2017-10-25 06:19:35 Yes it is and it stalled the upload. ... Those are the message from the IDE
ron.soong
