From c43941a070d9a711f630fb27853c2bf2a6512b4b Mon Sep 17 00:00:00 2001 From: Marco Randazzo Date: Thu, 23 Jan 2025 15:54:54 +0100 Subject: [PATCH] updated documentation --- doc/release/master.md | 31 +++++++- .../MobileBaseVelocityControl_nws_yarp.cpp | 2 +- src/libYARP_dev/src/yarp/dev/IMap2D.h | 72 +++++++++---------- src/libYARP_dev/src/yarp/dev/INavigation2D.h | 50 +++++++------ src/libYARP_dev/src/yarp/dev/IOdometry2D.h | 4 +- .../src/yarp/dev/ISpeechSynthesizer.h | 18 ++--- .../src/yarp/dev/ISpeechTranscription.h | 6 +- 7 files changed, 106 insertions(+), 77 deletions(-) diff --git a/doc/release/master.md b/doc/release/master.md index 7e6da71490..153bd2bdb4 100644 --- a/doc/release/master.md +++ b/doc/release/master.md @@ -39,8 +39,33 @@ New Features #### `libYARP_dev` * added new class `yarp::dev::ReturnValue` -* modified interfaces `yarp::dev::ISpeechSynthesizer`,`yarp::dev::ISpeechTranscription` to use the new class ReturnValue. - +* The following interfaces have been modified to the new class ReturnValue: + ISpeechSynthesizer + ISpeechTranscription + ILocalization2D + IMap2D + INavigation2D + IOdometry2D + #### `devices` -* modified devices implementing `yarp::dev::ISpeechSynthesizer`,`yarp::dev::ISpeechTranscription` to use the new class ReturnValue. +* Updated all devices which use the interfaces employing the new class `ReturnValue`: + FakeSpeechSynthesizer + FakeSpeechTranscription + FakeNavigation + FakeLocalizer + FakeOdometry2D + Map2DStorage + SpeechTranscription_nws_yarp + SpeechTranscription_nwc_yarp + SpeechSynthesizer_nws_yarp + SpeechSynthesizer_nwc_yarp + Localization2D_nws_yarp + Localization2D_nwc_yarp + Map2D_nws_yarp + Map2D_nwc_yarp + MobileBaseVelocityControl_nws_yarp + MobileBaseVelocityControl_nwc_yarp + Navigation2D_nwc_yarp + Navigation2D_nws_yarp + Odometry2D_nws_yarp diff --git a/src/devices/networkWrappers/mobileBaseVelocityControl_nws_yarp/MobileBaseVelocityControl_nws_yarp.cpp b/src/devices/networkWrappers/mobileBaseVelocityControl_nws_yarp/MobileBaseVelocityControl_nws_yarp.cpp index 8b6ede4187..df630ba037 100644 --- a/src/devices/networkWrappers/mobileBaseVelocityControl_nws_yarp/MobileBaseVelocityControl_nws_yarp.cpp +++ b/src/devices/networkWrappers/mobileBaseVelocityControl_nws_yarp/MobileBaseVelocityControl_nws_yarp.cpp @@ -129,4 +129,4 @@ bool MobileBaseVelocityControl_nws_yarp::read(yarp::os::ConnectionReader& connec yCDebug(MOBVEL_NWS_YARP) << "read() Command failed"; return false; } -} \ No newline at end of file +} diff --git a/src/libYARP_dev/src/yarp/dev/IMap2D.h b/src/libYARP_dev/src/yarp/dev/IMap2D.h index e6af9825a9..241e98a887 100644 --- a/src/libYARP_dev/src/yarp/dev/IMap2D.h +++ b/src/libYARP_dev/src/yarp/dev/IMap2D.h @@ -36,31 +36,31 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D /** Removes all the registered maps from the server. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue clearAllMaps () = 0; /** Stores a map into the map server. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue store_map(const yarp::dev::Nav2D::MapGrid2D& map) = 0; /** Gets a map from the map server. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue get_map(std::string map_name, yarp::dev::Nav2D::MapGrid2D& map) = 0; /** Gets a list containing the names of all registered maps. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue get_map_names(std::vector& map_names) = 0; /** Removes a map from the map server. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue remove_map(std::string map_name) = 0; @@ -68,7 +68,7 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Store a location specified by the user in the world reference frame * @param location_name the name of the location * @param loc the location of the robot - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue storeLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation loc) = 0; @@ -76,7 +76,7 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Store an area * @param area_name the name of the area * @param area the area - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue storeArea(std::string area_name, yarp::dev::Nav2D::Map2DArea area) = 0; @@ -84,7 +84,7 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Store a path * @param path_name the name of the path * @param path the path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue storePath(std::string path_name, yarp::dev::Nav2D::Map2DPath path) = 0; @@ -92,7 +92,7 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Retrieves a location specified by the user in the world reference frame * @param location_name the name of the location * @param loc the location - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getLocation(std::string location_name, yarp::dev::Nav2D::Map2DLocation& loc) = 0; @@ -100,7 +100,7 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Retrieves an area * @param area_name the name of the area * @param area the area - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getArea(std::string area_name, yarp::dev::Nav2D::Map2DArea& area) = 0; @@ -108,49 +108,49 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Retrieves a path * @param path_name the name of the path * @param path the path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getPath(std::string path_name, yarp::dev::Nav2D::Map2DPath& path) = 0; /** * Get a list of the names of all stored locations * @param the returned list of locations names - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getLocationsList(std::vector& locations) = 0; /** * Get a list of the names of all stored areas * @param the returned list of areas names - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getAreasList(std::vector& areas) = 0; /** * Get a list of the names of all stored paths * @param the returned list of paths names - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getPathsList(std::vector& paths) = 0; /** * Get a list of all stored locations * @param the returned list of locations - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getAllLocations(std::vector& locations) = 0; /** * Get a list of all stored areas * @param the returned list of areas - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getAllAreas(std::vector& areas) = 0; /** * Get a list of all stored paths * @param the returned list of paths - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getAllPaths(std::vector& paths) = 0; @@ -158,21 +158,21 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Searches for a location and renames it * @param original_name the name of the area * @param new_name the new name of the area - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue renameLocation(std::string original_name, std::string new_name) = 0; /** * Delete a location * @param location_name the name of the location - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue deleteLocation(std::string location_name) = 0; /** * Delete a path * @param path_name the name of the path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue deletePath(std::string path_name) = 0; @@ -180,7 +180,7 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Searches for an area and renames it * @param original_name the name of the area * @param new_name the new name of the area - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue renameArea(std::string original_name, std::string new_name) = 0; @@ -188,44 +188,44 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Searches for a path and renames it * @param original_name the name of the path * @param new_name the new name of the path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue renamePath(std::string original_name, std::string new_name) = 0; /** * Delete an area * @param area_name the name of the area - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue deleteArea(std::string area_name) = 0; /** * Delete all stored locations - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue clearAllLocations() = 0; /** * Delete all stored areas - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue clearAllAreas() = 0; /** * Delete all stored paths - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue clearAllPaths() = 0; /** * Clear all temporary flags from all stored maps - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue clearAllMapsTemporaryFlags() = 0; /** * Clear all temporary flags from a specific map - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue clearMapTemporaryFlags(std::string map_name) = 0; @@ -233,49 +233,49 @@ class YARP_dev_API yarp::dev::Nav2D::IMap2D * Save a map to disk * @param map_name the name of the area * @param file_name file name with full path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue saveMapToDisk(std::string map_name, std::string file_name) = 0; /** * Load a map from disk * @param file_name file name with full path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue loadMapFromDisk(std::string file_name) = 0; /** * Save a collection of maps to disk * @param file_name file name with full path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue saveMapsCollection(std::string file_name) = 0; /** * Load a collection of maps from disk * @param file_name file name with full path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue loadMapsCollection(std::string file_name) = 0; /** * Save a collection of locations/area/paths etc to disk * @param file_name file name with full path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue saveLocationsAndExtras(std::string file_name) = 0; /** * Load a collection of locations/areas/paths etc from disk * @param file_name file name with full path - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue loadLocationsAndExtras(std::string file_name) = 0; /** - * 99999999999 + * Enable/disables maps compression over the network * @param enable - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue enableMapsCompression(bool enable) = 0; }; diff --git a/src/libYARP_dev/src/yarp/dev/INavigation2D.h b/src/libYARP_dev/src/yarp/dev/INavigation2D.h index a0280ffc35..fb3d914535 100644 --- a/src/libYARP_dev/src/yarp/dev/INavigation2D.h +++ b/src/libYARP_dev/src/yarp/dev/INavigation2D.h @@ -77,7 +77,7 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DVelocityActions * @param y [m/s] * @param theta [deg/s] * @param timeout The velocity command expires after the specified amount of time (by default 0.1 seconds) - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue applyVelocityCommand(double x_vel, double y_vel, double theta_vel, double timeout = 0.1) = 0; @@ -86,7 +86,7 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DVelocityActions * @param x [m/s] * @param y [m/s] * @param theta [deg/s] - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getLastVelocityCommand(double& x_vel, double& y_vel, double& theta_vel) = 0; }; @@ -102,21 +102,21 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DTargetActions /** * Ask the robot to reach a position defined in the world reference frame * @param loc the location to be reached - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue gotoTargetByAbsoluteLocation(yarp::dev::Nav2D::Map2DLocation loc) = 0; /** * Ask the robot to navigate through a set of locations defined in the world reference frame * @param path the locations to be reached - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue followPath(const yarp::dev::Nav2D::Map2DPath& path) = 0; /** * Gets the last navigation target in the world reference frame * @param loc the location of the robot - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getAbsoluteLocationOfCurrentTarget(yarp::dev::Nav2D::Map2DLocation& loc) = 0; @@ -124,7 +124,7 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DTargetActions * Ask the robot to reach a position defined in the robot reference frame. The final orientation of the goal is unspecified. * @param x * @param y - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue gotoTargetByRelativeLocation(double x, double y) = 0; @@ -133,7 +133,7 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DTargetActions * @param x * @param y * @param theta - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue gotoTargetByRelativeLocation(double x, double y, double theta) = 0; @@ -142,7 +142,7 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DTargetActions * @param x * @param y * @param theta - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getRelativeLocationOfCurrentTarget(double& x, double& y, double& theta) = 0; }; @@ -157,33 +157,33 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DControlActions /** * Gets the current status of the navigation task. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getNavigationStatus(NavigationStatusEnum& status) = 0; /** * Terminates the current navigation task. Cannot be resumed. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue stopNavigation() = 0; /** * Ask to the robot to suspend the current navigation task for a defined amount of time. Can be resumed by resume(). * @param time_s - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue suspendNavigation(const double time_s= std::numeric_limits::infinity()) = 0; /** * Resume a previously suspended navigation task. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue resumeNavigation() = 0; /** * Forces the navigation system to recompute the path from the current robot position to the current goal. * If no goal has been set, the command has no effect. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue recomputeCurrentNavigationPath() = 0; @@ -191,14 +191,14 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DControlActions * Returns the list of waypoints generated by the navigation algorithm * @param trajectory_type specifies if we are requesting the waypoints of the global trajectory or the waypoints of the local trajectory * @param waypoints the list of waypoints generated by the navigation algorithm - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getAllNavigationWaypoints(yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type, yarp::dev::Nav2D::Map2DPath& waypoints) = 0; /** * Returns the current waypoint pursued by the navigation algorithm * @param curr_waypoint the current waypoint pursued by the navigation algorithm - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getCurrentNavigationWaypoint(yarp::dev::Nav2D::Map2DLocation& curr_waypoint) = 0; @@ -206,7 +206,7 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DControlActions * Returns the current navigation map processed by the navigation algorithm * @param map_type the map to be requested (e.g. global, local, etc.) * @param map the map, currently used by the navigation algorithm - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getCurrentNavigationMap(yarp::dev::Nav2D::NavigationMapTypeEnum map_type, yarp::dev::Nav2D::MapGrid2D& map) = 0; }; @@ -217,53 +217,57 @@ class YARP_dev_API yarp::dev::Nav2D::INavigation2DExtraActions /** * Ask the robot to reach a previously stored location/area * @param location_name the name of a location/area previously saved - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue gotoTargetByLocationName(std::string location_or_area_name) = 0; /** * Check if the robot is currently inside the specified area * @param area_name the name of an area previously saved - * @return true/false + * @return is_inside true if the robot is inside the area. + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue checkInsideArea(std::string area_name, bool& is_inside) = 0; /** * Check if the robot is currently inside the specified area * @param area the area to be checked - * @return true/false + * @return is_inside true if the robot is inside the area. + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue checkInsideArea(Nav2D::Map2DArea area, bool& is_inside) = 0; /** * Check if the robot is currently near to the specified area * @param loc the location to be checked + * @return is_near true if the robot is near to the area. * @param linear_tolerance linear tolerance [m] * @param angular_tolerance [deg 0-360] - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue checkNearToLocation(Nav2D::Map2DLocation loc, bool& is_near, double linear_tolerance, double angular_tolerance = std::numeric_limits::infinity()) = 0; /** * Check if the robot is currently near to the specified area * @param location_name the name of the location: it will be searched in the server + * @return is_near true if the robot is near to the area. * @param linear_tolerance linear tolerance [m] * @param angular_tolerance [deg] - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue checkNearToLocation(std::string location_name, bool& is_near, double linear_tolerance, double angular_tolerance = std::numeric_limits::infinity()) = 0; /** * Gets the name of the current target, if available (set by gotoTargetByLocationName) * @param location_name the name of the current target - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getNameOfCurrentTarget(std::string& location_name) = 0; /** * Store the current location of the robot * @param location_name the name of the location - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue storeCurrentPosition(std::string location_name) = 0; diff --git a/src/libYARP_dev/src/yarp/dev/IOdometry2D.h b/src/libYARP_dev/src/yarp/dev/IOdometry2D.h index 839552bdfa..0d49a9c020 100644 --- a/src/libYARP_dev/src/yarp/dev/IOdometry2D.h +++ b/src/libYARP_dev/src/yarp/dev/IOdometry2D.h @@ -30,13 +30,13 @@ class YARP_dev_API yarp::dev::Nav2D::IOdometry2D /** * Gets the odometry of the robot, including its velocity expressed in the world and in the local reference frame. * @param odom the odometry. - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getOdometry(yarp::dev::OdometryData& odom, double* timestamp = nullptr) = 0; /** * Resets the odometry of the robot to zero - * @return true/false + * @return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue resetOdometry() = 0; }; diff --git a/src/libYARP_dev/src/yarp/dev/ISpeechSynthesizer.h b/src/libYARP_dev/src/yarp/dev/ISpeechSynthesizer.h index 7ecd28f281..10ff65c893 100644 --- a/src/libYARP_dev/src/yarp/dev/ISpeechSynthesizer.h +++ b/src/libYARP_dev/src/yarp/dev/ISpeechSynthesizer.h @@ -25,56 +25,56 @@ class YARP_dev_API ISpeechSynthesizer /** * Sets the language for speech synthesis. * \param language a string (code) representing the speech language (e.g. ita, eng...). Default value is "auto". - * \return true on success + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue setLanguage(const std::string& language="auto") = 0; /** * Gets the current language set for speech synthesis. * \param language the returned string (code) representing the speech language (e.g. ita, eng...). Default value is "auto". - * \return true on success + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getLanguage(std::string& language) = 0; /** * Sets the voice set for speech synthesis. * \param voice_name the name of of the voice (device dependent). - * \return true on success + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue setVoice(const std::string& voice_name = "auto") = 0; /** * Gets the current voice set for speech synthesis. * \param voice_name the currently used voice (device dependent). - * \return true on success + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getVoice(std::string& voice_name) = 0; /** * Sets the voice speed for speech synthesis. * \param speed the voice speed. - * \return true on success + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue setSpeed(const double speed=0) = 0; /** * Gets the current voice speed. * \param speed the current voice speed. - * \return true on success + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getSpeed(double& speed) = 0; /** * Sets the pitch for speech synthesis. * \param pitch the voice pitch. - * \return true on success + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue setPitch(const double pitch) = 0; /** * Gets the current pitch set for speech synthesis. * \param pitch the current voice pitch. - * \return true on success + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getPitch(double& voice) = 0; @@ -82,7 +82,7 @@ class YARP_dev_API ISpeechSynthesizer * Performs the speech synthesis. * \param text the text to synthesize * \param sound the synthesized audio stream - * \return true on success + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue synthesize(const std::string& text, yarp::sig::Sound& sound) = 0; }; diff --git a/src/libYARP_dev/src/yarp/dev/ISpeechTranscription.h b/src/libYARP_dev/src/yarp/dev/ISpeechTranscription.h index 6f15abd737..9bfe708447 100644 --- a/src/libYARP_dev/src/yarp/dev/ISpeechTranscription.h +++ b/src/libYARP_dev/src/yarp/dev/ISpeechTranscription.h @@ -25,14 +25,14 @@ class YARP_dev_API 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 + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue setLanguage(const std::string& language="auto") = 0; /** * 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 + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue getLanguage(std::string& language) = 0; @@ -41,7 +41,7 @@ class YARP_dev_API ISpeechTranscription * \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 + * \return a ReturnValue, convertible to true/false */ virtual yarp::dev::ReturnValue transcribe(const yarp::sig::Sound& sound, std::string& transcription, double& score) = 0; };