(file)
Get transcription of target wave file, 
       it's somewhat redundant for accessing each txt multiplt times,
       but it works fine with multi-thread
Get transcription of target wave file, 
       it's somewhat redundant for accessing each txt multiplt times,
       but it works fine with multi-thread
Get transcription of target wave file it s somewhat redundant for accessing each txt multiplt times but it works fine with multi - thread
def read_text(file):
    '''Get transcription of target wave file, 
       it's somewhat redundant for accessing each txt multiplt times,
       but it works fine with multi-thread'''
    src_file = '-'.join(file.split('-')[:-1])+'.trans.txt'
    idx = file.split('/')[-1].split('.')[0]

    with open(src_file, 'r') as fp:
        for line in fp:
            if idx == line.split(' ')[0]:
                return line[:-1].split(' ', 1)[1]
def read_text ( file ) : src_file = '-' . join ( file . split ( '-' ) [ : - 1 ] ) + '.trans.txt' idx = file . split ( '/' ) [ - 1 ] . split ( '.' ) [ 0 ] with open ( src_file , 'r' ) as fp : for line in fp : if idx == line . split ( ' ' ) [ 0 ] : return line [ : - 1 ] . split ( ' ' , 1 ) [ 1 ]