Popular sites on the NTP: Try to keep the ordering constant
[chromium-blink-merge.git] / content / public / browser / speech_recognition_session_preamble.h
blob589953184d5ce1fd1d473cb63c3d8c26e727d5f3
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_PREAMBLE_H_
6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_PREAMBLE_H_
8 #include <vector>
10 #include "base/memory/ref_counted.h"
11 #include "content/common/content_export.h"
13 namespace content {
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
17 // query, such as the 'Ok Google' hotword.
18 struct CONTENT_EXPORT SpeechRecognitionSessionPreamble
19 : public base::RefCounted<SpeechRecognitionSessionPreamble> {
20 SpeechRecognitionSessionPreamble();
22 // Sampling rate (hz) for the preamble data. i.e. 44100, 32000, etc
23 int sample_rate;
25 // Bytes per sample.
26 int sample_depth;
28 // Audio data, in little-endian samples.
29 std::vector<char> sample_data;
31 private:
32 friend class base::RefCounted<SpeechRecognitionSessionPreamble>;
33 ~SpeechRecognitionSessionPreamble();
36 } // namespace content
38 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_PREAMBLE_H_