Skip to content

Commit

Permalink
Small corrections for compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
JGMonroy committed Jul 1, 2014
1 parent be4c6b1 commit 6ada22e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
23 changes: 5 additions & 18 deletions SpeechSynth/CSpeechSynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,19 @@
| |
+---------------------------------------------------------------------------+ */

/** @moos_module A module to keep the high-level tasks commanded to the robot.
*
/** @moos_module A simple module to provide easy text to speech.
* The module gets the text to synthesize via the OpenMORA variable SAY, and copy it to the OS clipboard.
* It is designed to work with applications such as IVONE that reproduces all text present in the clipboard.
*/

#include "CSpeechSynth.hpp"

#include <sstream>
#include <iomanip>
#include <iostream>

using namespace std;

using namespace mrpt;
using namespace mrpt::utils;
//using namespace ....


CSpeechSynthApp::CSpeechSynthApp()
Expand All @@ -55,20 +53,11 @@ CSpeechSynthApp::~CSpeechSynthApp()
bool CSpeechSynthApp::OnStartUp()
{
// Read parameters (if any) from the mission configuration file.
//! @moos_param PARAM_NAME PARAM DESCRIPTION IN ONE LINE
//m_MissionReader.GetConfigurationParam("my_param",m_myvar);

// There is also a MRPT-like object (this->m_ini) that is a wrapper
// to read from the module config block of the current MOOS mission file.
// m_ini.read_int(...);
return DoRegistrations();
}

bool CSpeechSynthApp::Iterate()
{
// Are there


return true;
}

Expand All @@ -90,7 +79,7 @@ bool CSpeechSynthApp::OnCommandMsg( CMOOSMsg Msg )

bool CSpeechSynthApp::DoRegistrations()
{
//! @moos_subscribe NEW_TASK
//! @moos_subscribe SAY
AddMOOSVariable("SAY","SAY","SAY",0);

RegisterMOOSVariables();
Expand All @@ -103,11 +92,9 @@ bool CSpeechSynthApp::OnNewMail(MOOSMSG_LIST &NewMail)
std::string cad;
for(MOOSMSG_LIST::iterator i=NewMail.begin();i!=NewMail.end();++i)
{

if (i->GetName()=="SAY")
{

MOOSTrace("Received talk: %s\n",i->GetString().c_str());
MOOSTrace("[SpeechSynth]: Received text: %s\n",i->GetString().c_str());

const size_t len = strlen(i->GetString().c_str()) + 1;
HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, len);
Expand Down
4 changes: 2 additions & 2 deletions SpeechSynth/CSpeechSynth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#ifndef CSpeechSynth_H
#define CSpeechSynth_H

#include <MOOSLIB/MOOSApp.h>
#include <mrpt/base.h>
#include <MOOS/libMOOS/App/MOOSApp.h>
#include <COpenMORAMOOSApp.h>

class CSpeechSynthApp : public CMOOSApp
{
Expand Down

0 comments on commit 6ada22e

Please sign in to comment.