Classes | Public Member Functions | Private Attributes
rospeex::Interface Class Reference

#include <rospeex.h>

List of all members.

Classes

class  Impl

Public Member Functions

bool init (bool ss_enable=true, bool sr_enable=true, bool spi_enable=true)
 Initializing rospeex.
 Interface ()
 constructor
void playSound (const std::string &file_name)
 play a sound file.
void recognize (const std::string &data, const std::string &language="ja", const std::string &engine="nict")
 Recognizing voice data.
void registerSRResponse (const SpeechRecognizeCallback &callback)
 Registering a speech recognition callback function.
void registerSRResponse (void(*fp)(const std::string &msg))
 Registering a speech recognition callback function.
void registerSSResponse (const SpeechSynthesisCallback &callback)
 Registering a speech synthesis callback function.
void registerSSResponse (void(*fp)(const std::string &data))
 Registering a speech synthesis callback function.
void say (const std::string &msg, const std::string &language="ja", const std::string &engine="nict", const std::string &voice_font="*")
 Performs speech synthesis, and outputs to the speaker.
void setSPIConfig (const std::string &language="ja", const std::string &engine="nict")
 Setting signal processing interface (wave monitor) parameters.
void tts (const std::string &msg, const std::string &file, const std::string &language="ja", const std::string &engine="nict", const std::string &voice_font="*")
 Performs speech synthesis, and outputs to the wave file.
virtual ~Interface ()
 destructor

Private Attributes

boost::shared_ptr< Implimpl_

Detailed Description

Definition at line 19 of file rospeex.h.


Constructor & Destructor Documentation

Interface::Interface ( )

constructor

Definition at line 161 of file rospeex.cpp.

Interface::~Interface ( ) [virtual]

destructor

Definition at line 166 of file rospeex.cpp.


Member Function Documentation

bool Interface::init ( bool  ss_enable = true,
bool  sr_enable = true,
bool  spi_enable = true 
)

Initializing rospeex.

Parameters:
[in]ss_enableset true to enable speech synthesis
[in]sr_enableset true to enable speech recognition
[in]spi_enableset true to enable signal processing interface (waveform monitor)
Returns:
true: succeed, false: failed

Definition at line 170 of file rospeex.cpp.

void Interface::playSound ( const std::string &  file_name)

play a sound file.

Parameters:
[in]file_namesound file name (file location: rospeex/sound)

Definition at line 385 of file rospeex.cpp.

void Interface::recognize ( const std::string &  data,
const std::string &  language = "ja",
const std::string &  engine = "nict" 
)

Recognizing voice data.

Parameters:
[in]datavoice file (wave format: 16kHz, 16bit, mono, LE)
[in]languagelanguage setting (ja, en, zh, ko)
[in]enginespeech recognition engine setting (nict or google) (nict: supports ja, en, zh, ko; google: supports ja, en)

Definition at line 318 of file rospeex.cpp.

void Interface::registerSRResponse ( const SpeechRecognizeCallback callback)

Registering a speech recognition callback function.

Parameters:
[in]callbackform: boost::function<void(const std::string&)> std::string: speech recognition result surface string

Definition at line 341 of file rospeex.cpp.

void Interface::registerSRResponse ( void(*)(const std::string &msg)  fp)

Registering a speech recognition callback function.

Parameters:
[in]fpform: void(*fp)(const std::string& msg) msg: speech recognition result surface string

Definition at line 347 of file rospeex.cpp.

void Interface::registerSSResponse ( const SpeechSynthesisCallback callback)

Registering a speech synthesis callback function.

Parameters:
[in]callbackform: boost::function<void(const std::string&)> std::string: speech synthesis result audio file (wave)

Definition at line 353 of file rospeex.cpp.

void Interface::registerSSResponse ( void(*)(const std::string &data)  fp)

Registering a speech synthesis callback function.

Parameters:
[in]fpform: void(*fp)(const std::string& msg) data: speech synthesis result audio file (wave)

Definition at line 359 of file rospeex.cpp.

void Interface::say ( const std::string &  msg,
const std::string &  language = "ja",
const std::string &  engine = "nict",
const std::string &  voice_font = "*" 
)

Performs speech synthesis, and outputs to the speaker.

Parameters:
[in]msgtext to perform speech synthesis
[in]languagelanguage setting (ja, en, zh, ko)
[in]enginespeech synthesis engine setting (nict or google or voicetext) (nict: supports ja, en, zh, ko; google: supports ja, en)
[in]voice_fontvoice font setting (nict(ja): F128 or F117, nict(en): EF007, nict(zh): CJF101, nict(ko): KF001, google(ja/en): None, voicetext(ja): show, haruka, hikari, takeru, santa, bear)

Definition at line 265 of file rospeex.cpp.

void Interface::setSPIConfig ( const std::string &  language = "ja",
const std::string &  engine = "nict" 
)

Setting signal processing interface (wave monitor) parameters.

Parameters:
[in]languagelanguage setting (ja, en, zh, ko)
[in]enginespeech recognition engine setting (nict or google) (nict: supports ja, en, zh, ko; google: supports ja, en)

Definition at line 365 of file rospeex.cpp.

void Interface::tts ( const std::string &  msg,
const std::string &  file,
const std::string &  language = "ja",
const std::string &  engine = "nict",
const std::string &  voice_font = "*" 
)

Performs speech synthesis, and outputs to the wave file.

Parameters:
[in]msgtext to perform speech synthesis
[in]filefilepath to output
[in]languagelanguage setting (ja, en, zh, ko)
[in]enginespeech synthesis engine setting (nict or google) (nict: supports ja, en, zh, ko; google: supports ja, en)
[in]voice_fontvoice font setting (nict(ja): F128 or F117, nict(en): EF007, nict(zh): CJF101, nict(ko): KF001, google(ja/en): None, voicetext(ja): show, haruka, hikari, takeru, santa, bear)

Definition at line 291 of file rospeex.cpp.


Member Data Documentation

boost::shared_ptr<Impl> rospeex::Interface::impl_ [private]

Definition at line 138 of file rospeex.h.


The documentation for this class was generated from the following files:


rospeex_if
Author(s): Komei Sugiura
autogenerated on Thu Apr 20 2017 03:08:57