diff options
author | Richard Burton <richard.burton@arm.com> | 2022-03-17 10:54:26 +0000 |
---|---|---|
committer | Richard <richard.burton@arm.com> | 2022-03-17 15:19:16 +0000 |
commit | 17069628a7f28198652a296ac16dc83529c7eaae (patch) | |
tree | adff78b64954e67dc4e29f6f039c63c8c18cde2c /scripts/py/gen_audio.py | |
parent | 624dafd2a206d88da979453442fe5a8d4c05ad51 (diff) | |
download | ml-embedded-evaluation-kit-17069628a7f28198652a296ac16dc83529c7eaae.tar.gz |
MLECO-3036: Update to use Pathlib in Python scripts
* Pathlib used in Python scripts over os
* Bug fix for build_default.py
* Minor code style updates
Signed-off-by: Richard Burton <richard.burton@arm.com>
Change-Id: I5fc2e582a84443c3fb79250eb711b960d63ed8fd
Diffstat (limited to 'scripts/py/gen_audio.py')
-rw-r--r-- | scripts/py/gen_audio.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/py/gen_audio.py b/scripts/py/gen_audio.py index 53ed019..e997499 100644 --- a/scripts/py/gen_audio.py +++ b/scripts/py/gen_audio.py @@ -36,6 +36,7 @@ parser.add_argument("--min_samples", type=int, help="Minimum sample number.", de parser.add_argument("-v", "--verbosity", action="store_true") args = parser.parse_args() + def main(args): audio_data, samplerate = AudioUtils.load_resample_audio_clip(args.audio_path, args.sampling_rate, @@ -44,5 +45,6 @@ def main(args): args.min_samples) sf.write(path.join(args.output_dir, path.basename(args.audio_path)), audio_data, samplerate) + if __name__ == '__main__': main(args) |