Skip to content

Commit

Permalink
Add speech_recognition_msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-chintan committed Aug 25, 2023
1 parent 63e8789 commit 221b65d
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 0 deletions.
43 changes: 43 additions & 0 deletions speech_recognition_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cmake_minimum_required(VERSION 3.5)
project(speech_recognition_msgs)

# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(std_msgs REQUIRED)

set(msg_files
msg/Grammar.msg
msg/PhraseRule.msg
msg/SpeechRecognitionCandidates.msg
msg/Vocabulary.msg
)

set(srv_files
srv/SpeechRecognition.srv
)

rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
${srv_files}
DEPENDENCIES
std_msgs
ADD_LINTER_TESTS
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_dependencies(rosidl_default_runtime)

ament_package()

5 changes: 5 additions & 0 deletions speech_recognition_msgs/msg/Grammar.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
string name # register this grammar with the name
PhraseRule[] rules

string[] categories
Vocabulary[] vocabularies
2 changes: 2 additions & 0 deletions speech_recognition_msgs/msg/PhraseRule.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
string symbol
string[] definition
2 changes: 2 additions & 0 deletions speech_recognition_msgs/msg/SpeechRecognitionCandidates.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
string[] transcript # candidate words of speech-to-text API
float32[] confidence # confidence of transcript
3 changes: 3 additions & 0 deletions speech_recognition_msgs/msg/Vocabulary.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
string name # register vocabulary with the name.
string[] words
string[] phonemes
31 changes: 31 additions & 0 deletions speech_recognition_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>speech_recognition_msgs</name>
<version>4.3.2</version>
<description>speech_recognition_msgs</description>
<maintainer email="[email protected]">Yuki Furuta</maintainer>

<license>BSD</license>

<url type="website">http://ros.org/wiki/speech_recognition_msgs</url>

<author>Yuki Furuta</author>

<buildtool_depend>ament_cmake</buildtool_depend>

<buildtool_depend>rosidl_default_generators</buildtool_depend>

<depend>std_msgs</depend>

<exec_depend>rosidl_default_runtime</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
9 changes: 9 additions & 0 deletions speech_recognition_msgs/srv/SpeechRecognition.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Vocabulary vocabulary # Specify isolated words candidates to be recognized (Enabled on isolated word mode)
Grammar grammar # Or, specify grammar to be recognized
string grammar_name # Or, simply specify grammar name which is already registered on the server

float32 duration
bool quiet
float32 threshold
---
speech_recognition_msgs/SpeechRecognitionCandidates result

0 comments on commit 221b65d

Please sign in to comment.