Fix double slash when loading from folder ending in slash

pull/10/head
Matthew D. Scholefield 2018-04-17 20:04:02 -05:00
parent cb00e03d2d
commit bb4cb4badd
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,7 @@
from typing import *
import numpy as np
from os.path import join
from precise.params import pr
@ -68,4 +69,5 @@ def glob_all(folder: str, filt: str) -> List[str]:
def find_wavs(folder: str) -> Tuple[List[str], List[str]]:
"""Finds wake-word and not-wake-word wavs in folder"""
return glob_all(folder + '/wake-word', '*.wav'), glob_all(folder + '/not-wake-word', '*.wav')
return (glob_all(join(folder, 'wake-word'), '*.wav'),
glob_all(join(folder, 'not-wake-word'), '*.wav'))