Skip to content

Commit

Permalink
Merge pull request #3135 from robotology/PythonDevice
Browse files Browse the repository at this point in the history
FakePythonSpeechTranscription
  • Loading branch information
randaz81 authored Sep 12, 2024
2 parents a697bdf + 90c77e9 commit 9e4dfb7
Show file tree
Hide file tree
Showing 11 changed files with 939 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/release/master.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ New Features

* Network protocol now uses IDL thrift

#### FakePythonSpeechTranscription

* Added new device `FakePythonSpeechTranscription`. The device is also an example which demonstrates the encapsulation of python code inside a c++ device implementing a Yarp interface.

### GUIs

#### yarpopencvdisplay
Expand Down
58 changes: 58 additions & 0 deletions src/devices/fake/fakePythonSpeechTranscription/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
# SPDX-License-Identifier: BSD-3-Clause

if (YARP_COMPILE_ALL_FAKE_DEVICES)
set(ENABLE_yarpmod_fakePythonSpeechTranscription ON CACHE BOOL "" FORCE)
endif()

yarp_prepare_plugin(fakePythonSpeechTranscription
CATEGORY device
TYPE FakePythonSpeechTranscription
INCLUDE FakePythonSpeechTranscription.h
GENERATE_PARSER
)

if(ENABLE_fakePythonSpeechTranscription)
find_package(Python REQUIRED Development)
yarp_add_plugin(yarp_fakePythonSpeechTranscription)

target_sources(yarp_fakePythonSpeechTranscription
PRIVATE
FakePythonSpeechTranscription.cpp
FakePythonSpeechTranscription.h
FakePythonSpeechTranscription_ParamsParser.cpp
FakePythonSpeechTranscription_ParamsParser.h
)

target_link_libraries(yarp_fakePythonSpeechTranscription
PRIVATE
YARP::YARP_os
YARP::YARP_dev
Python::Python
)
list(APPEND YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS
YARP_os
YARP_dev
)

yarp_install(
TARGETS yarp_fakePythonSpeechTranscription
EXPORT YARP_${YARP_PLUGIN_MASTER}
COMPONENT ${YARP_PLUGIN_MASTER}
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR}
YARP_INI DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR}
)

yarp_install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/Module.py
DESTINATION ${YARP_CONTEXTS_INSTALL_DIR}/tests/fakePythonSpeechTranscription)

set(YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS ${YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS} PARENT_SCOPE)

set_property(TARGET yarp_fakePythonSpeechTranscription PROPERTY FOLDER "Plugins/Device/Fake")

if(YARP_COMPILE_TESTS)
add_subdirectory(tests)
endif()

endif()
Loading

0 comments on commit 9e4dfb7

Please sign in to comment.