Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: content/public/browser/speech_recognition_session_preamble.h

Issue 820673004: json_schema_compiler: Use std::vector<char> for binary values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simplify_json_schema
Patch Set: Fix merge error. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_PREAMBLE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_PREAMBLE_H_
6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_PREAMBLE_H_ 6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_PREAMBLE_H_
7 7
8 #include <string> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 // The preamble is the few seconds of audio before the speech recognition 15 // The preamble is the few seconds of audio before the speech recognition
16 // starts. This is used to contain trigger audio used to start a voice 16 // starts. This is used to contain trigger audio used to start a voice
17 // query, such as the 'Ok Google' hotword. 17 // query, such as the 'Ok Google' hotword.
18 struct CONTENT_EXPORT SpeechRecognitionSessionPreamble 18 struct CONTENT_EXPORT SpeechRecognitionSessionPreamble
19 : public base::RefCounted<SpeechRecognitionSessionPreamble> { 19 : public base::RefCounted<SpeechRecognitionSessionPreamble> {
20 SpeechRecognitionSessionPreamble(); 20 SpeechRecognitionSessionPreamble();
21 21
22 // Sampling rate (hz) for the preamble data. i.e. 44100, 32000, etc 22 // Sampling rate (hz) for the preamble data. i.e. 44100, 32000, etc
23 int sample_rate; 23 int sample_rate;
24 24
25 // Bytes per sample. 25 // Bytes per sample.
26 int sample_depth; 26 int sample_depth;
27 27
28 // Audio data, in little-endian samples. 28 // Audio data, in little-endian samples.
29 std::string sample_data; 29 std::vector<char> sample_data;
30 30
31 private: 31 private:
32 friend class base::RefCounted<SpeechRecognitionSessionPreamble>; 32 friend class base::RefCounted<SpeechRecognitionSessionPreamble>;
33 ~SpeechRecognitionSessionPreamble(); 33 ~SpeechRecognitionSessionPreamble();
34 }; 34 };
35 35
36 } // namespace content 36 } // namespace content
37 37
38 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_PREAMBLE_H_ 38 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_PREAMBLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698