Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FakePythonSpeechTranscription #3135

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading