xinjli / allosaurus

Allosaurus is a pretrained universal phone recognizer for more than 2000 languages
GNU General Public License v3.0
571 stars 88 forks source link

Bypass the filename check when it is an instance of BytesIO objects #41

Closed kormoczi closed 3 years ago

kormoczi commented 3 years ago
from io import BytesIO

        # filename check (skipping for BytesIO objects)
        if not isinstance(filename, BytesIO):
            assert str(filename).endswith('.wav'), "only wave file is supported in allosaurus"
xinjli commented 3 years ago

It looks clear to me, thanks for your pull request!