From 1950a8ea30c427be7a232f5e3040a2382830c900 Mon Sep 17 00:00:00 2001 From: BennyR Date: Fri, 9 May 2014 11:08:02 +0200 Subject: [PATCH] A nicer print statement --- cerevoice_tts/src/CerevoiceTts.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cerevoice_tts/src/CerevoiceTts.cpp b/cerevoice_tts/src/CerevoiceTts.cpp index 5d2b4d3..d4041a3 100644 --- a/cerevoice_tts/src/CerevoiceTts.cpp +++ b/cerevoice_tts/src/CerevoiceTts.cpp @@ -213,7 +213,11 @@ void CerevoiceTts::executeCB(const cerevoice_tts_msgs::TtsGoalConstPtr &goal) cerevoice_tts_msgs::TtsResult result; std::string xml = constructXml(goal->text, goal->voice); - ROS_INFO("Will now use voice %s synthesize the text: %s", goal->voice.c_str(), goal->text.c_str()); + if(!goal->voice.empty()) + ROS_INFO("Will now use voice %s to synthesize the text: %s", goal->voice.c_str(), goal->text.c_str()); + else + ROS_INFO("Will now use the default voice to synthesize the text: %s", goal->text.c_str()); + // synthesize the text if(!CPRCEN_engine_channel_speak(engine_, channel_handle_, xml.c_str(), xml.length(), 0)) // 0 = do not flush {