Skip to content

Commit

Permalink
Test speechTranscription_nws_yarp
Browse files Browse the repository at this point in the history
  • Loading branch information
elandini84 committed Jul 13, 2023
1 parent cb4c24e commit 023116b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/devices/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ yarp_begin_plugin_library(yarpmod
add_subdirectory(fakeNavigationDevice)
add_subdirectory(serialPort_nws_yarp)
add_subdirectory(serialPort_nwc_yarp)
add_subdirectory(speechSynthesizer_nws_yarp)
add_subdirectory(speechSynthesizer_nwc_yarp)
#add_subdirectory(speechSynthesizer_nws_yarp)
#add_subdirectory(speechSynthesizer_nwc_yarp)
add_subdirectory(speechTranscription_nws_yarp)
add_subdirectory(speechTranscription_nwc_yarp)
#add_subdirectory(speechTranscription_nwc_yarp)
add_subdirectory(RemoteControlBoard)
add_subdirectory(AnalogSensorClient)
add_subdirectory(AnalogWrapper)
Expand Down
16 changes: 8 additions & 8 deletions src/devices/fakeSpeechTranscription/fakeSpeechTranscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ bool FakeSpeechTranscription::getLanguage(std::string& language)

bool FakeSpeechTranscription::transcribe(const yarp::sig::Sound& sound, std::string& transcription, double& score)
{
if (sound.getSamples() == 0 ||
sound.getChannels() == 0)
{
yCError(FAKE_SPEECHTR) << "Invalid Sound sample received";
transcription = "";
score = 0.0;
return false;
}
// if (sound.getSamples() == 0 ||
// sound.getChannels() == 0)
// {
// yCError(FAKE_SPEECHTR) << "Invalid Sound sample received";
// transcription = "";
// score = 0.0;
// return false;
// }

transcription = "hello world";
score = 1.0;
Expand Down

0 comments on commit 023116b

Please sign in to comment.