• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include "content/browser/speech/endpointer/energy_endpointer_params.h"
6 
7 namespace content {
8 
EnergyEndpointerParams()9 EnergyEndpointerParams::EnergyEndpointerParams() {
10   SetDefaults();
11 }
12 
SetDefaults()13 void EnergyEndpointerParams::SetDefaults() {
14   frame_period_ = 0.01f;
15   frame_duration_ = 0.01f;
16   endpoint_margin_ = 0.2f;
17   onset_window_ = 0.15f;
18   speech_on_window_ = 0.4f;
19   offset_window_ = 0.15f;
20   onset_detect_dur_ = 0.09f;
21   onset_confirm_dur_ = 0.075f;
22   on_maintain_dur_ = 0.10f;
23   offset_confirm_dur_ = 0.12f;
24   decision_threshold_ = 150.0f;
25   min_decision_threshold_ = 50.0f;
26   fast_update_dur_ = 0.2f;
27   sample_rate_ = 8000.0f;
28   min_fundamental_frequency_ = 57.143f;
29   max_fundamental_frequency_ = 400.0f;
30   contamination_rejection_period_ = 0.25f;
31 }
32 
operator =(const EnergyEndpointerParams & source)33 void EnergyEndpointerParams::operator=(const EnergyEndpointerParams& source) {
34   frame_period_ = source.frame_period();
35   frame_duration_ = source.frame_duration();
36   endpoint_margin_ = source.endpoint_margin();
37   onset_window_ = source.onset_window();
38   speech_on_window_ = source.speech_on_window();
39   offset_window_ = source.offset_window();
40   onset_detect_dur_ = source.onset_detect_dur();
41   onset_confirm_dur_ = source.onset_confirm_dur();
42   on_maintain_dur_ = source.on_maintain_dur();
43   offset_confirm_dur_ = source.offset_confirm_dur();
44   decision_threshold_ = source.decision_threshold();
45   min_decision_threshold_ = source.min_decision_threshold();
46   fast_update_dur_ = source.fast_update_dur();
47   sample_rate_ = source.sample_rate();
48   min_fundamental_frequency_ = source.min_fundamental_frequency();
49   max_fundamental_frequency_ = source.max_fundamental_frequency();
50   contamination_rejection_period_ = source.contamination_rejection_period();
51 }
52 
53 }  //  namespace content
54