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

Unified Diff: webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py

Issue 2811953002: APM QA unit tests, fake POLQA binary and minor fixes (Closed)
Patch Set: comments addressed Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py
diff --git a/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py b/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py
index 9f4df941ad6e26f8cdb117debb44ee457f3192d8..76f82e00a97f8dd64aea7bf7137eaa6a8394494a 100644
--- a/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py
+++ b/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation.py
@@ -297,10 +297,11 @@ class EnvironmentalNoiseTestDataGenerator(TestDataGenerator):
_NOISY_SIGNAL_FILENAME_TEMPLATE = '{0}_{1:d}_SNR.wav'
# TODO(alessiob): allow the user to store the noise tracks in a custom path.
- _NOISE_TRACKS_PATH = os.path.join(os.getcwd(), 'noise_tracks')
+ _NOISE_TRACKS_PATH = os.path.join(
+ os.path.dirname(__file__), os.pardir, 'noise_tracks')
- # TODO(alessiob): allow the user to have custom noise tracks.
- # TODO(alessiob): exploit TestDataGeneratorFactory.GetInstance().
+ # TODO(alessiob): Allow the user to have custom noise tracks.
+ # TODO(alessiob): Exploit TestDataGeneratorFactory.GetInstance().
_NOISE_TRACKS = [
'city.wav'
]
@@ -436,7 +437,7 @@ class ReverberationTestDataGenerator(TestDataGenerator):
# Load noise track.
noise_signal = signal_processing.SignalProcessingUtils.LoadWav(
noise_track_filepath)
- except IOError: # File not found.
+ except exceptions.FileNotFoundError:
# Generate noise track by applying the impulse response.
impulse_response_filepath = os.path.join(
self._aechen_ir_database_path,

Powered by Google App Engine
This is Rietveld 408576698