import os
import glob
import audiomate
from . import base


class FolderReader(base.CorpusReader):
    """ Loads all wavs from the given folder and creates a corpus from it. """

    @classmethod
    def type(cls):
        return 'folder'

    def _check_for_missing_files(self, path):
        return []

    def _load(self, path):
        corpus = audiomate.Corpus(path=path)
        for item in glob.glob('{}/*.wav'.format(path), recursive=True):
            basename, __ = os.path.splitext(os.path.basename(item))
            corpus.new_file(item, basename)
            corpus.new_utterance(basename, basename)
        return corpus

811e057f675eb8e3b26442b2d8c16f31aa331876
<mask token>


class FolderReader(base.CorpusReader):
    <mask token>
    <mask token>

    def _check_for_missing_files(self, path):
        return []

    def _load(self, path):
        corpus = audiomate.Corpus(path=path)
        for item in glob.glob('{}/*.wav'.format(path), recursive=True):
            basename, __ = os.path.splitext(os.path.basename(item))
            corpus.new_file(item, basename)
            corpus.new_utterance(basename, basename)
        return corpus

<mask token>


class FolderReader(base.CorpusReader):
    <mask token>

    @classmethod
    def type(cls):
        return 'folder'

    def _check_for_missing_files(self, path):
        return []

    def _load(self, path):
        corpus = audiomate.Corpus(path=path)
        for item in glob.glob('{}/*.wav'.format(path), recursive=True):
            basename, __ = os.path.splitext(os.path.basename(item))
            corpus.new_file(item, basename)
            corpus.new_utterance(basename, basename)
        return corpus

<mask token>


class FolderReader(base.CorpusReader):
    """ Loads all wavs from the given folder and creates a corpus from it. """

    @classmethod
    def type(cls):
        return 'folder'

    def _check_for_missing_files(self, path):
        return []

    def _load(self, path):
        corpus = audiomate.Corpus(path=path)
        for item in glob.glob('{}/*.wav'.format(path), recursive=True):
            basename, __ = os.path.splitext(os.path.basename(item))
            corpus.new_file(item, basename)
            corpus.new_utterance(basename, basename)
        return corpus

import os
import glob
import audiomate
from . import base


class FolderReader(base.CorpusReader):
    """ Loads all wavs from the given folder and creates a corpus from it. """

    @classmethod
    def type(cls):
        return 'folder'

    def _check_for_missing_files(self, path):
        return []

    def _load(self, path):
        corpus = audiomate.Corpus(path=path)
        for item in glob.glob('{}/*.wav'.format(path), recursive=True):
            basename, __ = os.path.splitext(os.path.basename(item))
            corpus.new_file(item, basename)
            corpus.new_utterance(basename, basename)
        return corpus
