LCOV - code coverage report
Current view: top level - dom/media/webspeech/recognition - energy_endpointer_params.cc (source / functions) Hit Total Coverage
Test: output.info Lines: 0 41 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Copyright (c) 2013 The Chromium Authors. All rights reserved.
       2             : //
       3             : // Redistribution and use in source and binary forms, with or without
       4             : // modification, are permitted provided that the following conditions are
       5             : // met:
       6             : //
       7             : //    * Redistributions of source code must retain the above copyright
       8             : // notice, this list of conditions and the following disclaimer.
       9             : //    * Redistributions in binary form must reproduce the above
      10             : // copyright notice, this list of conditions and the following disclaimer
      11             : // in the documentation and/or other materials provided with the
      12             : // distribution.
      13             : //    * Neither the name of Google Inc. nor the names of its
      14             : // contributors may be used to endorse or promote products derived from
      15             : // this software without specific prior written permission.
      16             : //
      17             : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
      18             : // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
      19             : // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
      20             : // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
      21             : // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
      22             : // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
      23             : // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
      24             : // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
      25             : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
      26             : // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
      27             : // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
      28             : 
      29             : #include "energy_endpointer_params.h"
      30             : 
      31             : namespace mozilla {
      32             : 
      33           0 : EnergyEndpointerParams::EnergyEndpointerParams() {
      34           0 :   SetDefaults();
      35           0 : }
      36             : 
      37           0 : void EnergyEndpointerParams::SetDefaults() {
      38           0 :   frame_period_ = 0.01f;
      39           0 :   frame_duration_ = 0.01f;
      40           0 :   endpoint_margin_ = 0.2f;
      41           0 :   onset_window_ = 0.15f;
      42           0 :   speech_on_window_ = 0.4f;
      43           0 :   offset_window_ = 0.15f;
      44           0 :   onset_detect_dur_ = 0.09f;
      45           0 :   onset_confirm_dur_ = 0.075f;
      46           0 :   on_maintain_dur_ = 0.10f;
      47           0 :   offset_confirm_dur_ = 0.12f;
      48           0 :   decision_threshold_ = 150.0f;
      49           0 :   min_decision_threshold_ = 50.0f;
      50           0 :   fast_update_dur_ = 0.2f;
      51           0 :   sample_rate_ = 8000.0f;
      52           0 :   min_fundamental_frequency_ = 57.143f;
      53           0 :   max_fundamental_frequency_ = 400.0f;
      54           0 :   contamination_rejection_period_ = 0.25f;
      55           0 : }
      56             : 
      57           0 : void EnergyEndpointerParams::operator=(const EnergyEndpointerParams& source) {
      58           0 :   frame_period_ = source.frame_period();
      59           0 :   frame_duration_ = source.frame_duration();
      60           0 :   endpoint_margin_ = source.endpoint_margin();
      61           0 :   onset_window_ = source.onset_window();
      62           0 :   speech_on_window_ = source.speech_on_window();
      63           0 :   offset_window_ = source.offset_window();
      64           0 :   onset_detect_dur_ = source.onset_detect_dur();
      65           0 :   onset_confirm_dur_ = source.onset_confirm_dur();
      66           0 :   on_maintain_dur_ = source.on_maintain_dur();
      67           0 :   offset_confirm_dur_ = source.offset_confirm_dur();
      68           0 :   decision_threshold_ = source.decision_threshold();
      69           0 :   min_decision_threshold_ = source.min_decision_threshold();
      70           0 :   fast_update_dur_ = source.fast_update_dur();
      71           0 :   sample_rate_ = source.sample_rate();
      72           0 :   min_fundamental_frequency_ = source.min_fundamental_frequency();
      73           0 :   max_fundamental_frequency_ = source.max_fundamental_frequency();
      74           0 :   contamination_rejection_period_ = source.contamination_rejection_period();
      75           0 : }
      76             : 
      77             : }  //  namespace mozilla

Generated by: LCOV version 1.13