From 6cce8c8b7eb5e0890b2de247fc679e75b6cbdb65 Mon Sep 17 00:00:00 2001 From: iory Date: Mon, 27 Dec 2021 15:18:44 +0900 Subject: [PATCH] Add SentenceInfo.msg and WordInfo.msg --- speech_recognition_msgs/CMakeLists.txt | 2 ++ speech_recognition_msgs/msg/SentenceInfo.msg | 2 ++ .../msg/SpeechRecognitionCandidates.msg | 3 ++- speech_recognition_msgs/msg/WordInfo.msg | 7 +++++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 speech_recognition_msgs/msg/SentenceInfo.msg create mode 100644 speech_recognition_msgs/msg/WordInfo.msg diff --git a/speech_recognition_msgs/CMakeLists.txt b/speech_recognition_msgs/CMakeLists.txt index 47fed7a..4fc2156 100644 --- a/speech_recognition_msgs/CMakeLists.txt +++ b/speech_recognition_msgs/CMakeLists.txt @@ -10,8 +10,10 @@ add_message_files( FILES Grammar.msg PhraseRule.msg + SentenceInfo.msg SpeechRecognitionCandidates.msg Vocabulary.msg + WordInfo.msg ) add_service_files( diff --git a/speech_recognition_msgs/msg/SentenceInfo.msg b/speech_recognition_msgs/msg/SentenceInfo.msg new file mode 100644 index 0000000..6b2d813 --- /dev/null +++ b/speech_recognition_msgs/msg/SentenceInfo.msg @@ -0,0 +1,2 @@ +Header header +speech_recognition_msgs/WordInfo[] words diff --git a/speech_recognition_msgs/msg/SpeechRecognitionCandidates.msg b/speech_recognition_msgs/msg/SpeechRecognitionCandidates.msg index 8c8dae1..1fce5db 100644 --- a/speech_recognition_msgs/msg/SpeechRecognitionCandidates.msg +++ b/speech_recognition_msgs/msg/SpeechRecognitionCandidates.msg @@ -1,2 +1,3 @@ string[] transcript # candidate words of speech-to-text API -float32[] confidence # confidence of transcript \ No newline at end of file +float32[] confidence # confidence of transcript +speech_recognition_msgs/SentenceInfo[] sentences # contains the beginning and ending times of each word. diff --git a/speech_recognition_msgs/msg/WordInfo.msg b/speech_recognition_msgs/msg/WordInfo.msg new file mode 100644 index 0000000..38af2f9 --- /dev/null +++ b/speech_recognition_msgs/msg/WordInfo.msg @@ -0,0 +1,7 @@ +# please see below URL for more details. +# https://cloud.google.com/speech-to-text/docs/reference/rest/v1/speech/recognize#wordinfo +float64 start_time +float64 end_time +string word +float64 confidence +int32 speaker_tag