Skip to content

Commit 27046cb

Browse files
committed
2 parents 9782364 + 44e94bd commit 27046cb

File tree

6 files changed

+7
-393
lines changed

6 files changed

+7
-393
lines changed

examples/talking-clock/talking-clock.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ void setup() {
4848
ttt.say(timeInfo.time());
4949
}
5050

51+
5152
void loop() {
5253
// speach output
5354
if (timeInfo.update()){
5455
ttt.say(timeInfo.time());
56+
tts.say("SILENCE"); // ESP32: prevent noise at end
5557
}
5658
}

src/AudioDictionary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ AudioDictionaryEntry ExampleAudioDictionaryValues[] = {
5454
{"FIVE", new MemoryStream(five_mp3, five_mp3_len)},
5555
{"FOUR", new MemoryStream(four_mp3, four_mp3_len)},
5656
{"FOURTEEN", new MemoryStream(fourteen_mp3, fourteen_mp3_len)},
57-
{"FOURTY", new MemoryStream(fourty_mp3, fourty_mp3_len)},
57+
{"FORTY", new MemoryStream(forty_mp3, forty_mp3_len)},
5858
{"HUNDRED", new MemoryStream(hundred_mp3, hundred_mp3_len)},
5959
{"MILLION", new MemoryStream(million_mp3, million_mp3_len)},
6060
{"MINUS", new MemoryStream(minus_mp3, minus_mp3_len)},

src/NumberToText.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ class NumberToText : public SimpleTTSBase {
9898
if (dec.toInt()!=0.0){
9999
const char* ch=decimals;
100100
add(third[DOT]);
101-
while (*++ch){
101+
while (*ch){
102102
int idx = (*ch)-48; // convert to index
103103
add(first[idx]);
104+
ch++;
104105
}
105106
}
106107
}

src/SimpleTTSBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class Number {
108108
void set(double value, int digits=2) {
109109
char format[10];
110110
// e.g. %0.2f for 2 digits.
111-
sprintf(format,"%%0.%d2f", digits);
111+
sprintf(format,"%%0.%df", digits);
112112
LOGD("format: %s", format);
113113
memset(buffer, 0, buffer_len);
114114
// convert to string

src/en/all.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "and.h"
55
#include "eighteen.h"
66
#include "fifty.h"
7-
#include "fourty.h"
7+
#include "forty.h"
88
#include "nine.h"
99
#include "one.h"
1010
#include "six.h"

0 commit comments

Comments
 (0)