timitphonemerec.py
def load(data_dir=DEFAULT_DATA_DIR, mfcc=True):
  """ Load all standardized TIMIT data with folded phoneme labels.

  Args:
    data_dir: A string. The data directory.
    mfcc: A boolean. If True, return MFCC sequences and their corresponding
      label sequences. Otherwise, return raw audio sequences in their
      associated label sequences.

  Returns:
    A tuple with 6 elements: train inputs, train labels, val inputs,
    val labels, test inputs, test labels. Each entry is a list of sequences.
    All input sequences are 2-D float arrays with shape
    `[length, values_per_step]` and all label sequences are 1-D int8 arrays
    with shape `[length]`.
  """
  types = ['mfcc', 'mfcc_labels'] if mfcc else ['audio', 'labels']
  ret = []
  for name in ['train', 'val', 'test']:
    for type in types:
      path = os.path.join(data_dir, name + '_' + type + '.npy')
      if not os.path.exists(path):
        raise ValueError('Data not found in %s. Run timit.py and timitphonemerec.py.' % data_dir)
      data = np.load(path)
      if type == 'audio':
        data = [seq[:, np.newaxis] for seq in data]
      ret.append(data)
  return tuple(ret)
 Load all standardized TIMIT data with folded phoneme labels.

  Args:
    data_dir: A string. The data directory.
    mfcc: A boolean. If True, return MFCC sequences and their corresponding
      label sequences. Otherwise, return raw audio sequences in their
      associated label sequences.

  Returns:
    A tuple with 6 elements: train inputs, train labels, val inputs,
    val labels, test inputs, test labels. Each entry is a list of sequences.
    All input sequences are 2-D float arrays with shape
    `[length, values_per_step]` and all label sequences are 1-D int8 arrays
    with shape `[length]`.
  
Load all standardized TIMIT data with folded phoneme labels.
Load all standardized TIMIT data with folded phoneme labels .
def load(data_dir=DEFAULT_DATA_DIR, mfcc=True):
  types = ['mfcc', 'mfcc_labels'] if mfcc else ['audio', 'labels']
  ret = []
  for name in ['train', 'val', 'test']:
    for type in types:
      path = os.path.join(data_dir, name + '_' + type + '.npy')
      if not os.path.exists(path):
        raise ValueError('Data not found in %s. Run timit.py and timitphonemerec.py.' % data_dir)
      data = np.load(path)
      if type == 'audio':
        data = [seq[:, np.newaxis] for seq in data]
      ret.append(data)
  return tuple(ret)
def load ( data_dir = DEFAULT_DATA_DIR , mfcc = True ) : types = [ 'mfcc' , 'mfcc_labels' ] if mfcc else [ 'audio' , 'labels' ] ret = [ ] for name in [ 'train' , 'val' , 'test' ] : for type in types : path = os . path . join ( data_dir , name + '_' + type + '.npy' ) if not os . path . exists ( path ) : raise ValueError ( 'Data not found in %s. Run timit.py and timitphonemerec.py.' % data_dir ) data = np . load ( path ) if type == 'audio' : data = [ seq [ : , np . newaxis ] for seq in data ] ret . append ( data ) return tuple ( ret )
Load all standardized TIMIT data with folded phoneme labels.
Load all standardized TIMIT data with folded phoneme labels .
""" Load all standardized TIMIT data with folded phoneme labels.

  Args:
    data_dir: A string. The data directory.
    mfcc: A boolean. If True, return MFCC sequences and their corresponding
      label sequences. Otherwise, return raw audio sequences in their
      associated label sequences.

  Returns:
    A tuple with 6 elements: train inputs, train labels, val inputs,
    val labels, test inputs, test labels. Each entry is a list of sequences.
    All input sequences are 2-D float arrays with shape
    `[length, values_per_step]` and all label sequences are 1-D int8 arrays
    with shape `[length]`.
  """
A tuple with 6 elements: train inputs, train labels, val inputs,
val labels, test inputs, test labels. Each entry is a list of sequences.
All input sequences are 2-D float arrays with shape
`[length, values_per_step]` and all label sequences are 1-D int8 arrays
with shape `[length]`.
A tuple with 6 elements : train inputs train labels val inputs val labels test inputs test labels . Each entry is a list of sequences . All input sequences are 2 - D float arrays with shape ` [ length values_per_step ] ` and all label sequences are 1 - D int8 arrays with shape ` [ length ] ` .
data_dir
A string. The data directory.
A string . The data directory .
mfcc
A boolean. If True, return MFCC sequences and their corresponding
label sequences. Otherwise, return raw audio sequences in their
associated label sequences.
A boolean . If True return MFCC sequences and their corresponding label sequences . Otherwise return raw audio sequences in their associated label sequences .