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
I'm using your library to play wav files stored on an SD_MMC file system to generate a simple TTS system.
bool play_file(char *filename, int volume)
{
Serial.println("play_file: '" + String(filename) + "'");
if (!SD_MMC.exists(filename)) {
Serial.println("play_file: '" + String(filename) + "' does not exist");
return false;
}
es8311_voice_volume_set(es_handle, volume, NULL);
audio.connecttoFS(SD_MMC,filename);
return true;
}
void SoundLoop()
{
if (audio.isRunning())
{
audio.loop();
vTaskDelay(1);
return;
}
// next file in the vector?
if (!fileVector.empty())
{
// pop next filename from the playlist
String fileName = fileVector.front();
fileVector.erase(fileVector.begin());
play_file((char*)fileName.c_str(),DEFAULT_VOICE_VOLUME);
}
}
/* add a file to the audio queue, file already checked for existance on SD */
void add_file(char* filePath)
{
fileVector.push_back(String(filePath));
}
While this works, there's a noticable delay between each audio file.
I suspect this is caused by the load time of the next file, but I have no idea how to improve this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using your library to play wav files stored on an SD_MMC file system to generate a simple TTS system.
While this works, there's a noticable delay between each audio file.
I suspect this is caused by the load time of the next file, but I have no idea how to improve this.
Beta Was this translation helpful? Give feedback.
All reactions