speech-scoring/segment_data.py

13 lines
452 B
Python

import pandas as pd
def fix_csv(collection_name = 'test'):
seg_data = pd.read_csv('./outputs/'+collection_name+'.csv',names=['phrase','filename'
,'start_phoneme','end_phoneme','start_time','end_time'])
seg_data.to_csv('./outputs/'+collection_name+'.fixed.csv')
def segment_data_gen(collection_name = 'test'):
collection_name = 'test'
seg_data = pd.read_csv('./outputs/'+collection_name+'.fixed.csv',index_col=0)