Skip to content

Commit 4b0b2dc

Browse files
committed
Switch default tts to espeak
1 parent 0aaa794 commit 4b0b2dc

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Test/hil/tts/tts.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,18 @@ extern "C" int system(const char *);
66

77
TTS::TTS()
88
{
9-
if (system("command -v festival > /dev/null 2>&1") == 0)
9+
if (system("command -v espeak > /dev/null 2>&1") == 0)
10+
{
11+
engine = Engine::Espeak;
12+
}
13+
else if (system("command -v festival > /dev/null 2>&1") == 0)
1014
{
11-
std::cout << "Using Festival TTS engine." << std::endl;
1215
engine = Engine::Festival;
1316
}
1417
else if (system("command -v flite > /dev/null 2>&1") == 0)
1518
{
16-
std::cout << "Using Flite TTS engine." << std::endl;
1719
engine = Engine::Flite;
1820
}
19-
else if (system("command -v espeak > /dev/null 2>&1") == 0)
20-
{
21-
std::cout << "Using Espeak TTS engine." << std::endl;
22-
engine = Engine::Espeak;
23-
}
2421
else
2522
{
2623
throw std::runtime_error("No supported TTS engine (festival, flite, espeak) found on system.");

0 commit comments

Comments
 (0)