action='store_true')
    parser.add_argument('-c',
                        '--clean',
                        help="Remove files from previous runs",
                        action='store_true')
    parser.add_argument('-d',
                        '--debug',
                        help="Debug the aligner",
                        action='store_true')
    parser.add_argument(
        '--config_path',
        type=str,
        default='',
        help='Path to config file to use for training and alignment')
    args = parser.parse_args()
    fix_path()
    try:
        args.speaker_characters = int(args.speaker_characters)
    except ValueError:
        pass
    if not args.output_model_path:
        args.output_model_path = None
    validate_args(args)

    args.output_directory = args.output_directory.rstrip('/').rstrip('\\')
    args.corpus_directory = args.corpus_directory.rstrip('/').rstrip('\\')
    if args.corpus_directory == args.output_directory:
        raise Exception(
            'Corpus directory and output directory cannot be the same folder.')

    temp_dir = args.temp_directory
Ejemplo n.º 2
0
from aligner.command_line.align import fix_path

fix_path()

import os
import shutil
import pytest

from aligner.corpus import Corpus
from aligner.dictionary import Dictionary
from aligner.config import train_yaml_to_config


def pytest_addoption(parser):
    parser.addoption("--skiplarge", action="store_true",
                     help="skip large dataset tests")


@pytest.fixture(scope='session')
def test_dir():
    base = os.path.dirname(os.path.abspath(__file__))
    return os.path.join(base, 'data')


@pytest.fixture(scope='session')
def wav_dir(test_dir):
    return os.path.join(test_dir, 'wav')


@pytest.fixture(scope='session')
def lab_dir(test_dir):