Skip to content

Commit

Permalink
Documentation, variable names fix and carrier removal
Browse files Browse the repository at this point in the history
  • Loading branch information
elandini84 committed Jul 10, 2023
1 parent ab76c06 commit 83cb252
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ bool SpeechTranscription_nwc_yarp::open(yarp::os::Searchable& config)
}
m_thrift_server_name = config.find("remote").asString();

if(config.check("carrier"))
{
m_carrier_name = config.find("carrier").asString();
}

std::string thriftClientPortName = m_local_name + "/thrift:c";
std::string thriftServerPortName = m_thrift_server_name + "/rpc";

Expand All @@ -59,7 +54,7 @@ bool SpeechTranscription_nwc_yarp::open(yarp::os::Searchable& config)
return false;
}

if(!yarp::os::Network::connect(thriftClientPortName, thriftServerPortName, m_carrier_name))
if(!yarp::os::Network::connect(thriftClientPortName, thriftServerPortName))
{
yCError(SPEECHTR_NWC) << "Network::connect() failed: could not connect" << thriftClientPortName << "with" << thriftServerPortName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
* | Parameter name | SubParameter | Type | Units | Default Value | Required | Description | Notes |
* |:--------------:|:------------:|:-------:|:--------------:|:-------------:|:-----------: |:-----------------------------------------------------------------------------------------------------:|:-----:|
* | local | - | string | - | - | Yes | Full port name opened by the device. | |
* | server | - | string | - | - | Yes | Full port name of the port remotely opened by the server, to which this client connects to. | |
* | carrier | - | string | - | tcp | No | The carrier used for the connection with the server. | |
* | remote | - | string | - | - | Yes | Full port name of the port remotely opened by the server, to which this client connects to. | |
*/

class SpeechTranscription_nwc_yarp :
Expand All @@ -59,27 +58,8 @@ class SpeechTranscription_nwc_yarp :
bool close() override;

//yarp::dev::ISpeechTranscription
/**
* Sets the language for speech transcription.
* \param language a string (code) representing the speech language (e.g. ita, eng...). Default value is "auto".
* \return true on success
*/
bool setLanguage(const std::string& language="auto") override;

/**
* Gets the current language set for speech transcription.
* \param language the returned string (code) representing the speech language (e.g. ita, eng...). Default value is "auto".
* \return true on success
*/
bool getLanguage(std::string& language) override;

/**
* Performs the speech transcription.
* \param sound the audio data to transcribe
* \param transcription the returned transcription (it may be empty)
* \param score the returned score/confidence value in the range (0-1.0). It may be not implemented.
* \return true on success
*/
bool transcribe(const yarp::sig::Sound& sound, std::string& transcription, double& score) override;

// Parameters
Expand All @@ -90,7 +70,6 @@ class SpeechTranscription_nwc_yarp :
yarp::os::Port m_thriftClientPort;
std::string m_local_name;
std::string m_thrift_server_name;
std::string m_carrier_name{"tcp"};
};


Expand Down

0 comments on commit 83cb252

Please sign in to comment.