File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,18 @@ extern "C" int system(const char *);
6
6
7
7
TTS::TTS ()
8
8
{
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 )
10
14
{
11
- std::cout << " Using Festival TTS engine." << std::endl;
12
15
engine = Engine::Festival;
13
16
}
14
17
else if (system (" command -v flite > /dev/null 2>&1" ) == 0 )
15
18
{
16
- std::cout << " Using Flite TTS engine." << std::endl;
17
19
engine = Engine::Flite;
18
20
}
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
- }
24
21
else
25
22
{
26
23
throw std::runtime_error (" No supported TTS engine (festival, flite, espeak) found on system." );
You can’t perform that action at this time.
0 commit comments