You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On ESP32, after playing a SAM voice it never stop to say the last sound.
To find out this you have to modify a little the default example by replacing the delay(); with something not blocking.
Here the example to verify this little bug on ESP32 (and a quick/dirty solution in comments) :
#include<Arduino.h>
#include<ESP8266SAM.h>
#include<AudioOutputI2S.h>unsignedlong previousMillis = 0; // will store last time sam voice was playedconstlong interval = 5000; // inerval between the repeats
AudioOutputI2S *out = NULL;
voidsetup()
{
out = newAudioOutputI2S();
out->begin();
}
voidloop()
{
unsignedlong currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis;
ESP8266SAM *sam = new ESP8266SAM;
sam->Say(out, "Bonjour");
delete sam;
// quick fix to avoird infinite repeat on ESP32 ://out->stop();
}
}
I hesitated to create this issue in ESP8266audio library but I think that the out->stop(); could be added at line 87 of ESP8266SAM.cpp.
Need expert opinion to confirm 😉
The text was updated successfully, but these errors were encountered:
I have found that on the ESP32, I often need to finish each sentance with a SPACE (or a full-stop, or a comma) for example "sam->Say(out, "Hello ");
and this stops the sound at word/sentance end.
BUT, I still also occasionally get and issue on the ESP32 if the battery is getting low, that the above command is repeatedly started but never finished (as if the ESP32 was crashing, but it isn't, and instead the "Say(" function seems to be crashing part way through and repeating, giving me:
"Hel"
"Hel"
"Hel"
"Hel"
until the ESP32 is rebooted (or runs out of power). I haven't found a way of identifying or fixing this yet (other than recharging the battery!) (Although this MIGHT be the "Adafruit MAX98357A i2s 3W amplifier" which is crashing/looping?)
Similar to : earlephilhower/ESP8266Audio#473
On ESP32, after playing a SAM voice it never stop to say the last sound.
To find out this you have to modify a little the default example by replacing the delay(); with something not blocking.
Here the example to verify this little bug on ESP32 (and a quick/dirty solution in comments) :
I hesitated to create this issue in ESP8266audio library but I think that the out->stop(); could be added at line 87 of ESP8266SAM.cpp.
Need expert opinion to confirm 😉
The text was updated successfully, but these errors were encountered: