OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 }; | 908 }; |
909 | 909 |
910 virtual int set_level(Level level) = 0; | 910 virtual int set_level(Level level) = 0; |
911 virtual Level level() const = 0; | 911 virtual Level level() const = 0; |
912 | 912 |
913 // Returns the internally computed prior speech probability of current frame | 913 // Returns the internally computed prior speech probability of current frame |
914 // averaged over output channels. This is not supported in fixed point, for | 914 // averaged over output channels. This is not supported in fixed point, for |
915 // which |kUnsupportedFunctionError| is returned. | 915 // which |kUnsupportedFunctionError| is returned. |
916 virtual float speech_probability() const = 0; | 916 virtual float speech_probability() const = 0; |
917 | 917 |
| 918 // Returns the noise estimate per frequency bin averaged over all channels. |
| 919 virtual std::vector<float> NoiseEstimate() = 0; |
| 920 |
918 protected: | 921 protected: |
919 virtual ~NoiseSuppression() {} | 922 virtual ~NoiseSuppression() {} |
920 }; | 923 }; |
921 | 924 |
922 // The voice activity detection (VAD) component analyzes the stream to | 925 // The voice activity detection (VAD) component analyzes the stream to |
923 // determine if voice is present. A facility is also provided to pass in an | 926 // determine if voice is present. A facility is also provided to pass in an |
924 // external VAD decision. | 927 // external VAD decision. |
925 // | 928 // |
926 // In addition to |stream_has_voice()| the VAD decision is provided through the | 929 // In addition to |stream_has_voice()| the VAD decision is provided through the |
927 // |AudioFrame| passed to |ProcessStream()|. The |vad_activity_| member will be | 930 // |AudioFrame| passed to |ProcessStream()|. The |vad_activity_| member will be |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 // This does not impact the size of frames passed to |ProcessStream()|. | 967 // This does not impact the size of frames passed to |ProcessStream()|. |
965 virtual int set_frame_size_ms(int size) = 0; | 968 virtual int set_frame_size_ms(int size) = 0; |
966 virtual int frame_size_ms() const = 0; | 969 virtual int frame_size_ms() const = 0; |
967 | 970 |
968 protected: | 971 protected: |
969 virtual ~VoiceDetection() {} | 972 virtual ~VoiceDetection() {} |
970 }; | 973 }; |
971 } // namespace webrtc | 974 } // namespace webrtc |
972 | 975 |
973 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 976 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
OLD | NEW |