src/audio2vec_train.py
def dataQ_feeding(filename_queue, feat_dim, seq_len):
    """ Reads and parse the examples from alignment dataset 
    Args:
      filename_queue: A queue of strings with the filenames to read from.

    Returns:
      An object representing a single example, with the following fields:
        MFCC sequence: 200 * 39 dimensions 
        
    """
    class MFCCRECORD(object):
        pass 
    
    result = MFCCRECORD()

    ### use the line reader ### 
    reader = tf.TextLineReader()
    #values = []
    #for i in range(NUM_UP_TO):
    #    key, value = reader.read(filename_queue)
    #    values.append(value)
    key, value = reader.read(filename_queue)
    ### try to read NUM_UP_TO lines in one time ###
    ### read the csv file into features ###
    # seq = []
    record_defaults = [[1.] for i in range(feat_dim*seq_len)]
    # for value in values:
    #    seq.append(tf.decode_csv(value, record_defaults=record_defaults))
    tmp_result = tf.decode_csv(value, record_defaults=record_defaults) 
    ### so we have (NUM_UP_TO, seq_len *feat_dim ) ###
    ### reshape it into (NUM_UP_TO, seq_len, feat_dim) ###
    ### result.mfcc: sequence ###
    mfcc = tf.cast(tf.reshape(tmp_result, shape=(seq_len , \
        feat_dim)),tf.float32)
    ### result.rev_mfcc: reverse of sequence ###
    # result.rev_mfcc = tf.reverse(result.mfcc, [False, True])
    return mfcc, mfcc
 Reads and parse the examples from alignment dataset 
    Args:
      filename_queue: A queue of strings with the filenames to read from.

    Returns:
      An object representing a single example, with the following fields:
        MFCC sequence: 200 * 39 dimensions 
        
    
Reads and parse the examples from alignment dataset
Reads and parse the examples from alignment dataset
def dataQ_feeding(filename_queue, feat_dim, seq_len):
    class MFCCRECORD(object):
        pass 
    result = MFCCRECORD()
    reader = tf.TextLineReader()
    key, value = reader.read(filename_queue)
    record_defaults = [[1.] for i in range(feat_dim*seq_len)]
    tmp_result = tf.decode_csv(value, record_defaults=record_defaults) 
    mfcc = tf.cast(tf.reshape(tmp_result, shape=(seq_len , \
        feat_dim)),tf.float32)
    return mfcc, mfcc
def dataQ_feeding ( filename_queue , feat_dim , seq_len ) : class MFCCRECORD ( object ) : pass result = MFCCRECORD ( ) reader = tf . TextLineReader ( ) key , value = reader . read ( filename_queue ) record_defaults = [ [ 1. ] for i in range ( feat_dim * seq_len ) ] tmp_result = tf . decode_csv ( value , record_defaults = record_defaults ) mfcc = tf . cast ( tf . reshape ( tmp_result , shape = ( seq_len , feat_dim ) ) , tf . float32 ) return mfcc , mfcc
Reads and parse the examples from alignment dataset
Reads and parse the examples from alignment dataset
""" Reads and parse the examples from alignment dataset 
    Args:
      filename_queue: A queue of strings with the filenames to read from.

    Returns:
      An object representing a single example, with the following fields:
        MFCC sequence: 200 * 39 dimensions 
        
    """ ### use the line reader ###  #values = [] #for i in range(NUM_UP_TO): #    key, value = reader.read(filename_queue) #    values.append(value) ### try to read NUM_UP_TO lines in one time ### ### read the csv file into features ### # seq = [] # for value in values: #    seq.append(tf.decode_csv(value, record_defaults=record_defaults)) ### so we have (NUM_UP_TO, seq_len *feat_dim ) ### ### reshape it into (NUM_UP_TO, seq_len, feat_dim) ### ### result.mfcc: sequence ### ### result.rev_mfcc: reverse of sequence ### # result.rev_mfcc = tf.reverse(result.mfcc, [False, True])
An object representing a single example, with the following fields:
MFCC sequence: 200 * 39 dimensions
An object representing a single example with the following fields : MFCC sequence : 200 * 39 dimensions
filename_queue
A queue of strings with the filenames to read from.
A queue of strings with the filenames to read from .
feat_dim
seq_len