Skip to content

Commit

Permalink
Merge pull request #2978 from randaz81/speech_interfaces
Browse files Browse the repository at this point in the history
New interfaces for speech transcription and synthesis
  • Loading branch information
randaz81 committed Jun 28, 2023
2 parents f793889 + 940be7b commit a1faa6a
Show file tree
Hide file tree
Showing 52 changed files with 6,683 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/release/yarp_3_8/speech_interfaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
speech_interfaces {#master}
-----------

### libYarp_dev

* added interfaces: ISpeechSynthesizer, ISpeechTranscription

### devices

* added plugins: devices fakeSpeechSynthesizer, fakeSpeechTranscription + tests
* added nws devices: speechSynthesizer_nws_yarp, speechTranscription_nws_yarp + tests

6 changes: 6 additions & 0 deletions src/devices/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ yarp_begin_plugin_library(yarpmod
add_subdirectory(fakeOdometry2D)
add_subdirectory(fakePositionSensor)
add_subdirectory(fakeSerialPort)
add_subdirectory(fakeSpeechSynthesizer)
add_subdirectory(fakeSpeechTranscription)
add_subdirectory(frameTransformClient)
add_subdirectory(frameTransformGet)
add_subdirectory(frameTransformServer)
Expand All @@ -48,6 +50,8 @@ yarp_begin_plugin_library(yarpmod
add_subdirectory(ILocalization2DMsgs)
add_subdirectory(IOdometry2DMsgs)
add_subdirectory(ISerialMsgs)
add_subdirectory(ISpeechSynthesizerMsgs)
add_subdirectory(ISpeechTranscriptionMsgs)
add_subdirectory(DynamixelAX12Ftdi)
add_subdirectory(fakeLaser)
add_subdirectory(fakeLaserWithMotor)
Expand Down Expand Up @@ -85,6 +89,8 @@ 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(speechTranscription_nws_yarp)
add_subdirectory(RemoteControlBoard)
add_subdirectory(AnalogSensorClient)
add_subdirectory(AnalogWrapper)
Expand Down
24 changes: 24 additions & 0 deletions src/devices/ISpeechSynthesizerMsgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
# SPDX-License-Identifier: BSD-3-Clause

if(NOT YARP_COMPILE_DEVICE_PLUGINS)
return()
endif()

include(YarpChooseIDL)
yarp_choose_idl(ISPEECHTRANSCMSG_THRIFT ISpeechSynthesizerMsgs.thrift)

add_library(ISpeechSynthesizerMsgs OBJECT)

target_sources(ISpeechSynthesizerMsgs PRIVATE ${ISPEECHTRANSCMSG_THRIFT_GEN_FILES})

target_link_libraries(ISpeechSynthesizerMsgs
PRIVATE
YARP::YARP_dev
YARP::YARP_os
YARP::YARP_sig
)

target_include_directories(ISpeechSynthesizerMsgs PUBLIC ${ISPEECHTRANSCMSG_THRIFT_BUILD_INTERFACE_INCLUDE_DIRS})

set_property(TARGET ISpeechSynthesizerMsgs PROPERTY FOLDER "Devices/Shared")
48 changes: 48 additions & 0 deletions src/devices/ISpeechSynthesizerMsgs/ISpeechSynthesizerMsgs.thrift
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
* SPDX-License-Identifier: BSD-3-Clause
*/

struct yarp_sig_Sound {
} (
yarp.name = "yarp::sig::Sound"
yarp.includefile = "yarp/sig/Sound.h"
)

struct return_get_language {
1: bool ret = false;
2: string language;
}

struct return_get_voice {
1: bool ret = false;
2: string voice;
}

struct return_get_speed {
1: bool ret = false;
2: double speed;
}

struct return_get_pitch {
1: bool ret = false;
2: double pitch;
}

struct return_synthesize {
1: bool ret = false;
2: yarp_sig_Sound sound;
}

service ISpeechSynthesizerMsgs
{
bool set_language (1:string language);
return_get_language get_language ();
bool set_voice (1:string language);
return_get_voice get_voice ();
bool set_speed (1:double speed);
return_get_speed get_speed ();
bool set_pitch (1:double pitch);
return_get_pitch get_pitch ();
return_synthesize synthesize (1:string text);
}
Loading

0 comments on commit a1faa6a

Please sign in to comment.