Go to the documentation of this file.
27 #include <Ice/ObjectAdapter.h>
37 usingTopic(getProperty<std::string>(
"TextToSpeechTopicName").getValue());
38 usingTopic(getProperty<std::string>(
"TextToSpeechStateTopicName").getValue());
63 case eStartedSpeaking:
64 return "StartedSpeaking";
65 case eFinishedSpeaking:
66 return "FinishedSpeaking";
69 throw LocalException(
"Unsupported TextToSpeechStateType: ") << state;
75 std::unique_lock lock(dataMutex);
84 std::unique_lock lock(dataMutex);
93 std::unique_lock lock(dataMutex);
106 std::unique_lock lock(dataMutex);
109 obs->setDataField(
"SpeechToText",
"RecognizedText",
Variant(json.
getString(
"text")));
114 std::unique_lock lock(dataMutex);
void updateChannel(const std::string &channelName, const std::set< std::string > &updatedDatafields=std::set< std::string >())
Update all conditions for a channel.
The Variant class is described here: Variants.
IceManagerPtr getIceManager() const
Returns the IceManager.
virtual void reportTextWithParams(const std::string &text, const Ice::StringSeq ¶ms, const Ice::Current &=Ice::emptyCurrent) override
void onConnectObserver() override
Framework hook.
void reportTextWithParams(const std::string &, const Ice::StringSeq &, const Ice::Current &) override
void reportText(const std::string &, const Ice::Current &) override
Ice::ObjectAdapterPtr getObjectAdapter() const
Returns object's Ice adapter.
SpeechListenerImpl(SpeechObserver *obs)
The JSONObject class is used to represent and (de)serialize JSON objects.
friend class SpeechListenerImpl
void onInitObserver() override
Framework hook.
std::string getString(const ::std::string &key) const override
virtual void reportState(armarx::TextToSpeechStateType state, const Ice::Current &=Ice::emptyCurrent) override
void fromString(const ::std::string &jsonString, const ::Ice::Current &=Ice::emptyCurrent) override
void setDataField(const std::string &channelName, const std::string &datafieldName, const Variant &value, bool triggerFilterUpdate=true)
set datafield with datafieldName and in channel channelName
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
static std::string SpeechStateToString(TextToSpeechStateType state)
virtual void reportText(const std::string &text, const Ice::Current &=Ice::emptyCurrent) override
void offerDataFieldWithDefault(std::string channelName, std::string datafieldName, const Variant &defaultValue, std::string description)
Offer a datafield with default value.
This file offers overloads of toIce() and fromIce() functions for STL container types.
void offerChannel(std::string channelName, std::string description)
Offer a channel.