#include <rospeex.h>
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< Impl > | impl_ |
Interface::Interface | ( | ) |
constructor
Definition at line 176 of file rospeex.cpp.
Interface::~Interface | ( | ) | [virtual] |
destructor
Definition at line 181 of file rospeex.cpp.
bool Interface::init | ( | bool | ss_enable = true , |
bool | sr_enable = true , |
||
bool | spi_enable = true |
||
) |
Initializing rospeex.
[in] | ss_enable | set true to enable speech synthesis |
[in] | sr_enable | set true to enable speech recognition |
[in] | spi_enable | set true to enable signal processing interface (waveform monitor) |
Definition at line 185 of file rospeex.cpp.
void Interface::playSound | ( | const std::string & | file_name | ) |
play a sound file.
[in] | file_name | sound file name (file location: rospeex/sound) |
Definition at line 389 of file rospeex.cpp.
void Interface::recognize | ( | const std::string & | data, |
const std::string & | language = "ja" , |
||
const std::string & | engine = "nict" |
||
) |
Recognizing voice data.
[in] | data | voice file (wave format: 16kHz, 16bit, mono, LE) |
[in] | language | language setting (ja, en, zh, ko) |
[in] | engine | speech recognition engine setting (nict or google) (nict: supports ja, en, zh, ko; google: supports ja, en) |
Definition at line 333 of file rospeex.cpp.
void Interface::registerSRResponse | ( | const SpeechRecognizeCallback & | callback | ) |
Registering a speech recognition callback function.
[in] | callback | form: boost::function<void(const std::string&)> std::string: speech recognition result surface string |
Definition at line 358 of file rospeex.cpp.
void Interface::registerSRResponse | ( | void(*)(const std::string &msg) | fp | ) |
Registering a speech recognition callback function.
[in] | fp | form: void(*fp)(const std::string& msg) msg: speech recognition result surface string |
Definition at line 364 of file rospeex.cpp.
void Interface::registerSSResponse | ( | const SpeechSynthesisCallback & | callback | ) |
Registering a speech synthesis callback function.
[in] | callback | form: boost::function<void(const std::string&)> std::string: speech synthesis result audio file (wave) |
Definition at line 370 of file rospeex.cpp.
void Interface::registerSSResponse | ( | void(*)(const std::string &data) | fp | ) |
Registering a speech synthesis callback function.
[in] | fp | form: void(*fp)(const std::string& msg) data: speech synthesis result audio file (wave) |
Definition at line 376 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.
[in] | msg | text to perform speech synthesis |
[in] | language | language setting (ja, en, zh, ko) |
[in] | engine | speech synthesis engine setting (nict or google or voicetext) (nict: supports ja, en, zh, ko; google: supports ja, en) |
[in] | voice_font | voice 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 280 of file rospeex.cpp.
void Interface::setSPIConfig | ( | const std::string & | language = "ja" , |
const std::string & | engine = "nict" |
||
) |
Setting signal processing interface (wave monitor) parameters.
[in] | language | language setting (ja, en, zh, ko) |
[in] | engine | speech recognition engine setting (nict or google) (nict: supports ja, en, zh, ko; google: supports ja, en) |
Definition at line 382 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.
[in] | msg | text to perform speech synthesis |
[in] | file | filepath to output |
[in] | language | language setting (ja, en, zh, ko) |
[in] | engine | speech synthesis engine setting (nict or google) (nict: supports ja, en, zh, ko; google: supports ja, en) |
[in] | voice_font | voice 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 306 of file rospeex.cpp.
boost::shared_ptr<Impl> rospeex::Interface::impl_ [private] |