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

Side by Side Diff: content/browser/speech/endpointer/endpointer.cc

Issue 9568002: Renamed speech input implementation from to speech_recognition_*. The namespace has been renamed fr… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased from master. Created 8 years, 9 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/speech/endpointer/endpointer.h" 5 #include "content/browser/speech/endpointer/endpointer.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 8
9 using base::Time; 9 using base::Time;
10 10
11 namespace { 11 namespace {
12 static const int kFrameRate = 50; // 1 frame = 20ms of audio. 12 static const int kFrameRate = 50; // 1 frame = 20ms of audio.
13 } 13 }
14 14
15 namespace speech_input { 15 namespace speech {
16 16
17 Endpointer::Endpointer(int sample_rate) 17 Endpointer::Endpointer(int sample_rate)
18 : speech_input_possibly_complete_silence_length_us_(-1), 18 : speech_input_possibly_complete_silence_length_us_(-1),
19 speech_input_complete_silence_length_us_(-1), 19 speech_input_complete_silence_length_us_(-1),
20 audio_frame_time_us_(0), 20 audio_frame_time_us_(0),
21 sample_rate_(sample_rate), 21 sample_rate_(sample_rate),
22 frame_size_(0) { 22 frame_size_(0) {
23 Reset(); 23 Reset();
24 24
25 frame_size_ = static_cast<int>(sample_rate / static_cast<float>(kFrameRate)); 25 frame_size_ = static_cast<int>(sample_rate / static_cast<float>(kFrameRate));
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 speech_input_complete_ = true; 158 speech_input_complete_ = true;
159 } 159 }
160 } 160 }
161 } 161 }
162 old_ep_status_ = ep_status; 162 old_ep_status_ = ep_status;
163 } 163 }
164 return ep_status; 164 return ep_status;
165 } 165 }
166 166
167 } // namespace speech 167 } // namespace speech
OLDNEW
« no previous file with comments | « content/browser/speech/endpointer/endpointer.h ('k') | content/browser/speech/endpointer/endpointer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698