-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from robotology/GoogleDialogModule
Added Google Dialog Module
- Loading branch information
Showing
14 changed files
with
502 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (C) 2019 Fondazione Istituto Italiano di Tecnologia (IIT) | ||
# All Rights Reserved. | ||
# Authors: Vadim Tikhanoff <[email protected]> | ||
|
||
project(googleDialog) | ||
|
||
yarp_add_idl(IDL_GEN_FILES ${PROJECT_NAME}.thrift) | ||
|
||
set(idl ${PROJECT_NAME}.thrift) | ||
set(doc_files ${PROJECT_NAME}.xml) | ||
|
||
source_group("Source Files" FILES ${source}) | ||
source_group("Header Files" FILES ${header}) | ||
source_group("IDL Files" FILES ${idl}) | ||
source_group("DOC Files" FILES ${doc}) | ||
|
||
add_executable(${PROJECT_NAME} main.cpp ${idl} ${IDL_GEN_FILES} ${doc} ${GRPC_SRCS} ${GRPC_HDRS} ) | ||
|
||
message("GRPC_INCLUDE_DIRS = ${GRPC_INCLUDE_DIRS}") | ||
message("GRPC_LIBRARIES = ${GRPC_LIBRARIES}") | ||
message("googleAPIsrc = ${googleAPIsrc}") | ||
|
||
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include) | ||
#target_link_libraries(${PROJECT_NAME} ${YARP_LIBRARIES} ${GRPC_LIBRARIES} googleAPI ) | ||
target_link_libraries(${PROJECT_NAME} ${YARP_LIBRARIES} googleAPI libprotobuf.so libgrpc++.so libgrpc++_alts.so libgrpc++_error_details.so libgrpc++_reflection.so libgrpc_plugin_support.so libgrpcpp_channelz.so ) | ||
install(TARGETS ${PROJECT_NAME} DESTINATION bin) | ||
yarp_install(FILES DESTINATION ${ICUBCONTRIB_MODULES_INSTALL_DIR}) | ||
|
||
add_subdirectory(app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Google Cloud Text to Speech API with YARP | ||
========================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (C) 2019 Fondazione Istituto Italiano di Tecnologia (IIT) | ||
# All Rights Reserved. | ||
# Authors: Vadim Tikhanoff <[email protected]> | ||
|
||
file(GLOB conf ${CMAKE_CURRENT_SOURCE_DIR}/conf/*.ini) | ||
|
||
file(GLOB scripts ${CMAKE_CURRENT_SOURCE_DIR}/scripts/*.xml) | ||
|
||
yarp_install(FILES ${conf} DESTINATION ${ICUBCONTRIB_CONTEXTS_INSTALL_DIR}/${PROJECT_NAME}) | ||
yarp_install(FILES ${scripts} DESTINATION ${ICUBCONTRIB_APPLICATIONS_INSTALL_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name googleDialog | ||
language_code en-US | ||
sample_rate_hertz 16000 |
43 changes: 43 additions & 0 deletions
43
speechInteraction/modules/googleDialog/app/scripts/googleDialog.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<application> | ||
<name>Google_Dialog</name> | ||
|
||
<dependencies> | ||
</dependencies> | ||
|
||
<module> | ||
<name>yarpdev</name> | ||
<parameters>--device AudioRecorderWrapper --context startAudio --from startaudio.ini --channels 1 --rate 16000 --samples 16000</parameters> | ||
<node>localhost</node> | ||
</module> | ||
|
||
<module> | ||
<name>googleSpeech</name> | ||
<parameters>--language_code it-IT</parameters> | ||
<node>localhost</node> | ||
</module> | ||
|
||
<module> | ||
<name>googleSpeechProcess</name> | ||
<node>localhost</node> | ||
</module> | ||
|
||
<connection> | ||
<from>/microphone/audio:o</from> | ||
<to>/googleSpeech/sound:i</to> | ||
<protocol>tcp</protocol> | ||
</connection> | ||
|
||
<connection> | ||
<from>/googleSpeech/commands:rpc</from> | ||
<to>/microphone/rpc</to> | ||
<protocol>tcp</protocol> | ||
</connection> | ||
|
||
<connection> | ||
<from>/googleSpeech/result:o</from> | ||
<to>/googleSpeechProcess/text:i</to> | ||
<protocol>tcp</protocol> | ||
</connection> | ||
|
||
|
||
</application> |
43 changes: 43 additions & 0 deletions
43
speechInteraction/modules/googleDialog/app/scripts/googleSpeechProcess.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<application> | ||
<name>Google_Speech_Processing</name> | ||
|
||
<dependencies> | ||
</dependencies> | ||
|
||
<module> | ||
<name>yarpdev</name> | ||
<parameters>--device AudioRecorderWrapper --context startAudio --from startaudio.ini --channels 1 --rate 16000 --samples 16000</parameters> | ||
<node>localhost</node> | ||
</module> | ||
|
||
<module> | ||
<name>googleSpeech</name> | ||
<parameters>--language_code it-IT</parameters> | ||
<node>localhost</node> | ||
</module> | ||
|
||
<module> | ||
<name>googleSpeechProcess</name> | ||
<node>localhost</node> | ||
</module> | ||
|
||
<connection> | ||
<from>/microphone/audio:o</from> | ||
<to>/googleSpeech/sound:i</to> | ||
<protocol>tcp</protocol> | ||
</connection> | ||
|
||
<connection> | ||
<from>/googleSpeech/commands:rpc</from> | ||
<to>/microphone/rpc</to> | ||
<protocol>tcp</protocol> | ||
</connection> | ||
|
||
<connection> | ||
<from>/googleSpeech/result:o</from> | ||
<to>/googleSpeechProcess/text:i</to> | ||
<protocol>tcp</protocol> | ||
</connection> | ||
|
||
|
||
</application> |
27 changes: 27 additions & 0 deletions
27
speechInteraction/modules/googleDialog/googleDialog.thrift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (C) 2019 Fondazione Istituto Italiano di Tecnologia (IIT) | ||
# All Rights Reserved. | ||
# Authors: Vadim Tikhanoff <[email protected]> | ||
# | ||
# googleDialog.thrift | ||
|
||
/** | ||
* googleDialog_IDL | ||
* | ||
* IDL Interface to google cloud speech processing. | ||
*/ | ||
|
||
struct Bottle { | ||
} ( | ||
yarp.name = "yarp::os::Bottle" | ||
yarp.includefile = "yarp/os/Bottle.h" | ||
) | ||
|
||
service googleDialog_IDL | ||
{ | ||
/** | ||
* Quit the module. | ||
* @return true/false on success/failure | ||
*/ | ||
bool quit(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<?xml-stylesheet type="text/xsl" href="yarpmanifest.xsl"?> | ||
|
||
<module> | ||
<name>googleDiaglog</name> | ||
<doxygen-group>googleDiaglog</doxygen-group> | ||
<description>This module is responsible for dialoging with goog dialog flow</description> | ||
<copypolicy> Released under the terms of the BSD 3-Clause License.</copypolicy> | ||
<version>0.3.0</version> | ||
|
||
<description-long> | ||
This module This module communicates with the dialogflow google service. | ||
</description-long> | ||
|
||
<arguments> | ||
<param default="googleDiaglog" desc="Module's name; all the open ports will be tagged with the prefix /name.">name</param> | ||
|
||
</arguments> | ||
|
||
<authors> | ||
<author email="ilaria.carlini@@iit.it"> Ilaria Carlini</author> | ||
<author email="[email protected]"> Laura Cavaliere </author> | ||
<author email="[email protected]"> Vadim Tikhanoff </author> | ||
</authors> | ||
|
||
<data> | ||
<input> | ||
<type>Bottle</type> | ||
<port>/googleDialog/text:i</port> | ||
<description> | ||
Port to receive end-user expression | ||
</description> | ||
</input> | ||
<output> | ||
<type>Bottle</type> | ||
<port>/googleDialog/result:o</port> | ||
<description> | ||
Sends the response from the agent | ||
</description> | ||
</output> | ||
</data> | ||
|
||
<services> | ||
<server> | ||
<type>googleDiaglog_IDL</type> | ||
<idl>idl.thrift</idl> | ||
<port>/googleDiaglog/rpc</port> | ||
<description>service port</description> | ||
</server> | ||
</services> | ||
|
||
</module> | ||
|
Oops, something went wrong.