From f43c5d606c7c8a503b4b3134f82e37b6e3c34a2e Mon Sep 17 00:00:00 2001 From: Birte Carlmeyer Date: Mon, 7 Sep 2015 14:01:08 +0200 Subject: [PATCH] added speech hypotheses types in rst proto sandbox hri --- proto/sandbox/rst/hri/SpeechHypotheses.proto | 29 +++++++++++++++ proto/sandbox/rst/hri/SpeechHypothesis.proto | 54 ++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 proto/sandbox/rst/hri/SpeechHypotheses.proto create mode 100644 proto/sandbox/rst/hri/SpeechHypothesis.proto diff --git a/proto/sandbox/rst/hri/SpeechHypotheses.proto b/proto/sandbox/rst/hri/SpeechHypotheses.proto new file mode 100644 index 0000000..9857681 --- /dev/null +++ b/proto/sandbox/rst/hri/SpeechHypotheses.proto @@ -0,0 +1,29 @@ +package rst.hri; + +import "rst/hri/SpeechHypothesis.proto"; + +option java_outer_classname = "SpeechHypothesesType"; + +/** + * A n-best list of speech recognition results. + * + * @author Birte Carlmeyer + * @author Soeren Klett + */ +message SpeechHypotheses { + + /** + * The best speech recognition result. + */ + required SpeechHypothesis best_result = 1; + + /** + * The nbest list of speech recognition result. + */ + repeated SpeechHypothesis nbest_list = 2; + + /** + * Return true, if the result is final. + */ + required bool final = 3; +} diff --git a/proto/sandbox/rst/hri/SpeechHypothesis.proto b/proto/sandbox/rst/hri/SpeechHypothesis.proto new file mode 100644 index 0000000..4d2d55f --- /dev/null +++ b/proto/sandbox/rst/hri/SpeechHypothesis.proto @@ -0,0 +1,54 @@ +package rst.hri; + +import "rst/timing/Interval.proto"; + +option java_outer_classname = "SpeechHypothesisType"; + +/** + * A hypothesis about a speech recognition result. + * + * @author Birte Carlmeyer + * @author Soeren Klett + */ +message SpeechHypothesis { + + + /** + * Speech recognition result for a single word. + */ + message Word { + + /** + * Speech recognition result for a single word. + */ + required string word = 1; + + /** + * Start and end time for this word. + */ + optional timing.Interval timestamps = 2; + + } + + /** + * List of word speech recognition results. + */ + repeated Word words = 1; + + + /** + * Confidence for this speech hypothesis. + */ + // @constraint(0 <= value <= 1) + optional float confidence = 2; + + /** + * Start and end time for this speech hypothesis. + */ + optional timing.Interval timestamp = 3; + + /** + * The grammar tree of this speech hypothesis. + */ + optional string grammar_tree = 4; +} -- 1.9.1