espeak_ng_InitializePath(data_path); | espeak_ng_InitializePath(data_path); | ||||
espeak_ng_STATUS result = espeak_ng_Initialize(); | espeak_ng_STATUS result = espeak_ng_Initialize(); | ||||
if (result != ENS_OK) { | if (result != ENS_OK) { | ||||
if (result == ENS_VERSION_MISMATCH) | |||||
fprintf(stderr, "Wrong version of espeak-data\n"); | |||||
else | |||||
fprintf(stderr, "Failed to load espeak-data\n"); | |||||
espeak_ng_PrintStatusCodeMessage(result, stderr); | |||||
exit(1); | exit(1); | ||||
} | } | ||||
espeak_ng_InitializePath(path); | espeak_ng_InitializePath(path); | ||||
espeak_ng_STATUS result = espeak_ng_Initialize(); | espeak_ng_STATUS result = espeak_ng_Initialize(); | ||||
if (result != ENS_OK) { | if (result != ENS_OK) { | ||||
if (result == ENS_VERSION_MISMATCH) | |||||
fprintf(stderr, "Wrong version of espeak-data\n"); | |||||
else { | |||||
fprintf(stderr, "Failed to load espeak-data\n"); | |||||
if ((options & espeakINITIALIZE_DONT_EXIT) == 0) | |||||
exit(1); | |||||
} | |||||
espeak_ng_PrintStatusCodeMessage(result, stderr); | |||||
if ((options & espeakINITIALIZE_DONT_EXIT) == 0) | |||||
exit(1); | |||||
} | } | ||||
switch (output_type) | switch (output_type) |
espeak_ng_InitializePath(data_path); | espeak_ng_InitializePath(data_path); | ||||
espeak_ng_STATUS result = espeak_ng_Initialize(); | espeak_ng_STATUS result = espeak_ng_Initialize(); | ||||
if (result != ENS_OK) { | if (result != ENS_OK) { | ||||
if (result == ENS_VERSION_MISMATCH) | |||||
fprintf(stderr, "Wrong version of espeak-data (expected 0x%x) at %s\n", version_phdata, path_home); | |||||
else | |||||
fprintf(stderr, "Failed to load espeak-data\n"); | |||||
espeak_ng_PrintStatusCodeMessage(result, stderr); | |||||
exit(1); | exit(1); | ||||
} | } | ||||