Skip to content

Commit

Permalink
better doc
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-ramey committed Oct 9, 2016
1 parent 052a824 commit 5837988
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Parameters
the first being the access key, the second the secret key.

* ```~engine``` [std_msgs/String]
Among values "at", "espeak", "festival", "gnustep", "google", "ivona", "marytts"
Among values "at&t", "espeak", "festival", "gnustep", "google", "ivona", "marytts"
"microsoft", "pico2wave", "speech_dispatcher".
Ensure to choose a webservice engine only if connected to the Internet.

Expand Down
12 changes: 6 additions & 6 deletions src/picotts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


enum Engine {
ENGINE_AT,
ENGINE_ATandT,
ENGINE_ESPEAK,
ENGINE_FESTIVAL,
ENGINE_GNUSTEP,
Expand All @@ -50,7 +50,7 @@ std::string _scripts_folder = ros::package::getPath("picotts") + "/scripts";
Engine _engine;
utils::Language _language = "en";
std::vector<std::string> _versions;
// ENGINE_AT
// ENGINE_ATandT
static const std::string TMP_AT_FILE = "/tmp/picotts_at.amr";
CachedFilesMap _at_cache(ros::package::getPath("picotts") + "/data/AT_cache/index.csv");
std::string _at_access_token;
Expand Down Expand Up @@ -180,7 +180,7 @@ void tts_cb(const std_msgs::StringConstPtr & msg) {
// generate command
std::ostringstream command;

if (_engine == ENGINE_AT) {
if (_engine == ENGINE_ATandT) {
if (mplayer_cached_file_if_available(_at_cache, key))
return;
std::string langAt = "en-US";
Expand All @@ -192,7 +192,7 @@ void tts_cb(const std_msgs::StringConstPtr & msg) {
if (at_get_short_chunk(langAt, tosay_clean, TMP_AT_FILE)
&& mplayer_file(TMP_AT_FILE))
_at_cache.add_cached_file(key, TMP_AT_FILE);
} // end if (ENGINE_AT)
} // end if (ENGINE_ATandT)
else if (_engine == ENGINE_ESPEAK) {
// list of languages: $ espeak --voices
// to sort them: $ espeak --voices | awk '{ print $2 }' | sort
Expand Down Expand Up @@ -355,8 +355,8 @@ void tts_cb(const std_msgs::StringConstPtr & msg) {
bool engine_switcher(const std::string & engine_str) {
std::string engine_lower = engine_str;
std::transform(engine_lower.begin(), engine_lower.end(), engine_lower.begin(), ::tolower);
if (engine_lower.find("at") != std::string::npos) {
_engine = ENGINE_AT;
if (engine_lower.find("at&t") != std::string::npos) {
_engine = ENGINE_ATandT;
} else if (engine_lower.find("espeak") != std::string::npos) {
_engine = ENGINE_ESPEAK;
} else if (engine_lower.find("festival") != std::string::npos) {
Expand Down

0 comments on commit 5837988

Please sign in to comment.