Skip to content

How to stop my program untill espeak ends speaking? #123

@rezaee

Description

@rezaee

Let's consider I have a for(;;) loop, it gets a new string by every iteration, and passes it to system("espeak") like this:


for(;;)
{
   string str = getNewString();
   string str2 = "espeak '" +str+ "'";
   system(str2.c_str());
}

But when the first str passes to espeak it starts to say it, but before it ends the speaking, for loop runs again and passes a new string and it crashes.

I am looking a way, my program pauses the for loop untill the espeak done! Is it possible? How?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions