Commit 3819bab5 authored by Jan Kiene's avatar Jan Kiene
Browse files

add controlling the log level cia env var

parent 41111088
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ Create short (5sec) testvectors.
import argparse
import sys
import logging
import os
from pathlib import Path

from cut_pcm import cut_samples
@@ -112,7 +113,7 @@ def create_short_testvectors(
        out_file = TEST_VECTOR_DIR.joinpath(f.stem + suffix + f.suffix)
        num_channels = audiofile.get_wav_file_info(f)["channels"]

        logging.info(f"{str(f)} -> {out_file}")
        logging.debug(f"{str(f)} -> {out_file}")

        if not dry:
            cut_samples(f, out_file, num_channels, CUT_FROM, f"{cut_len}", GAIN)
@@ -167,6 +168,8 @@ if __name__ == "__main__":
    assert not (args.use_ltv and args.ltv_dir is None)

    logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
    if os.environ.get("IVAS_CI_PYTHON_LOG_LEVEL") == "DEBUG":
        logging.basicConfig(level=logging.DEBUG, format="%(levelname)s: %(message)s")

    sys.exit(
        create_short_testvectors(