diff options
author | primiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-16 18:01:43 +0000 |
---|---|---|
committer | primiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-16 18:01:43 +0000 |
commit | e5895e65de6b1f2e28ae134f2e891d5c6334d200 (patch) | |
tree | 663f391c8ee1294da17737b1741541fd0cce6457 | |
parent | a965432b5ff20ab56971ece3c1a5533b9f25061d (diff) | |
download | chromium_src-e5895e65de6b1f2e28ae134f2e891d5c6334d200.zip chromium_src-e5895e65de6b1f2e28ae134f2e891d5c6334d200.tar.gz chromium_src-e5895e65de6b1f2e28ae134f2e891d5c6334d200.tar.bz2 |
Adding protobuf headers that will be used by upcoming continuous speech recognition classes (Speech CL2.2)
BUG=116954
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10384153
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137454 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/speech/proto/google_streaming_api.proto | 47 | ||||
-rw-r--r-- | content/browser/speech/proto/speech_proto.gyp | 19 | ||||
-rw-r--r-- | content/content_browser.gypi | 1 |
3 files changed, 67 insertions, 0 deletions
diff --git a/content/browser/speech/proto/google_streaming_api.proto b/content/browser/speech/proto/google_streaming_api.proto new file mode 100644 index 0000000..fdfb8f0 --- /dev/null +++ b/content/browser/speech/proto/google_streaming_api.proto @@ -0,0 +1,47 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + +// TODO(primiano) Commented out due to compilation errors. What's its purpose? +//option cc_api_version = 2; + +package speech; + +// Used for receiving results from the Google continuous speech recognition +// webservice. +message HttpStreamingResult { + // Used in case of errors. + // TODO(primiano) Not completely sure about its semantic. Ask gshires@. + optional int32 status = 1; + + // TODO(primiano) this seems to be not used anymore. Ask gshires@. + optional int32 id = 2; + + // Definitive results provide an array of hypotheses. + repeated HttpStreamingHypothesis hypotheses = 3; + + // Non definitive results, instead, provide a provisional (read: likely to be + // confirmed) and an ephemeral (read: likely to be changed soon) string. + optional string provisional = 4; + optional string ephemeral = 5; + + // TODO(primiano) this seems to be not used anymore. Ask gshires@. + optional string upstream_url = 6; + + // Used by the webservice to acknowledge the successfull connection of the + // upstream (the one pushing audio data). + optional bool upstream_connected = 7; +} + +// Part of a definitive result. See HttpStreamingResult.hypotheses array. +message HttpStreamingHypothesis { + // Textual transcript of the hypothesis. + optional string utterance = 1; + + // Confidence score associated with the hypothesis. + optional float confidence = 2; +} + diff --git a/content/browser/speech/proto/speech_proto.gyp b/content/browser/speech/proto/speech_proto.gyp new file mode 100644 index 0000000..f26021b --- /dev/null +++ b/content/browser/speech/proto/speech_proto.gyp @@ -0,0 +1,19 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + {'target_name': 'speech_proto', + 'type': 'static_library', + 'sources': [ + 'google_streaming_api.proto', + ], + 'variables': { + 'proto_in_dir': '.', + 'proto_out_dir': 'content/browser/speech/proto', + }, + 'includes': [ '../../../../build/protoc.gypi' ], + }, + ], +} diff --git a/content/content_browser.gypi b/content/content_browser.gypi index a31ab72..3ef8fff 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -5,6 +5,7 @@ { 'dependencies': [ 'browser/debugger/devtools_resources.gyp:devtools_resources', + 'browser/speech/proto/speech_proto.gyp:speech_proto', '../base/base.gyp:base_static', '../crypto/crypto.gyp:crypto', '../net/net.gyp:http_server', |